IIS 7.5 Express新虚拟目录

我如何添加新的虚拟目录?

我得到错误(类型或命名空间名称’xxx’找不到),但文件都在/ bin.

我已经尝试编辑applicationhost.config像这样:

<site name="WebSite1" id="1" serverAutoStart="true">
    <application path="/" applicationPool="Clr2IntegratedAppPool">
        <virtualDirectory path="/" physicalPath="%IIS_SITES_HOME%\WebSite1" />
        <virtualDirectory path="/SubFolderApp" physicalPath="%IIS_SITES_HOME%\WebSite1\SubFolderApp" allowSubDirConfig="true" />
    </application>
    <bindings>
        <binding protocol="http" bindingInformation=":80:localhost" />
    </bindings>
</site>
最佳答案
您需要创建一个子应用程序.您的配置创建子虚拟目录.下面的配置将/ SubFolderApp转换为应用程序.

<site name="WebSite1" id="1" serverAutoStart="true">
   <application path="/" applicationPool="Clr2IntegratedAppPool">
     <virtualDirectory path="/" physicalPath="%IIS_SITES_HOME%\WebSite1" />
   </application>
   <application path="="/SubFolderApp" applicationPool="Clr2IntegratedAppPool">
     <virtualDirectory path="/" physicalPath="%IIS_SITES_HOME%\WebSite1\SubFolderApp" />
   </application>
    <bindings>
      <binding protocol="http" bindingInformation=":80:localhost" />
   </bindings>
</site>

转载注明原文:IIS 7.5 Express新虚拟目录 - 代码日志