2017-01-17 25 views
0

web apiを使用して.Netプロジェクト4.6を作成しました。デフォルトのランディングページasp.net web api公開IIS

わかりやすくするため、親ディレクトリにdefault.htmを作成しました。私はlocalhostに私のプロジェクトを公開し、スクリーンショットに従ってDEFAULT.HTMする既定のドキュメントを設定します。enter image description here web.configファイルに公開

enter image description here

:しかし

<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> 

を、私が移動するたびにhttp://localhost/、それは以下のスクリーンショットに従って常に404を返します:助けてもらえますか?おかげ

enter image description here

は私がポート80を使用しています: enter image description here

答えて

0

IISのすべての公開されたWebサイトには、このようなポートを持っている必要があります:

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

をあなたのasp.netが持っていることを確認してくださいこのようにあなたのIISに登録されているaspnet_regiis -i

幸運!

関連する問題