WCF - RESTful 身份验证 - 始终收到 400 或 401 HTTP 响应
我正在使用 fiddler 生成对 TransportCredentialOnly(Basic) 服务的 RESTful 请求。如果我包含“授权:基本”行,我总是会收到错误 400 错误请求。否则,如果我忽略它,我会得到预期的 401。
通常当我看到 400 时,会有堆栈跟踪或一些线索来帮助我调试它,但在这种情况下什么也没有。我在这个问题上绕了一圈。 GUID+app_tracelog & app_tracelog 似乎没有更新或透露任何内容,并且在我的 service.config 文件中,
<serviceDebug includeExceptionDetailInFaults="True" />
对于大多数错误来说,它确实会产生堆栈跟踪。似乎身份验证子系统由于某种原因而变得不安,但我不知道为什么......
我在 fiddler 中的请求标头只有 Authorization: Basic [Base64 版本的 name;pass] 就是这样。
请指教!
I am using fiddler to generate a RESTful request to a TransportCredentialOnly(Basic) service. if I include the "Authorization: Basic" line, I always get an error 400 bad request. Otherwise, if I leave it out, I get the expected 401.
Usually when I see a 400 there is a stack trace, or some clue to help me debug it, but in this case nothing. I am going in circles on this one. The GUID+app_tracelog & app_tracelog don't seem to update or reveal anything, and in my service.config file I have
<serviceDebug includeExceptionDetailInFaults="True" />
Which for most errors does yield a stack trace. It would seem the auth subsystem is getting upset for some reason, but I have no clue why...
My request header in fiddler simply has Authorization: Basic [Base64 version of name;pass] and that's it.
Please advise!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
名称和密码应以冒号分隔,而不是分号。
Name and password should be separated by a colon, not a semi-colon.