创建虚拟目录失败,错误为:配置文件 applicationhost.config 有问题

时间:2021-04-30 11:12:18

标签: tfs azure-devops visual-studio-2013 windows-10

我有一个关于 TFS 的项目,我在两个不同的文件夹下有两个解决方案:

  • 项目>.NET>projectwebhr
  • 项目>.NETprojectwebfinance

当我尝试加载第一个项目时,它加载没有错误。 同时,我想通过在 Visual Studio 中打开它来加载第二个项目,但出现以下错误:

enter image description here

我已经关注了这些steps,但徒劳无功。 当我检查配置文件时,我发现以下内容:

  <sites>
            <site name="WebSite1" id="1" serverAutoStart="true">
                <application path="/">
                    <virtualDirectory path="/" physicalPath="%IIS_SITES_HOME%\WebSite1" />
                </application>
                <bindings>
                    <binding protocol="http" bindingInformation=":8080:localhost" />
                </bindings>
            </site>
            <site name="projectwebhr" id="2">
                <application path="/" applicationPool="Clr4IntegratedAppPool">
                    <virtualDirectory path="/" physicalPath="C:\XXX\projectwebhr\projectwebhr" />
                </application>
                <bindings>
                    <binding protocol="http" bindingInformation="*:2101:localhost" />
                </bindings>
            </site>
            <siteDefaults>
                <logFile logFormat="W3C" directory="%IIS_USER_HOME%\Logs" />
                <traceFailedRequestsLogging directory="%IIS_USER_HOME%\TraceLogFiles" enabled="true" maxLogFileSizeKB="1024" />
            </siteDefaults>
            <applicationDefaults applicationPool="Clr4IntegratedAppPool" />
            <virtualDirectoryDefaults allowSubDirConfig="true" />
        </sites>

但找不到第二个文件夹的站点名称

2 个答案:

答案 0 :(得分:0)

您可以尝试将第二个文件夹的站点添加到配置文件中的<sites>节点。

答案 1 :(得分:0)

我最终从 IISExpress 文件夹中删除了 Sync,如下所示: enter image description here

相关问题