why loginName control can not display logged user name after a successful log in?

this question is related to the thread I posted before as:

How to compile and publish my application which developed in VWD 2008 into website? 

my project is create a website for user to submit their online request, in login page, there has a login control for user to login,if username and password are correct, main page appears, there has a loginName control to display logged user name. a few user account has been created in ASP.net web site administrator tools in VWD 2008.

my problem is: in internet, if using http://localhost/myVirtualDir/login.aspx , after log in with admin account user name and password, in main page, admin user name can be displayed in loginName account, if I use computer name instead of localhost as http://myComputerName/myVirtualDir/login.aspx, after log in with admin account , no admin user name appears on loginName control in main page, website say login is related to ASP.NET membership and forms authentication to verify user's information, all users acount in my application are saved in a database  table.

does the problem related to ASP.NET membership configurations? what configuration I need to set, I found an article talking about memebreship configuration in http://support.discountasp.net/KB/a337/how-to-configure-aspnet-20-membershiproles-provider.aspx

I have not tried it yet, may I know anybody encounter the same problem before? pls advise, thanks in advance. I paste this enquiry as a new thread here and hope to attract more concentration, I am sorry for that if it against the rules in the forum. I am looking for solutions. thanks.

0
suanleba
2/5/2009 10:19:20 AM
asp.net.security 27051 articles. 1 followers. Follow

3 Replies
2073 Views

Similar Articles

[PageSpeed] 37

Hi,Suanleba

I will recommend you to debug into the code.

Check this:

Debugging ASP.NET Web Applications During Development

Regards


Andrew Zhu
Microsoft online ASP.NET support
Please remember to click “Mark as Answer” on the post that helps you. This can be beneficial to other community members reading the thread.
0
Andrew
2/10/2009 10:03:15 AM

assuming u are successfully authenticated using form-based method, use this to display the user name;

lblCurrentUser.text = HttpContext.Current.User.Identity.Name

 

 

 


gregale.NET, implico.de

0
Gregale
2/10/2009 10:16:23 AM

I think it was not authenticated successful, even apply admin account (which is created in asp.net web site admin tools before) to log in, no particular button appears ( only appears when admin log in, defined in code behind), I tried all the account( which were defined in asp.net web site admin tools) to log in, there are no logged user name shows at all, it seems all account are treated as anonymous account during authetification.

why no problem when run with localhost in URL, but problem occures with computername in URL?

I think it's related to ASP.net membership authentification, but anybody knows clearly how's the set up during website deployment?

purpose of user name display:

after logged in main page, the logged user name are used to retrieving data from database table to display all the previous applications which are submitted by the individual user, so the user name is connected to database. 

 

0
suanleba
2/16/2009 9:15:09 AM
Reply: