简体   繁体   English

当请求来自我的局域网之外时,IIS会从http请求中删除Authorization标头

[英]IIS removes Authorization header from the http request, when the request is from outside my LAN

I have an IIS 7.5 on Windows Server 2008 R2. 我在Windows Server 2008 R2上有一个IIS 7.5。 It has the Basic, Anonymous and Windows Authentication modes enabled. 它启用了基本,匿名和Windows身份验证模式。 I have hosted a restful WCF service in it. 我已经在其中托管了一个宁静的WCF服务。

I make an http request with Authorization header from my client within the LAN/VPN, all goes well. 我从局域网/ VPN中的客户端发出带有Authorization标头的http请求,一切顺利。 On the service side I could see that the OperationContext.Current.IncomingMessageHeaders contains the Authorization header with the right value. 在服务端,我可以看到OperationContext.Current.IncomingMessageHeaders包含具有正确值的Authorization标头。

When I attempt to do the same from outside the LAN/VPN, (I used a different Internet connection and also a public proxy), the OperationContext.Current.IncomingMessageHeaders seems to have missing Authorization header. 当我尝试从LAN / VPN外部执行相同操作时(我使用了不同的Internet连接,也使用了公共代理), OperationContext.Current.IncomingMessageHeaders似乎缺少Authorization标头。

I am unsure as to what exactly removes the header. 我不确定到底是什么删除了标题。 I suspect a misconfigured IIS. 我怀疑IIS配置错误。 Any clues? 有什么线索吗?

如果您希望服务按照问题似乎总是进行Windows身份验证,请在IIS中删除禁用所有其他身份验证模式,则来自LAN的请求正在传递,可能是因为请求该请求的人来自Internet中的同一域(简单地说)将采用最少要求的身份验证模式,在这种情况下将为匿名模式。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 IIS如何阻止来自浏览器的HTTP请求 - IIS How to block http request from browser 使用 WCF 的 Http 请求中缺少授权 Header - Authorization Header is missing in Http request using WCF 如何从wcf请求拦截器获取Authorization标头 - How to Get the Authorization header from wcf request interceptor 来自IIS的基于自定义逻辑的转发请求 - Forward request from IIS based on custom logic 从Silverlight客户端调用WCF服务时,没有HTTP请求发生 - No HTTP request occurs when calling WCF Service from Silverlight client Fiddler - 更改HTTP请求标头 - Fiddler - Change HTTP Request Header 客户端身份验证方案“匿名”未授权HTTP请求。 从服务器收到的身份验证标头为“基本” - The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Basic HTTP 请求未经授权,客户端身份验证方案为“匿名”。 从服务器收到的身份验证标头是“基本领域” - The HTTP request is unauthorized with client authentication scheme 'Anonymous'. The authentication header received from the server was 'Basic Realm’ “HTTP 请求未经客户端身份验证方案‘协商’未经授权。从服务器收到的身份验证标头为‘协商’” - "The HTTP request is unauthorized with client authentication scheme 'Negotiate'. The authentication header received from the server was 'Negotiate'" HTTP 请求未经授权,客户端身份验证方案为“基本”。 从服务器收到的身份验证标头是“协商,NTLM” - The HTTP request is unauthorized with client authentication scheme 'Basic'. The authentication header received from the server was 'Negotiate,NTLM'
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM