需要ASP.NET开发服务器意外的认证 [英] ASP.NET Development Server unexpected Authentication required

查看:184
本文介绍了需要ASP.NET开发服务器意外的认证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个本地主机端口基于网页(使用ASP.NET开发服务器Web服务 - MSVS2k8 WebDev.WebServer.exe )时,通过访问的正常工作浏览器(Chrome浏览35或IE 11),但它目前没有,当我通过 Web客户端(通过DotLisp或LinqPad)或MSTest的。

I have a localhost port based web page (a web service using the ASP.NET Development Server - MSVS2k8 WebDev.WebServer.exe) that works correctly when accessed via a browser (either Chrome 35 or IE 11), but it is currently failing when I access it via WebClient (via DotLisp or LinqPad) or MSTest.

这是一个Win8.1 64位机器上,仍然使用Visual Studio 2008。

This is on a Win8.1 64-bit machine, still using Visual Studio 2008.

我已经重新启动,但问题仍然存在,尽管这在今天早些时候进行的工作。我也跑了Visual Studio中以管理员身份,而不是

I have rebooted but the problem remains, even though this was working earlier today. I have also ran Visual Studio as Administrator and not.

详细内容:

异常信息:System.Net.WebException
  消息:远程服务器返回错误:(401)未经授权。
  目标:字节[] DownloadDataInternal(的System.Uri,System.Net.WebRequest为ByRef)
  来源:系统

Exception: System.Net.WebException Message: The remote server returned an error: (401) Unauthorized. Target: Byte[] DownloadDataInternal(System.Uri, System.Net.WebRequest ByRef) Source: System

简体调用code:

 (def (get-web-page url)
  (with-dispose
   (wc (WebClient.)
    b (wc.DownloadData url)
    m (MemoryStream. b false)
    s (StreamReader. m))
   s.Peek
   s.ReadToEnd))

LinqPad:

LinqPad:

Using wc = New WebClient
  Dim twp = wc.DownloadString("http://localhost:20147/")'TestServers.aspx")
  twp.Dump
End Using

(我也使用运行测试,而不是调试测试中,以更新code覆盖或一些与该组件的尝试是失败的有趣的方式时,有一个问题,但我相信这是无关上述的问题,不同的是在试图解决这个问题可能已以某种方式使我改变造成上述问题中的设置。)

(I also have a problem when using Run Test instead of Debug Test, where the attempt to update assemblies for Code Coverage or something related to that is failing in "interesting" ways. But I believe this is unrelated to the above problem, except that attempting to solve this issue may have somehow caused me to change the settings that caused the above issue.)

推荐答案

我不知道该设置如何改变,和/或为什么它的工作,否则前面,但关闭的 NTLM验证修复问题

I don't know how the settings changed, and/or why it was working earlier otherwise, but turning off NTLM Authentication fixes the problem.

具体来说,右键单击在Solution Explorer Web项目>属性页>启动选项,然后取消选择NTLM身份验证,然后单击确定。

Specifically, right clicking the web project in the Solution Explorer > Property Pages > Start Options and uncheck NTLM Authentication and click OK.

这篇关于需要ASP.NET开发服务器意外的认证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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