开发者

how do you capture httpcontext user information in your controller code when using visual studio

i asked this question which allowed me to capture user by using:

string userName = this.HttpContext.User.Identity.Name;

in my controller code.

One issue i have is that wh开发者_运维百科en testing in visual studio it shows up as an empty string. I want to track this field for my testing.

Is there anyway to have this work in the local ASP.net webserver process on my machine so it it will mimic windows authentication on my server ??


Run application under IIS and set windows authentication in web.config.

    <authentication mode="Windows">
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜