Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Feb 02, 2013 05:31 AM by moquamar
Member
46 Points
149 Posts
Feb 02, 2013 01:53 AM|LINK
When I run my app on the server (http://MyServer/MyDev/Default.aspx) it returns machinename\ASPNET which I display on the page.
If I run this app on my local then it is fine.
Here is the code I am using to get the user name:
if (User.Identity.IsAuthenticated) { lblUserID.Text = User.Identity.Name; } else { lblUserID.Text = "No user identity available."; }
All-Star
31651 Points
6468 Posts
Feb 02, 2013 01:58 AM|LINK
try change authentication mode to form in web.config
<authentication mode="Forms">
<system.web> <authentication mode="Forms"> <forms forms="401kApp" loginUrl="/login.aspx" /> </authentication> </system.web>
Feb 02, 2013 04:16 AM|LINK
I don't want to use another page for login (login.aspx). The user is already logged on to his computer and wants to run this web application which needs his or her log on user id for some processing.
Feb 02, 2013 05:31 AM|LINK
oned_gk try change authentication mode to form in web.config <authentication mode="Forms"> <system.web> <authentication mode="Forms"> <forms forms="401kApp" loginUrl="/login.aspx" /> </authentication> </system.web> The Authentication mode was alread set to "Forms" in web.config
The Authentication mode was alread set to "Forms" in web.config
moquamar
Member
46 Points
149 Posts
Logged In User ID in Web App Returns machinename\ASPNET
Feb 02, 2013 01:53 AM|LINK
When I run my app on the server (http://MyServer/MyDev/Default.aspx) it returns machinename\ASPNET which I display on the page.
If I run this app on my local then it is fine.
Here is the code I am using to get the user name:
if (User.Identity.IsAuthenticated) { lblUserID.Text = User.Identity.Name; } else { lblUserID.Text = "No user identity available."; }oned_gk
All-Star
31651 Points
6468 Posts
Re: Logged In User ID in Web App Returns machinename\ASPNET
Feb 02, 2013 01:58 AM|LINK
try change authentication mode to form in web.config
<system.web> <authentication mode="Forms"> <forms forms="401kApp" loginUrl="/login.aspx" /> </authentication> </system.web>moquamar
Member
46 Points
149 Posts
Re: Logged In User ID in Web App Returns machinename\ASPNET
Feb 02, 2013 04:16 AM|LINK
I don't want to use another page for login (login.aspx). The user is already logged on to his computer and wants to run this web application which needs his or her log on user id for some processing.
moquamar
Member
46 Points
149 Posts
Re: Logged In User ID in Web App Returns machinename\ASPNET
Feb 02, 2013 05:31 AM|LINK