ASP.NET HTTP Authorization Header

后端 未结 3 1260
悲哀的现实
悲哀的现实 2020-12-24 02:19

I would like to know why my asp.net application will not add the header to my post when it is named \'Authorization\' but will work fine when I change one character, say \"A

3条回答
  •  清歌不尽
    2020-12-24 02:42

    For HTTP Basic Authorization, you should be using the Credentials property.

    req.Credentials = new NetworkCredential("DDSServices", "jCole2011");

    This should do what you want. Rather than setting the Authorization header.

提交回复
热议问题