Fiddler HTTP/1.1 401未经授权

4 authentication authorization fiddler asp.net-web-api

我有本地Web API项目,它不通过本地IIS运行.要运行该项目,我在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           
Run Code Online (Sandbox Code Playgroud)

我知道我应该得到200但我不是.我应该在哪里查看我做错了什么?

这是浏览器的屏幕截图.当我回到Fiddler查看结果时,我得到了这个,我只需输入http://localhost:52787/api/helloapiURL(在浏览器中)并输入:

在此输入图像描述

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

在此输入图像描述

我有选中自动验证选项.

Eri*_*Law 9

当你说"使用Fiddler"时,你究竟是什么意思?

如果您使用Fiddler的Composer手动编写请求,请自行添加Authorization标题,或单击Composer的" 选项"选项卡并选中该Automatically Authenticate复选框.