Ich habe ein .Net-Projekt 4.6 mit Web-API erstellt.Standard-Zielseite asp.net Web API veröffentlicht IIS
nur aus Gründen der Einfachheit habe ich default.htm im übergeordneten Verzeichnis erstellt. Ich veröffentliche mein Projekt auf localhost und das Standarddokument einrichten gemäß dem Screenshot default.htm:
veröffentlicht web.config:
<system.web>
<authentication mode="None" />
<compilation targetFramework="4.6" />
<httpRuntime targetFramework="4.5.2" />
<httpModules>
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" />
</httpModules>
<customErrors mode="Off" />
</system.web>
<system.webServer>
<modules>
<remove name="FormsAuthentication" />
<remove name="ApplicationInsightsWebTracking" />
<add name="ApplicationInsightsWebTracking" type="Microsoft.ApplicationInsights.Web.ApplicationInsightsHttpModule, Microsoft.AI.Web" preCondition="managedHandler" />
</modules>
<handlers>
<remove name="ExtensionlessUrlHandler-Integrated-4.0" />
<remove name="OPTIONSVerbHandler" />
<remove name="TRACEVerbHandler" />
<add name="ExtensionlessUrlHandler-Integrated-4.0" path="*." verb="*" type="System.Web.Handlers.TransferRequestHandler" preCondition="integratedMode,runtimeVersionv4.0" />
</handlers>
<validation validateIntegratedModeConfiguration="false" />
</system.webServer>
Jedes Mal, wenn ich navigieren Sie zu http://localhost/, gibt es immer 404 wie auf dem Screenshot unten: Kann jemand bitte helfen? Dank