"There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined"

3

I am developing a project using vstudio 2015, when i tried to run it on another system i am getting following error, tried many solutions available here but unable to get rid of this.

Note: another systems has same configurations as of mine.

HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid. Detailed Error Information: Module IIS Web Core Notification Unknown Handler Not yet determined Error Code 0x80070003 Config Error Cannot read configuration file Config File \?\D:\Visualstudio Projects\SPARC\SPARC\web.config Requested URL http://localhost:1396/ Physical Path
Logon Method Not yet determined Logon User Not yet determined Request Tracing Directory C:\Users\Syeds\Documents\IISExpress\TraceLogFiles\ Config Source:

-1: 0:

More Information: This error occurs when there is a problem reading the configuration file for the Web server or Web application. In some cases, the event logs may contain more information about what caused this error.

If you see the text "There is a duplicate 'system.web.extensions/scripting/scriptResourceHandler' section defined", this error is because you are running a .NET Framework 3.5-based application in .NET Framework 4. If you are running WebMatrix, to resolve this problem, go to the Settings node to set the .NET Framework version to ".NET 2". You can also remove the extra sections from the web.config file.

Warm welcome for suggestion and answers, Thanks & Regards.

c#
asp.net
.net
iis

4 Answers

2

In my case Actual issue was directory, to solve it what i did was creating same folder directory (as in my system) into other system.

IIS was trying to find webconfig in D:\Visualstudio Projects\SPARC\SPARC\

So, i created folder "Visualstudio Projects" in D: and then pasted the project there and it worked..

There was no any problem in web.config or applicationhost.config or in any of the IIS configuration.

answered on Stack Overflow Nov 11, 2015 by Osama Bin Waseem
1

I have this issue when I have same project file (Solution file) in two separate folder. The project properties was same and port number for IIS Express was same. The issue is resolved when I created new virtual directory.

Change project URL in Project>Properties>Web>Servers>Project Url.

Please create new Virtual Directory.

answered on Stack Overflow Dec 21, 2018 by Yogendra Paudyal
0

Try open your web.config and search for a tag named <scriptResourceHandler>

Can you find more than 1 result?

If yes, try merging the two "scriptResourceHandler" to one.

answered on Stack Overflow Nov 11, 2015 by User2012384
0

Restarting visual studio might help on this.

This usually happens when you have invalid configs in your {solutions_dir}/.vs/{project_name}/config/applicationhost.config. This file contains machine specific configuration.

.vs/* directory should be added to your gitignore if you are using git. So the contents of this directory never gets pushed to the main repo.

If this will not work.

  • Open the file {solutions_dir}/.vs/{project_name}/config/applicationhost.config.
  • Go to the sites section
  • Check the application if it matches the physical path that is configured for each site applications. IISExpress will look use the phyiscalPath as its based directory per application.
answered on Stack Overflow Oct 29, 2019 by ngeksyo

User contributions licensed under CC BY-SA 3.0