I am trying to create an MVC2 web application that will run both on my local development machine (on localhost), and on our central webserver.
Development machine:
Windows 7 Professional, 64bit
Visual Studio 2010 (beta)
ASP.NET 4.0
IIS 7.5
Webserver:
Windows Server 2003 SP2
ASP.NET 3.5 SP1 (determined by checking the folders under %SystemRoot%\Microsoft.NET\Framework)
IIS 6.0
Everything works fine when debugging from VS, and I've finally gotten so far that it also works copied to the webserver. However, when I try to copy it to my own local webserver, I get the following error message:
<div> </div> <div> </div> <div> </div>
It almost goes without saying, I can not see any duplicate scriptResourceHandler section at all!
The application I am testing on, is the default application that is created when you use the ASP.NET MVC2 Web Application template. The target framework for the application is .NET 3.5. (Because it has to run on our central .NET 3.5 webserver.)
Is see now that I a comparable error message when trying to configure the web application in IIS7:
There was an error while performing this operation.
Details:
Filename: \\?\C:\Temp\test2\web.config
Line number: 14
Error: There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined
IIS7Internal Server Error500.19duplicatescriptingResourceHandler
See http://www.asp.net/learn/whitepapers/aspnet4/breaking-changes#0.1__Toc256770149
"The workaround for the second scenario is to delete or comment out all the
system.web.extensions configuration section definitions and configuration section group definitions from the application-level
Web.config file. These definitions are usually at the top of the application-level
Web.config file and can be identified by the configSections element and its children."
See http://www.asp.net/learn/whitepapers/aspnet4/breaking-changes#0.1__Toc256770149
"The workaround for the second scenario is to delete or comment out all the
system.web.extensions configuration section definitions and configuration section group definitions from the application-level
Web.config file. These definitions are usually at the top of the application-level
Web.config file and can be identified by the configSections element and its children."
That did the trick! Wow, you would've thought such a problem would show up bug-tests... Thanks a million Bruce -- I can continue happy coding
After commenting out the system.web.extension I got a further error wanting the me to set the
<customErrors mode="RemoteOnly"
After I did that I got the following error:
Description:
An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: The browser or gateway element with ID 'safari1plus' cannot be found.
Source Error:
Line 1: <browsers>
Line 2: <browser refID="safari1plus">
Line 3: <controlAdapters>
Line 4: <adapter controlType="System.Web.UI.WebControls.Menu" adapterType="" />
Member
22 Points
53 Posts
There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined
Jun 22, 2010 06:41 AM|pbb|LINK
I am trying to create an MVC2 web application that will run both on my local development machine (on localhost), and on our central webserver.
Development machine:
Webserver:
Everything works fine when debugging from VS, and I've finally gotten so far that it also works copied to the webserver. However, when I try to copy it to my own local webserver, I get the following error message:
<div> </div> <div> </div> <div> </div>It almost goes without saying, I can not see any duplicate scriptResourceHandler section at all!
The application I am testing on, is the default application that is created when you use the ASP.NET MVC2 Web Application template. The target framework for the application is .NET 3.5. (Because it has to run on our central .NET 3.5 webserver.)
Is see now that I a comparable error message when trying to configure the web application in IIS7:
There was an error while performing this operation.
Details:
Filename: \\?\C:\Temp\test2\web.config
Line number: 14
Error: There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined
IIS7 Internal Server Error 500.19 duplicate scriptingResourceHandler
All-Star
16633 Points
1395 Posts
Re: There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined
Jun 24, 2010 04:18 AM|XiaoCheng Fan - MSFT|LINK
Hi,
Correct me if I made a mistake, do you close the sectionGroup scripting?
I'm looking forward for your reply.
If you have any feedback about my replies, please contact msdnmg@microsoft.com
Microsoft One Code Framework
Star
12480 Points
2830 Posts
Re: There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined
Jun 24, 2010 08:11 PM|Bruce L|LINK
This is a known issue with ASP.NET 4.0 / vs 2010
See http://www.asp.net/learn/whitepapers/aspnet4/breaking-changes#0.1__Toc256770149
"The workaround for the second scenario is to delete or comment out all the system.web.extensions configuration section definitions and configuration section group definitions from the application-level
Web.config
file. These definitions are usually at the top of the application-levelWeb.config
file and can be identified by the configSections element and its children."http://www.discountASP.NET
Member
22 Points
53 Posts
Re: There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined
Jun 29, 2010 03:36 AM|pbb|LINK
Hmmm there is definitely something wrong with the email notification system -- I never received any warning about replies to my question...
Anyhow, thanks for the replies!
Yes, the sectionGroup is closed. Like I said, this is the standard ASP.NET MVC2 Web Application template, without any modifications.
Member
22 Points
53 Posts
Re: There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined
Jun 29, 2010 03:47 AM|pbb|LINK
That did the trick! Wow, you would've thought such a problem would show up bug-tests... Thanks a million Bruce -- I can continue happy coding
Star
12480 Points
2830 Posts
Re: There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined
Jun 29, 2010 08:02 PM|Bruce L|LINK
when you work in a hosting company, you get to see all these weird problems early
..
http://www.discountASP.NET
None
0 Points
1 Post
Re: There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined
Oct 21, 2010 10:52 AM|tjcst25|LINK
Commenting out the <sectionGroup name="system.web.extensions"...> worked for me.
Thanks!
Tim
None
0 Points
1 Post
Re: There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined
Oct 24, 2010 03:45 PM|MarkFinch|LINK
After commenting out the system.web.extension I got a further error wanting the me to set the
<customErrors mode="RemoteOnly"
After I did that I got the following error:
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: The browser or gateway element with ID 'safari1plus' cannot be found.
Source Error:
Source File: C:\dashCommerce WebReady\WebReady\App_Browsers\chrome.browser Line: 2
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.1
Is there some other application that I need to load to my local machine?
Thanks
safari1plus control adapters
None
0 Points
2 Posts
Re: There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined
Apr 21, 2011 01:20 AM|sandeshmm|LINK
Even i faced same issue while creating MVC application and sharepoint portal configuraiton. I have sucessfully fixed this issue and check this post
http://code.cmsstores.com/there_is_a_duplicate_scriptresourcehandler_section_defined/
None
0 Points
1 Post
Re: There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined
Sep 06, 2013 10:03 AM|vimal.amaldas|LINK
If you set the appropriate FRAMEWORK VERSION on the Application Pool ,it will work correctly.
Projects developed in (2.0,3.0,3.5) should run under an Application Pool with .NET FRAMEWORK VERSION v2.0.50727
Projects developed in 4.0 should run under an Application Pool with .NET FRAMEWORK VERSION v4.0.30319