Question about SetAuthCookie

D

Danny Ni

Hi,

I am using Forms based authtication to authenticate users, I have a login
page which take user account and password then post them to a form that
queries the database, if succcessful I set the authentication cookie, here
is the code:

FormsAuthentication.SetAuthCookie(strEmail, False)
Respone.Redirect("MainMenu.aspx")

This work when I use the URL with localhost but not my machine name. Say my
machine name is NC4000 and the web application name is timecard.

http://localhost/timecard works. Both Request.isAuthenticated and
user.identity.isauthenticated returns true.
http://nc4000/timecard does not work. Both Request.isAuthenticated and
user.identity.isauthenticated returns false.

I use the same browser on the same machine(my machine) to test both URLs.

Any Ideas?

Thanks in Advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top