IIS Express-500.19无法读取配置文件-因为它查找的路径错误 [英] IIS Express - 500.19 Cannot read configuration file - because it's looking at the wrong path
问题描述
我最近将根TFS文件夹从D:\TFS\systemstfs
重命名为D:\TFS\sys
,因为该项目的路径之一对于Windows来说太长了.现在,当我尝试使用IIS Express在VS2013中运行其他项目(D:\ TFS \ sys \ companydomain.com \ Dev \ Flowers \ wsBusinessLayer)(项目URL
I recently renamed my root TFS folder from D:\TFS\systemstfs
to D:\TFS\sys
because one of the project's paths was too long for Windows. Now, when I attempt to run a different project (D:\TFS\sys\companydomain.com\Dev\Flowers\wsBusinessLayer) in VS2013 using IIS Express (Project URL http://localhost:59729/Flowers/wsBusinessLayer/) I get the following error message in the browser:
HTTP错误500.19-内部服务器错误
无法访问请求的页面,因为该页面的相关配置数据无效.
HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.
模块-IIS Web核心
通知-BeginRequest
错误代码-0x80070003
配置错误-无法读取配置文件
配置文件-\?\ D:\ TFS \ systemstfs \ companydomain.com \ Dev \ Flowers \ web.config
请求的URL- http://localhost:59729/Flowers/wsBusinessLayer/InformationServices.asmx
物理路径-D:\ TFS \ sys \ companydomain.com \ Dev \ Flowers \ wsBusinessLayer \ InformationServices.asmx
Module - IIS Web Core
Notification - BeginRequest
Error Code - 0x80070003
Config Error - Cannot read configuration file
Config File - \?\D:\TFS\systemstfs\companydomain.com\Dev\Flowers\web.config
Requested URL - http://localhost:59729/Flowers/wsBusinessLayer/InformationServices.asmx
Physical Path - D:\TFS\sys\companydomain.com\Dev\Flowers\wsBusinessLayer\InformationServices.asmx
(强调我,D:是我机器上的第二个硬盘,不是网络共享)
(emphasis mine, D: is the second HDD on my machine, not a network share)
我很清楚问题出在哪里(配置文件路径错误),但我不知道如何解决.我已经尝试过:
It's clear to me what the problem is (the config file path is wrong) but I have no idea how to fix it. I have tried:
- 启用抛出CLR异常时中断"
- 从TFS重新获取解决方案
- 重新启动
- 切换为使用IIS,然后再返回Express
- Google 500.19、0x80070003,路径错误,无法读取配置文件以及这些条款的各种组合
但是没有运气.有人遇到过这个吗?
But have had no luck. Has anyone come across this before?
推荐答案
结果我不得不以以下方式编辑%USERPROFILE%\Documents\IISExpress\config\applicationhost.config
-
Turns out I had to edit %USERPROFILE%\Documents\IISExpress\config\applicationhost.config
in the following way -
<configuration>
<system.applicationHost>
<sites>
<site name="wsBusinessLayer">
<application path="/">
<virtualDirectory path="/Flowers" physicalPath="D:\TFS\sys\companydomain.com\Dev\Flowers" />
我不知道该文件如何正确"更改,但是手动编辑该文件效果很好.
I don't know how this file gets changed "properly", but editing it manually worked fine.
这篇关于IIS Express-500.19无法读取配置文件-因为它查找的路径错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!