IIS 7.5 Express 新虚拟目录

发布于 2024-10-13 01:29:42 字数 644 浏览 5 评论 0原文

如何添加新的虚拟目录?

我收到错误(找不到类型或命名空间名称“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>

how do i add new virtual directory?

I'm getting error (The type or namespace name 'xxx' could not be found) but the files are all in /bin.

i have tried editing the applicationhost.config like this:

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

流绪微梦 2024-10-20 01:29:42

您需要创建一个子应用程序。您的配置创建了子虚拟目录。下面的配置将 /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>

You need to create a child application. Your configuration created child virtual directory. The configuration below turns /SubFolderApp into an application.

<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>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文