Saturday, March 16, 2013

"This web site has been configured to disallow editing with SharePoint Designer"


Issue:
We cannot open our root web site in SharePoint Designer 2010. We got the error saying "This web site has been configured to disallow editing with SharePoint Designer". However, we could open any of our sub web sites under the root. For example, we cannot open site http://intranet.mycompany.com but we could open http://intranet.mycompany.com/hr

Conclusion:
Our investigation found out that there are two hidden methods that are used by SharePoint 2010 to disable a site from openning in Designer. First, the property setting in ONET.xml file DisableWebDesignFeatures="wdfopensite". Second, the web site property "vti_disablewebdesignfeatures2". Our Micorosoft Project Server 2010 SharePoint site by default has DisableWebDesignFeatures="wdfopensite" and it prevents any other site collection from openning in Designer.

Our Micorosoft Project Server 2010 SharePoint site is deployed at http://intranet.mycompany.com/pwa and all our other sites are deployed at different site collection at http://intranet.mycompany.com. In theory, these are two different site collections and they should NOT interfere with each other, but the reality is that if the PWA site doesn't allow openning in Designer, the other site collection won't either.

Solution:
Removing the DisableWebDesignFeatures="wdfopensite" from ONET.xml of the PWA site which is at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\SiteTemplates\PWA\XML and do a iisreset.
I guess if you can set the property of vti_disablewebdesignfeatures2 to null of the PWA web site using code or Powershell, that should work too. If you want to try this way, this article http://www.iwkid.com/blog/Lists/Posts/Post.aspx?ID=64 or http://thatsharepointguy.blogspot.com/ will show you.

One more trick you need to pay attention to is that you have to closed the SharePoint Design and open it again every time you want to give it a try. SharePoint Designer by default will cache the results from previous requests to a web site.

Investigation:
1. Google search of "This web site has been configured to disallow editing with SharePoint Designer"

A google search of the error will give you solutions about how to check SharePoint settings to allow openning site in Designer. Basically it is to check your Web Application to allow Designer and check your site collection to allow Designer. We did both and still have the issue.

To do the check, follow the instructions at http://office.microsoft.com/en-us/sharepoint-designer-help/managing-sharepoint-designer-2010-HA101838275.aspx


2. Call Microsoft Support
We submitted a service request to Microsoft Support and got their help. Microsoft Support basically did the same checks as we did in step 1 and couldn't find a solution. But a useful clue from them is that we can use Fiddler to track the HTTP request from Designer to the site. We used the tool and found out there are requests to

http://.../_vti_bin/shtml.dll/_vti_rpc
http://.../_vti_bin/_vti_aut/author.dll

3. Check SharePoint Log
We turned on the Verbose logging of SharePoint and trying to trace the calls to "author.dll" and any errors but there is nothing useful.

4. Check the HTTP Response

Finally we think it may be useful to determine how Designer decide if a web site can be openned by look at the HTTP response it got from SharPoint server. By comparing the reponses, finally we fould out something promising. In the HTTP response when a site is blocked, we see

<li>vti_disablewebdesignfeatures2
<li>VX|wdfopensite

These two lines did not exist when the site can be openned. A search of "vti_disablewebdesignfeatures2" in Google quickly leads us to two articles

http://thatsharepointguy.blogspot.com/

This web site has been configured to disallow editing with SharePoint Designer

Scenario: You block SharePoint Designer editing in your production environment using the steps outlined in this KB article. You copy a site from this farm to another farm, likely your dev farm, where designer is not blocked. You then try to edit the site with designer and you still get that lovely error message:

This web site has been configured to disallow editing with SharePoint Designer
Contact your web site administrator for more information.

However, you never blocked SharePoint Designer in that farm.

The trick here is that there is also a web property key, vti_disablewebdesignfeatures2, that can block Designer edits at the web level.

To get rid of this property key you can create a little app using the SharePoint object model to delete that key. Below is the code to do that using c#.


string sUrl = args[0].ToString();
SPWeb web = new SPSite(sUrl).OpenWeb();
try
{
web.Properties["vti_disablewebdesignfeatures2"] = null;
web.Properties.Update();
web.Update();
}
catch (Exception e)
{
Console.WriteLine(e.ToString());
}


and

http://www.iwkid.com/blog/Lists/Posts/Post.aspx?ID=64


Using Powershell, I did a search for the web properties "vti_disablewebdesignfeatures2" in our web site but there are no such properties.

PS C:\Users\moss_service> $site = New-Object Microsoft.SharePoint.SPSite("http://intranet.mycompany.com")
PS C:\Users\moss_service> $web = $site.OpenWeb()
PS C:\Users\moss_service> $web.AllProperties

The property "allowdesigner" is the one corresponding to the Designer setting can be set in UI at site collection level. Value "1" means it is enabled.

We did a search of the string "DisableWebDesignFeatures" on SharePoint server from the 14 folder, and found that PWA site definition file ONET.xml has

<Project Title="Project Web App" Revision="2" ListDir="$Resources:core,lists_Folder;" SiteLogoUrl="/_layouts/inc/pwa/images/SiteIcon.png" xmlns:ows="Microsoft SharePoint" DisableWebDesignFeatures="wdfopensite" UIVersion="4">

We removed the DisableWebDesignFeatures="wdfopensite" and did a iisreset. Now everything works fine.

1 comment:

  1. If your site template disables site / page editing via the DisableWebDesignFeatures in ONET.xml, and you would not like to alter the template, there is an easy way to temporarily make the site editable using Fiddler as described here:
    http://pholpar.wordpress.com/2014/05/28/how-to-make-a-sharepoint-web-site-page-temporarily-editable-if-the-site-is-configured-to-disable-editing/

    ReplyDelete