asp.net mvc - Getting the right User.Identity -


i'm having little bit of trouble mvc httpcontext.user.identity i'm getting system.security.principal.windowsidentity , it's giving me name of windows user... don't want that, want (at first) null user.identity can use formsauthentication. how can prevent mvc use system.security.principal.windowsidentity show right user.identity? appreciated

    public actionresult index()     {         var s = httpcontext.user.identity.name; //         return view();     } 

in <system.web> section of web.config file, change forms authentication.

<authentication mode="forms">      <forms loginurl="~/account/login" timeout="2880" /> </authentication> 

Comments

Popular posts from this blog

javascript - DIV "hiding" when changing dropdown value -

Does Firefox offer AppleScript support to get URL of windows? -

android - How to install packaged app on Firefox for mobile? -