【发布时间】:2014-09-17 08:03:48
【问题描述】:
在产品中,我的网站 (mvc5) 托管在 https://company.no/myApp/ 上,其中 myApp 是 IIS 上的应用程序。
在开发中,我的网站托管在 http://localhost:54307/ 上的 IIS Express 上
由于这会导致服务器相对路径出现问题,我还想在 http://localhost:54307/myApp 上进行调试。
这是我尝试过的:
- 将属性页中的项目 url 设置为
http://localhost:54307/myApp并单击创建虚拟目录 - 尝试使用或不使用 myApp url 覆盖应用程序根目录。
-
尝试修改 applicationhost.config。目前我的设置如下所示:
<site name="MyApp.Web-Site" id="38"> <application path="/" applicationPool="Clr4IntegratedAppPool"> <virtualDirectory path="/" physicalPath="C:\Projects\OP\MyApp\Main\src\MyApp.Web" /> </application> <application path="/MyApp" applicationPool="Clr4IntegratedAppPool"> <virtualDirectory path="/" physicalPath="C:\Projects\OP\MyApp\Main\src\MyApp.Web" /> </application> <bindings> <binding protocol="http" bindingInformation="*:54307:localhost" /> <binding protocol="https" bindingInformation="*:44307:localhost" /> </bindings> </site>
当我尝试从 myApp 文件夹打开页面时,出现以下错误:
Module IIS Web Core
Notification BeginRequest
Handler Not yet determined
Error Code 0x800700b7
Config Error Cannot add duplicate collection entry of type 'add' with unique key attribute 'name' set to 'WSFederationAuthenticationModule'
Config File \\?\C:\Projects\OP\MyApp\Main\src\MyApp.Web\web.config
Requested URL http://localhost:54307/MyApp
Physical Path C:\Projects\OP\MyApp\Main\src\MyApp.Web
这表示 web.config 加载了两次。知道我做错了什么吗?
感谢您的帮助
拉西
【问题讨论】:
标签: asp.net asp.net-mvc iis visual-studio-2013 iis-express