locked
Not able to disable designer access RRS feed

  • Question

  • I went to the following location

    C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\SiteTemplates\sts\xml

    and changed the root project element inside ONET.xml to

    <Project Title="$Resources:onet_TeamWebSite;" Revision="2" ListDir="$Resources:core,lists_Folder;" xmlns:ows="Microsoft SharePoint" DisableWebDesignFeatures="wdfopensite">

    did an IIS reset.

    then created a site collection with myself primary site owner permission.

    but I am able to open this site using SP Designer 2007 and also able to create folders, lists inside the site.

    My understanding was that DisableWebDesignFeatures="wdfopensite" should disable designer access.

    What went wrong? why am i able to access the site with SPD?


    MSDNStudent Knows not much!

    Thursday, June 14, 2012 7:01 PM

Answers

  • I've done this in the past and it does work.  Its also one of the few times when changing the ONET.xml file applies to both new sites and existing sites (As long as you do an IISreset after changing the setting).  But the value is set as a token, not a string.  Change your entry to remove the quotes around wdfopensite so it look like the one below and it should work.

    <Project Title="$Resources:onet_TeamWebSite;" Revision="2" ListDir="$Resources:core,lists_Folder;" xmlns:ows="Microsoft SharePoint" DisableWebDesignFeatures=wdfopensite>


    Paul Stork SharePoint Server
    MVP Senior Solutions Architect: BlueChip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

    • Marked as answer by MSDN Student Wednesday, June 20, 2012 7:18 PM
    Thursday, June 14, 2012 7:31 PM

All replies

  • I've done this in the past and it does work.  Its also one of the few times when changing the ONET.xml file applies to both new sites and existing sites (As long as you do an IISreset after changing the setting).  But the value is set as a token, not a string.  Change your entry to remove the quotes around wdfopensite so it look like the one below and it should work.

    <Project Title="$Resources:onet_TeamWebSite;" Revision="2" ListDir="$Resources:core,lists_Folder;" xmlns:ows="Microsoft SharePoint" DisableWebDesignFeatures=wdfopensite>


    Paul Stork SharePoint Server
    MVP Senior Solutions Architect: BlueChip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

    • Marked as answer by MSDN Student Wednesday, June 20, 2012 7:18 PM
    Thursday, June 14, 2012 7:31 PM
  • Paul,

    How to you set and remove a token?

    Till now, I was adding/removing the DisableWebDesignFeatures using the SetAttribute and RemoveAttribute method on the XMLElement object.

    here I was getting the XML element by building the DOM tree from onet.xml and then taking the DocumentElement.

    How does one set and remove tokens??

    I wasn't even aware of tokens till now I thought this is an attribute.


    MSDNStudent Knows not much!

    Thursday, June 14, 2012 7:58 PM
  • I made the change manually rather than programmatically.  It is an attribute, but the value needs to be just wdfopensite rather than the string "wdfopensite".  I'm not sure how you get the attribute set to that value in the XML programmatically without having it include the quotation marks, bu that's what needs to happen.

    Paul Stork SharePoint Server
    MVP Senior Solutions Architect: BlueChip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.


    Thursday, June 14, 2012 8:23 PM
  • Paul if I put wdfopensite without quotes I am getting this problem. Which makes sense because ONET.XML is an XML file and putting attributes without quotation marks is not allowed in XML.

    06/15/2012 06:59:48.29 w3wp.exe (0x1588)                       0x1658 Windows SharePoint Services   General                       0 High     Failed to compile XML.  
    06/15/2012 06:59:48.29 w3wp.exe (0x1588)                       0x1658 Windows SharePoint Services   General                       72k8 High     Failed to determine the setup path of the list schema for list template 112.  
    06/15/2012 06:59:48.29 w3wp.exe (0x1588)                       0x1658 Windows SharePoint Services   Fields                         88y7 High     Creating UserInfoList for web "http://gsspstg11wb:8088/sites/abhi1". Cannot copy users and groups to the UserInfoList. The HR=-2147467259  
    06/15/2012 06:59:48.29 w3wp.exe (0x1588)                       0x1658 Windows SharePoint Services   General                       8z1y Medium   Failed to create list "User Information List" in web "http://gsspstg11wb:8088/sites/abhi1", HRESULT=0x80004005. List XML: "<List xmlns:ows="Microsoft SharePoint" Name="Users" Title="User Information List" Direction="0" Url="_catalogs/users" BaseType="0"/>"  
    06/15/2012 06:59:48.30 w3wp.exe (0x1588)                       0x1658 Windows SharePoint Services   Fields                         88yg High     Failed to instantiate list 'C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Template\global\lists\users'  
    06/15/2012 06:59:48.30 w3wp.exe (0x1588)                       0x1658 Windows SharePoint Services   Fields                         88yw High     Failed to create list from setup on 'User Information List' at URL '_catalogs/users'  
    06/15/2012 06:59:48.30 w3wp.exe (0x1588)                       0x1658 Windows SharePoint Services   General                       8gsb High     Failed to apply global template to site "/sites/abhi1", error: 0x80004005  
    06/15/2012 06:59:48.30 w3wp.exe (0x1588)                       0x1658 Windows SharePoint Services   General                       72k1 High     Cannot create site: "http://gsspstg11wb.:8088/sites/abhi1" for owner "srabhi", Error: , 0x80004005  
    06/15/2012 06:59:48.37 w3wp.exe (0x1588)                       0x1658 Windows SharePoint Services   General                       8kh7 High     Cannot complete this action.  Please try again.  
    06/15/2012 06:59:48.37 w3wp.exe (0x1588)                       0x1658 Windows SharePoint Services   Topology                       95ks Critical The site /sites/abhi1 could not be created.  The following exception occured: Cannot complete this action.  Please try again..  
    06/15/2012 06:59:48.99 w3wp.exe (0x1588)                       0x027C Windows SharePoint Services   General                       72e9 Medium   Error in resolving user 'srahbi' : System.Runtime.InteropServices.COMException (0x8007203A): The server is not operational.       at System.DirectoryServices.DirectoryEntry.Bind(Boolean throwIfFail)     at System.DirectoryServices.DirectoryEntry.Bind()     at System.DirectoryServices.DirectoryEntry.get_AdsObject()     at System.DirectoryServices.DirectorySearcher.FindAll(Boolean findMoreThanOne)     at System.DirectoryServices.DirectorySearcher.FindAll()     at Microsoft.SharePoint.WebControls.PeopleEditor.SearchFromGC(SPActiveDirectoryDomain domain, String strFilter, String[] rgstrProp, Int32 nTimeout, Int32 nSizeLimit, SPUserCollection spUsers, ArrayList& rgResults)     at Microsoft.SharePoint.Utilities.SPUserUtility.ResolveAgainstAD(String input, Boolean inputIsEmailOnly, SPAct...  
    06/15/2012 06:59:48.99* w3wp.exe (0x1588)                       0x027C Windows SharePoint Services   General                       72e9 Medium   ...iveDirectoryDomain globalCatalog, SPPrincipalType scopes, SPUserCollection usersContainer, TimeSpan searchTimeout, String customFilter)     at Microsoft.SharePoint.Utilities.SPActiveDirectoryPrincipalResolver.ResolvePrincipal(String input, Boolean inputIsEmailOnly, SPPrincipalType scopes, SPPrincipalSource sources, SPUserCollection usersContainer)     at Microsoft.SharePoint.Utilities.SPUtility.ResolvePrincipalInternal(SPWeb web, SPWebApplication webApp, Nullable`1 urlZone, String input, SPPrincipalType scopes, SPPrincipalSource sources, SPUserCollection usersContainer, Boolean inputIsEmailOnly, Boolean alwaysAddWindowsResolver).  


    MSDNStudent Knows not much!

    Friday, June 15, 2012 11:04 AM
  • I suspect there is something else that isn't right in your onet.xml.  Here is the project line that I am using in my ONET.XML with no errors.  I tried it both with and without quotes and it is ignored if you put quotes around it.  I understand all attributes in an XML file should be quoted, but in my testing this one only works if quotes are not used.

    <Project Title="$Resources:onet_TeamWebSite;" Revision="2" ListDir="$Resources:core,lists_Folder;" xmlns:ows="Microsoft SharePoint" UIVersion="4" DisableWebDesignFeatures=wdfopensite >

    Paul Stork SharePoint Server
    MVP Senior Solutions Architect: BlueChip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

    Friday, June 15, 2012 12:18 PM
  • As Paul suggested it is without quotes, please refer http://support.microsoft.com/kb/940958

    Aravind http://aravindrises.blogspot.com

    Wednesday, June 20, 2012 7:10 PM