localhost /をlocalhost/index.htmlを参照するにはどうすればよいですか?localhost/index.htmlにアクセスする際にIIS Expressが想定していない/
直接index.htmlにアクセスすると、正常に動作しますが、サイトのルートにアクセスするとき、私は次のエラーを取得:
Server Error in '/' Application.
The resource cannot be found.
Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.
Requested URL:/
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.33440
が、私は(IIS Expressの設定ファイルに見えたが%のUSERPROFILE%の\ドキュメント\ iisexpress \ CONFIG \ applicationhost.config)、何が間違っているのか分かりません。
これは私のプロジェクトのための仮想ディレクトリ情報です:
<site name="MySite" id="12">
<application path="/" applicationPool="Clr4IntegratedAppPool">
<virtualDirectory path="/" physicalPath="C:\Users\username\path\to\project\projectname" />
</application>
<bindings>
<binding protocol="http" bindingInformation="*:90210:localhost" />
</bindings>
</site>
そして<system.webServer>
部分には、それが含まれています:
<defaultDocument enabled="true">
<files>
<add value="Default.htm" />
<add value="Default.asp" />
<add value="index.htm" />
<add value="index.html" />
<add value="iisstart.htm" />
<add value="default.aspx" />
</files>
</defaultDocument>
それがうまくいくという意味がありますIISによって指定された既定のファイル。 – BrainSlugs83