3.5 config - strange behaviour

Nov 19, 2008 at 1:13 PM
Hi,

I have found several problems with the behaviour of the 3.5 config solution.

  1. after activating the feature '.NET 3.5 Configuration' webservices installed in /_vti_bin/... did not work anymore
  2. after deactivating the feature in sharepoint security problems occured. E.g. form submission did not work anymore, adding people in groups, peoplepicker etc.

After some debugging and digging into the things I found out the following:

1) There seems to be an order of entries in the web.config that deactivates the http handlers for the webservices.   
When activating the feature the feature adds the following lines to the web.config http handler section

    <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
   <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
   <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false" />
   <remove verb="*" path="*.asmx" />

The problem is that the last entry should be the first one. The order of the entries above removes the http handlers. Putting the last line to be the first line solved the problem.
As I looked into the code of the feature, the 'remove' was added first but in the web.config it appears as the last line. Why? What can be done about that?

2) When deactivating the feature the code remvoes the complete 'pages' section and with this some entries that are needed

      <namespaces>
        <remove namespace="System.Web.UI.WebControls.WebParts" />
      </namespaces>
      <tagMapping>
        <add tagType= ......../>
      </tagMapping>

The solution should check first if the pages section already exists and on deactivating it should only remove the controls.