473,382 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Question about SetAuthCookie

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

Nov 18 '05 #1
0 1269

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: | last post by:
Hi! 1st: when I debug this: FormsAuthentication.SetAuthCookie(email.Text, RememberCheckbox.Checked) and set a breakpoint a line after
1
by: Strange Cat | last post by:
Hi everyone! I have a weird problem with FormsAuthentication. I have an app that works just fine with FormsAuthentication. The user requests the homepage, he is redirected to login page,...
1
by: Tyson Brown | last post by:
All We recently started writing a couple encrypted values to the user's cookie using FormsAuthentication.Encrypt. Such as: Dim tmpTicket1 As New FormsAuthenticationTicket(1, "TEST", Date.Now,...
0
by: fadi | last post by:
Hopefully someone seen this and knows best way around it. When using FormsAuthentication and using FormsAuthentication.SetAuthCookie, ASP.NET creates a cookie similar to the domain URL. For...
8
by: Bill Henning | last post by:
Another developer and I have noticed that after upgrading to the ASP.NET 2.0 RTM release, when using: FormsAuthentication.SetAuthCookie(userName, true) That the cookie is no longer persisted,...
1
by: Alan Silver | last post by:
Hello, I have a site protected by forms authentication, and when the user logs in, I do the following... FormsAuthentication.SetAuthCookie(txtUsername.Text, chkRemember.Checked); where...
0
by: mavrick_101 | last post by:
I have a login page and after validating user credentials I set the FormsAuthentication.SetAuthCookie(username,false); and then redirect the user to a different page. This works often but some...
2
by: Cirene | last post by:
FormsAuthentication.SetAuthCookie works fine in IE7, but not in IE6. Any idea why? Any alternative to FormsAuthentication.SetAuthCookie? Here's my code: ...
1
by: Cirene | last post by:
I try doing this in my code... FormsAuthentication.SetAuthCookie(Convert.ToString(Request("lexusername") & ""), True) Response.Redirect("customer/ViewCalendar.aspx") ' only authenticated...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.