IIS Express 7.5 wwwroot目录在哪里

Beh*_*ini 11 asp.net iis iis-express

使用Windows 7我安装了IIS Express 7.5但我无法找到wwwroot系统中的目录!inetpub我的C盘上也没有" "文件夹.你能告诉我在哪里可以运行像hello.aspx这样的文件吗?

谢谢

sup*_*jos 16

通过第一手经验以及其他SO答案,IISExpress通常拥有一个目录,其中包含自己的数据文件:C:\Users\<username>\Documents\IISExpress.

在那里,您可以找到每个网站日志文件(Logs\TraceLogFiles\)的默认目录,尤其是您可以在文件中找到所有网站配置config\applicationhost.config.那个人有一个<sites>部分,<site>每个网站创建一个节点.

对于每个网站,其<virtualDirectory>节点在physicalPath属性中指定实际的根位置:

<site name="YourWebSiteName" id="12345">
  <application path="/" applicationPool="Clr4IntegratedAppPool">
    <virtualDirectory path="/" physicalPath="D:\Physical\path\to\your\website\root"/>
  </application>
  ...
</site>
Run Code Online (Sandbox Code Playgroud)

  • 对于 Visual Studio 2015 及更高版本,applicationhost.config 的路径位于“&lt;solutionDir&gt;\.vs\config\applicationhost.config” (2认同)

Hai*_*n.Z 7

C:\Users\您的用户名\Documents\我的网站\web-Site1

一种简单的测试方法就是在站点根目录中键入测试文件,例如 http://localhost:1714/test.txt

系统将抛出404错误,在“详细错误信息”部分,系统将显示服务器尝试检索文件的“物理路径”。 在此输入图像描述


ema*_*ema 2

通常它位于您的主目录中。类似于 c:\Users\<yourname>\Documents\IISExpress