默认登录页asp.net web api已发布IIS

默认登录页asp.net web api已发布IIS,asp.net,iis,asp.net-web-api,Asp.net,Iis,Asp.net Web Api,我已经使用web api创建了一个.Net项目4.6 为了简单起见,我在父目录中创建了default.htm。我将项目发布到localhost,并根据屏幕截图将默认文档设置为default.htm: 已发布的web.config: <system.web> <authentication mode="None" /> <compilation targetFramework="4.6" /> <httpRuntime targe

我已经使用web api创建了一个.Net项目4.6

为了简单起见,我在父目录中创建了default.htm。我将项目发布到localhost,并根据屏幕截图将默认文档设置为default.htm:

已发布的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>

,根据下面的截图,它总是返回404:有人能帮忙吗?谢谢

我正在使用端口80:

IIS中所有已发布的网站都需要具有如下端口:

1.Assuming you are using the port of 8462.
2.Try to navigate this url =  localhost:8462
确保您的asp.net已像这样注册到IIS

祝你好运