2017-01-17 13 views
0

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: enter image description here

enter image description here

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

enter image description here

I Port bin mit 80: enter image description here

Antwort

0

Alle Website veröffentlichten Web in IIS müssen einen Port wie diese haben:

1.Assuming you are using the port of 8462. 
2.Try to navigate this url = localhost:8462 

Stellen Sie sicher, Ihre asp.net hat auf diesem IIS registriert aspnet_regiis -i

Viel Glück!