5

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.

6 Answers 6

6

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.
Sign up to request clarification or add additional context in comments.

Comments

4

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.

2 Comments

Keep in mind that web.config (like machine.config) files will merge. So if you have a web.config in the root, and a web.config in a subfolder, your application will read machine.config -> root web.config -> subfolder web.config. This may be causing the "duplicate" error.
Yes you are right, but in my case problem solved when i created right directory where iis was trying to find web.config. In real there was no issue of duplication but i don't know why error message was telling it as issue of duplication or .Net framework version. From here i got clue: Cannot read configuration file Config File \?\D:\Visualstudio Projects\SPARC\SPARC\web.config
1

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.

3 Comments

no there's no any scriptResourceHandler in my whole solution.
In that case, can you post your web.config and let us have a look?
i solved it, u can read my answer... Many thanks for your time :)
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.

Comments

0

Deleting the .vs folder of the solution did work for me. That folder is regenerated by Visual Studio, and in my case, it was probably committed by somebody else working on the project.

Comments

0

Deleting the .vs folder works, but you most close Visual Studio and IIS Express first. Tested with VS 2022.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.