0
我有一點與IIS的問題,我無法再運行我的網站。在重新安裝IIS並刪除applicationhost.config
後,我設法修復了它。現在我可以從Visual Studio推出的網站,但如果我上網給它我得到:ASP.NET Core重置後返回404 applicationhost.config
未找到
HTTP錯誤404請求的資源沒有找到。
我在日誌中看不到任何請求。爲什麼會發生這種情況,我該如何解決?
applicationhost.config看起來像這樣;
<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" />
這是日誌後我跑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