Click here to Skip to main content
15,891,136 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
i am using


C#
User.identity.name


to get the windows user name and its working fine on localhost. when i host application on IIS on my machine only it throws some error.not sure what error it is as we cant debug and also the name bind using json so not getting any system crash or something. it just give console error that obj undefined. however from code line number i can predict that it is some thing releated to name only. my code is very long so cant post all things
Posted
Comments
Ahmed Bensaid 19-Feb-14 10:18am    
Do you have this in your web.config :
<system.web>
...
<authentication mode="Windows"></authentication>
...
</system.web>
ravikhoda 19-Feb-14 22:32pm    
yes i do.

1 solution

i have solved this by myself. i checked IIS setting and see that window and basic authentication features were not turn on my machine. now it is working fine.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900