VS 2013中的本地调试问题(HTTP错误401.0-未经授权) [英] Issue with Local Debug in VS 2013 (HTTP Error 401.0 - Unauthorized)

查看:113
本文介绍了VS 2013中的本地调试问题(HTTP错误401.0-未经授权)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现了一个奇怪的问题,不确定如何解决.

我从台式机和笔记本电脑上的TFS中提取了一个解决方案.

I found a strange issue and I'm not sure how to solve it.

I pulled a solution from TFS on both my Desktop and Laptop.

在两者上,当我在VS 2013中调试解决方案时,都会出现以下错误:

On both, when I debug the solution in VS 2013, I get the following error:

HTTP Error 401.0 - Unauthorized You do not have permission to view this directory or page.

相同的代码在VS 2012中可以正常运行.

在桌面上,如果我先在VS 2012中进行调试,然后停止调试,则可以在VS 2013中成功调试,直到关闭VS2012.

在笔记本电脑上,如果我尝试相同的技巧,则会收到错误消息,表明VS无法启动IIS Express Web服务器,因为该端口已在使用中.

所以看来,当我在VS 2012中进行调试时,正在传递某些凭据,而在VS 2013中却没有传递(我猜是因为处理方式发生了一些变化?).

那么,发生了什么变化?如何更新解决方案,以便VS 2013可以在不先进行VS 2012调试的情况下进行调试?

The same code runs properly in VS 2012.

On the Desktop, if I debug it in VS 2012 first, then stop debugging I can debug successfully in VS 2013 until I close VS 2012.

On the laptop, if I try the same trick, I get an error that VS is unable to launch the IIS Express Web server because the port is already in use.

So it seems that when I debug in VS 2012 some credentials are being passed that are not being passed in VS 2013 (I'm guessing because of some change in the way this is handled?).

So what changed, and how can I update the solution so that VS 2013 can debug without first debugging in VS 2012?

注意: 我也在这里的StackOverflow上问过这个问题

NOTE: I've also asked this question at StackOverflow here

推荐答案

Bleak,

只是为了清楚地说明这个问题,这个应用程序是在VS2012还是VS2013之前创建的?您是说要在同一台计算机上安装VS2012和VS2013?

Just to make this issue clearly, whether this app was created in VS2012 or VS2013 before? Do you mean that you install VS2012 and VS2013 in the same machine?

如果您表示可以连接到TFS并将该项目加载到本地,则使用哪个VS版本进行连接?由于它在VS2012中运行良好,您可以使用VS2013连接到TFS并再次加载该项目吗?也许你可以运行你的 VS作为管理员并调试您的应用.

If you mean that you could connect to TFS and load this project to your locally, which VS version are you using to connect to it? Since it worked well in VS2012, could you use the VS2013 connect to TFS and load this project again? Maybe you could run your VS as the admin and debug your app.

为确保这不是VS2013 IDE问题,请在本地创建一个简单的应用程序,然后再次对其进行调试.如果效果很好,那么我们可以确保它不是VS IDE/设置问题.

To make sure that it is not the VS2013 IDE issue, please create a simple app locally, and then debug it again. If it worked well, so we could make sure that it is not the VS IDE/setup issue.

此外,如果此应用是在VS2012等旧版本中创建的,然后又想在VS2013中对其进行调试,则也许可以在VS2012上更改某些设置,例如,更改平台目标和.net Framework,然后清理并重建它 应用程序.

In addition, if this app was created in old version like the VS2012, and then you want to debug it in VS2013, maybe you could change some settings as the VS2012, for example, change the platform target and .net Framework, and then clean and rebuild this app.

如果您有其他VS2013计算机,则可以再次调试它,如果它在其他计算机上运行良好,我的意思是仅特定的VS2013会出现此问题,恐怕是环境问题.当然,如果您没有其他VS2013计算机,则可以 给我一个简单的示例,我将在VS2013中对其进行调试.

If you have other VS2013 machine, you could debug it again, if it worked well in other machine, I mean that just the specific VS2013 has this issue, I’m afraid that it is the Environment issue. Of course, if you don’t have other VS2013 machine, you could share me a simple sample, I will debug it in my VS2013.

由于该端口已在使用中,VS无法启动IIS Express Web服务器.

该问题似乎与网络应用有关,对吗?我发现了两个关于类似问题的主题,如果可能的话,您可以参考它们.

It seems that this issue is related to the web app, am I right? I found two threads about the similar issue, if possible, you could refer them.

http://stackoverflow.com/questions/14660366/unable-to-launch-web -服务器

http://stackoverflow.com/questions/18454751 /无法启动iis-express-web-server-error

基于错误消息,我也可以在ASP.net论坛中得到类似的问题,因此,如果它是Web应用程序,我的建议是您可以将此问题发布到 ASP.net 论坛,在那里您可以获得专门的支持.

Based on the error message, I also could get the similar issue in the ASP.net forum, so if it is the web app, my suggestion is that you could post this issue to the ASP.net forum, and there you could get dedicated support.

如果有任何疑问,请随时告诉我.

If there's any concern, please feel free to let me know.

最好的问候


这篇关于VS 2013中的本地调试问题(HTTP错误401.0-未经授权)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆