开发者

How to set realm for Basic Authentication Scheme in .Net HTTPListener Google Chrome issue

开发者 https://www.devze.com 2022-12-11 03:56 出处:网络
I\'m working with an HttpListener.I can set the Authentication mode to basic using: listener.AuthenticationScheme = AuthenticationSchemes.Basic;

I'm working with an HttpListener. I can set the Authentication mode to basic using: listener.AuthenticationScheme = AuthenticationSchemes.Basic;

This works in IE, but Google Chrome doesn't seem to like empty realms. So the header should contain something like: WWW-A开发者_高级运维uthenticate: Basic realm="The Byte that Overflew the Stack"

However, I can't find a place to set the realm value and HttpListener does not allow you to directly access the WWW-Authenticate header key.

Is there a way around this?

thx


under my nose the whole time:

listener.Realm = "Overflow";

0

精彩评论

暂无评论...
验证码 换一张
取 消