I had recently upgraded IIS7 to ASP.Net 4.0 and had several problems as a result with my installation of Sitefinity 3.7 SP2.
1) The error message that told me a had a duplicate scriptResourceHandler. This was initially resolved by commenting out the handler in the web.config. Then there were other errors which caused me to handle them in the same way (see code below).
2) The second problem once I commented all of this code out was a problem related to adding controls and editing them. I could not drag and drop controls onto a page nor could I edit already present controls. This was caused by the changes I made in the web.config file.
3) The third problem was that I could not use the Sitefinity workflow system to approve any changes that I did make. All that occurred when I sent something for approval was another workflow error. Again, caused by commenting out code.
To resolve these problems I found a thread (
http://forums.iis.net/t/1149226.aspx) that said to correct this problem meant that I would have to use the IIS7 Manager and change back the default Application Pool back to ASP/Net 2.0. I did this then changed back the code to non-commented. I restarted the IIS7 server and confirmed that this worked - it did!
To reset the Application Pool DefaultAppPool use the following steps.
1) Open the IIS Manager.
2) Expand the server nodes until the Application Pools icon appears.
3) Double click on the DefaultAppPool icon
4) Select a different .Net Framework Application (I changed from 4.0 to 2.0 and it worked fine).
5) Restart the IIS Server by clicking on the localhost server name then, in the rightmost panel, click Restart.
6) That is it!
I hope this helps someone since it took me several hours to find the solution.
(CODE for item #1)
<
sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<
sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<!--
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>-->
<
sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
<!--
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/>
<section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
<section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/>
-->
</
sectionGroup>