简体   繁体   English

无法在VS2013中运行迁移的Web应用程序

[英]Unable to run migrated web application in VS2013

I have an ASP.Net web application developed in Visual Studio 2008 (.Net 3.5). 我有在Visual Studio 2008(.Net 3.5)中开发的ASP.Net Web应用程序。 I have copied this solution to another root folder (both on my Win7 64b machine) and upgraded the copy to VS2013 (Professional) and .Net451, but when I try to debug the web app in VS2013 I get an Access Denied error ("Unauthorized: Logon failed due to server configuration. Verify that you have permission to view this directory or page based on the credentials you supplied and the authentication methods enabled on the Web server"). 我已将此解决方案复制到另一个根文件夹(都在我的Win7 64b计算机上),并将副本升级到VS2013(Professional)和.Net451,但是当我尝试在VS2013中调试Web应用程序时,出现“拒绝访问”错误(“未经授权” :由于服务器配置,登录失败。请根据提供的凭据和Web服务器上启用的身份验证方法,确认您有权查看此目录或页面。 I don't have this issue runing the original from VS2008 on the same machine. 我没有在同一台计算机上运行VS2008原始文件的问题。

Apart from the changes mentioned above the two are a straight code copy. 除了上述更改外,这两个是直接的代码副本。

In VS2008 the project Web properties are: Use Visual Studio Development Server, auto-assign port, Virtual path = / 在VS2008中,项目的Web属性为:使用Visual Studio开发服务器,自动分配端口,虚拟路径= /

In VS2013 the project Web properties are: Server=IIS Express, Project URL= http://localhost:63064/ (and I have clicked on Create Virtual Directory) 在VS2013中,项目的Web属性为:Server = IIS Express,项目URL = http:// localhost:63064 / (并且我单击了Create Virtual Directory)

I can see this must be some sort of security issue, but what extra needs to be done to get a VS2008 web app, upgraded to VS2013, to run within the VS2013 IDE? 我可以看到这一定是某种安全性问题,但是要使VS2008 Web应用程序升级到VS2013,以便在VS2013 IDE中运行,还需要做些什么?

Postscript: If I start the web app without debugging (ctrl-F5) I get "HTTP Error 503. The service is unavailable." 后记:如果我在未调试的情况下启动Web应用程序(ctrl-F5),则会收到“ HTTP错误503。该服务不可用”。

It turns out that the simple solution is configure the web app properties in VS2013 to use the local webserver (IIS) instead of IISExpress, and also to run VS2013 as administrator (but this is not necessary for VS2008). 事实证明,简单的解决方案是将VS2013中的Web应用程序属性配置为使用本地Web服务器(IIS)而不是IISExpress,并且以管理员身份运行VS2013(但这对于VS2008而言不是必需的)。 So obviously it is an IIS permissions thing but IIS is common and hasn't been changed - so what has changed in VS2013 to make this necessary? 因此,很明显,这是一个IIS权限问题,但是IIS是常见的并且没有更改-那么,VS2013中进行了哪些更改以使其必要? I don't really want to run VS2013 as administrator if I can avoid that. 如果可以避免的话,我真的不想以管理员身份运行VS2013。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM