authentication - Fiddler HTTP/1.1 401 未经授权

标签 authentication asp.net-web-api authorization fiddler

我有不通过本地 IIS 运行的本地 Web API 项目。要运行该项目,我在 Visual Studio 2013 中使用 F5。

使用 Fiddler,我不断得到:

HTTP/1.1 401 Unauthorized

#   Result  Protocol    Host    URL Body    Caching Content-Type    Process Comments    Custom  88  401 HTTP    localhost:52787 /api/values 6,180   private text/html; charset=utf-8    fiddler:10724           

我知道我应该得到 200,但我没有。我应该在哪里检查我做错了什么?

这是来自浏览器的屏幕截图。当我回到 Fiddler 查看结果时,我得到了这个,我只需输入 http://localhost:52787/api/helloapi进入 URL(在浏览器中)并按 Enter:

enter image description here

这是我通过 Fiddler 手动编写 GET 时得到的结果:

enter image description here

我已选中自动身份验证选项。

最佳答案

当您说“使用 Fiddler”时,您到底是什么意思?

如果您使用 Fiddler 的 手动编写请求作曲 ,或者添加一个 Authorization标题自己,或单击 Composer 的 选项 选项卡并检查 Automatically Authenticate盒子。

关于authentication - Fiddler HTTP/1.1 401 未经授权,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26350033/

相关文章:

c# - Angular 如何在 WebApi asp.net mvc 中工作

asp.net-web-api - 网络 API : 500 error after short timeout

asp.net - 多项目模板引用损坏

java - 如何在 android 中为 google api 交换 OAuth2 token 的授权码?

linux - 使文件夹对 Linux 中的几个选定用户可见

javascript - 如何在 Node 服务器上强制用户从服务器端注销并对Web应用程序使用react?

authentication - 使用2个表的CakePHP Auth组件

c# - asp.net core authorization - 操作授权处理程序

java - 身份验证请求失败 : Bad credentials [LDAP: error code 49 - data 52e, v1db1]

javax.net.ssl.SSLProtocolException : Handshake message sequence violation, 2