I had a bit of an issue with IIS and I couldn't run my website anymore. I managed to fix it after reinstalling IIS and removing applicationhost.config
. Now I can launch the website from Visual Studio but if I surf to it I get:
Not Found
HTTP Error 404. The requested resource is not found.
I don't see any request showing up in the logs either. Why is this happening and how can I fix it?
The applicationhost.config looks like this;
<site name="arnvanhoutte" id="2">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="E:\OneDrive\Apps\Web\arnvanhoutte\arnvanhoutte" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:52250:localhost" />
<binding protocol="https" bindingInformation="*:44397: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" />
This is the log after I run iisexpress.exe /config:"applicationhost.config" /site:"arnvanhoutte" /apppool:"Clr4IntegratedAppPool" /trace:error
Starting IIS Express ...
Initializing the W3 Server Started CTC = 2060781
W3 Server initializing WinSock. CTC = 2060796
W3 Server WinSock initialized. CTC = 2060796
W3 Server ThreadPool initialized (ipm has signalled). CTC = 2060796
Start listenerChannel http:0
Successfully registered URL "http://localhost:52250/" for site "arnvanhoutte" application "/"
Successfully registered URL "https://localhost:44397/" for site "arnvanhoutte" application "/"
Registration completed for site "arnvanhoutte"
AppPool 'Clr4IntegratedAppPool' initialized
InitComplete event signalled
IIS Express is running.
Enter 'Q' to stop IIS Express
我设法通过将用户添加到组IIS_IUSRS来修复它
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.