[英]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.