我正在使用 HttpListener。我可以使用以下方法将身份验证模式设置为基本:listener.AuthenticationScheme = AuthenticationSchemes.Basic;
这在 IE 中有效,但 Google Chrome 似乎不喜欢空域。所以标题应该包含类似这样的内容:WWW-Authenticate: Basic realm="The Byte that Overflew the Stack"
但是,我找不到设置领域值的地方,并且 HttpListener 不允许您直接访问 WWW-Authenticate header key 。
有解决办法吗?
谢谢
最佳答案
一直在我眼皮底下:
listener.Realm = "溢出";
关于.net - 如何在 .Net HTTPListener Google Chrome 问题中为基本身份验证方案设置领域,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1683281/