ASP.NET 500.19 HTTP error "cannot read configuration file"

I have a really nasty problem. I have a website in ASP.NET. I am using IIS Express for development. I recently moved project files and folders from a USB drive to a Dropbox folder to avoid moving the drive.

After transferring my project to the Dropbox folder, I received this error that IIS could not read in my configuration file. I noticed that the path was pointing to my USB drive. So I copied my web.config file to the path displayed in the error message, and it worked again, if I delete it again, the error appears again.

So, I think somewhere in my project there is a configuration parameter pointing to my USB drive, although it should point to my local Dropbox folder.

I added an error screenshot:

enter image description here

Transfer:

IIS Web Core module Message unknown Processor still not defined Error code 0x80070003 Configuration error Configuration file could not be read Configuration file ......... Requested URL ........... Physical path Authentication method unknown Unknown user yet unknown Debug path ..................

+4
source share
3 answers

I had this problem when trying to start a service from a project created on another machine that was saved to DropBox.

There is a file in the project folder in PROJECTFOLDERNAME / .vs / config / applicationhost.config

This file has a list of sites in XML, for example:

<sites> <site name="WebSite2" id="2"> <application path="/" applicationPool="Clr4IntegratedAppPool"> <virtualDirectory path="/" physicalPath="C:\Users\WRONGPATH\Dropbox\Website2\src\Website2" /> </application> <bindings> <binding protocol="http" bindingInformation="*:64655:localhost" /> </bindings> </site> <site name="WebSite4" id="3"> <application path="/" applicationPool="Clr4IntegratedAppPool"> <virtualDirectory path="/" physicalPath="C:\Users\Nick\Dropbox\Website3\src\Website3" /> </application> <bindings> <binding protocol="http" bindingInformation="*:64655:localhost" /> </bindings> </site> <siteDefaults> <logFile logFormat="W3C" directory="%IIS_USER_HOME%\Logs" /> <traceFailedRequestsLogging directory="%IIS_USER_HOME%\TraceLogFiles" enabled="true" maxLogFileSizeKB="1024" /> </siteDefaults> <applicationDefaults applicationPool="Clr4IntegratedAppPool" /> <virtualDirectoryDefaults allowSubDirConfig="true" /> </sites> 

Change virtualDirectory physicalPath to the correct path. The problem that I still encounter is that I am working on this project from two different places, I really do not want to constantly change this back and forth.

+2
source

I had this problem when I moved the My Documents folder to another location. IIS Express was still pointing the old way. The only way to fix this is to cleanly install IIS Express.

  • Remove IIS Express
  • Delete the IIS Express folder that contains the configuration file.
  • Install IIS Express
+1
source

Uh, I've been looking for an answer for more than 2 hours. I tried to empty every recycle bin .vs folder. But they did not help me.

In the end, I fixed the problem by re-mapping (re-linking) the project path in IIS Manager.

0
source

Source: https://habr.com/ru/post/1489730/


All Articles