473,473 Members | 2,098 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Forms authentication problems

Way too many times while debugging I click a menu button to go to a page
which needs authentication to happen. The logon form is not shown. I have
closed VS2003, stopped IIS and restarted but to no avail.

Any ideas?

Lloyd Sheen
Nov 18 '05 #1
4 2320
Hi Lloyd,

Check this line in your code:

FormsAuthentication.SetAuthCookie(txtUserName.Text , True)

If the 2nd argument is True like mine is then the cookie is going to persist
across browser sessions. If it is set to False then you should have to log
in every time you close your browser and open it again. Good luck! Ken.

Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight

"Lloyd Sheen" <sq*******************@tostopspamhotmail.com> wrote in message
news:p_********************@rogers.com...
Way too many times while debugging I click a menu button to go to a page
which needs authentication to happen. The logon form is not shown. I have closed VS2003, stopped IIS and restarted but to no avail.

Any ideas?

Lloyd Sheen

Nov 18 '05 #2
I am using the ASPNET.StarterKit as the basis for the site. In the login
page there is no use of FormsAuthentication.SetAuthCookie but uses
FormsAuthentication.RedirectFromLoginPage(customer Id ,
RememberLogin.Checked)

I have used the RememberLogin.Checked as checked so imagine that the cookie
still exists. How other than deleting all cookies can I get rid of the
AuthCookie?

Lloyd Sheen
"Ken Dopierala Jr." <kd*********@wi.rr.com> wrote in message
news:ON*************@TK2MSFTNGP09.phx.gbl...
Hi Lloyd,

Check this line in your code:

FormsAuthentication.SetAuthCookie(txtUserName.Text , True)

If the 2nd argument is True like mine is then the cookie is going to
persist
across browser sessions. If it is set to False then you should have to
log
in every time you close your browser and open it again. Good luck! Ken.

Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight

"Lloyd Sheen" <sq*******************@tostopspamhotmail.com> wrote in
message
news:p_********************@rogers.com...
Way too many times while debugging I click a menu button to go to a page
which needs authentication to happen. The logon form is not shown. I

have
closed VS2003, stopped IIS and restarted but to no avail.

Any ideas?

Lloyd Sheen


Nov 18 '05 #3
Hi Lloyd,

You need to add a logout button to your app. That will clear the cookie
showing that the user is logged in:

Private Sub btnLogout_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnLogout.Click
FormsAuthentication.SignOut()
Response.Redirect("HomePage.aspx")
End Sub

Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight

"Lloyd Sheen" <sq*******************@tostopspamhotmail.com> wrote in message
news:OL********************@rogers.com...
I am using the ASPNET.StarterKit as the basis for the site. In the login
page there is no use of FormsAuthentication.SetAuthCookie but uses
FormsAuthentication.RedirectFromLoginPage(customer Id ,
RememberLogin.Checked)

I have used the RememberLogin.Checked as checked so imagine that the cookie still exists. How other than deleting all cookies can I get rid of the
AuthCookie?

Lloyd Sheen
"Ken Dopierala Jr." <kd*********@wi.rr.com> wrote in message
news:ON*************@TK2MSFTNGP09.phx.gbl...
Hi Lloyd,

Check this line in your code:

FormsAuthentication.SetAuthCookie(txtUserName.Text , True)

If the 2nd argument is True like mine is then the cookie is going to
persist
across browser sessions. If it is set to False then you should have to
log
in every time you close your browser and open it again. Good luck! Ken.
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight

"Lloyd Sheen" <sq*******************@tostopspamhotmail.com> wrote in
message
news:p_********************@rogers.com...
Way too many times while debugging I click a menu button to go to a page which needs authentication to happen. The logon form is not shown. I

have
closed VS2003, stopped IIS and restarted but to no avail.

Any ideas?

Lloyd Sheen



Nov 18 '05 #4
Thanks, that does it.

Lloyd Sheen
"Ken Dopierala Jr." <kd*********@wi.rr.com> wrote in message
news:%2***************@TK2MSFTNGP15.phx.gbl...
Hi Lloyd,

You need to add a logout button to your app. That will clear the cookie
showing that the user is logged in:

Private Sub btnLogout_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles btnLogout.Click
FormsAuthentication.SignOut()
Response.Redirect("HomePage.aspx")
End Sub

Good luck! Ken.

--
Ken Dopierala Jr.
For great ASP.Net web hosting try:
http://www.webhost4life.com/default.asp?refid=Spinlight

"Lloyd Sheen" <sq*******************@tostopspamhotmail.com> wrote in
message
news:OL********************@rogers.com...
I am using the ASPNET.StarterKit as the basis for the site. In the login
page there is no use of FormsAuthentication.SetAuthCookie but uses
FormsAuthentication.RedirectFromLoginPage(customer Id ,
RememberLogin.Checked)

I have used the RememberLogin.Checked as checked so imagine that the

cookie
still exists. How other than deleting all cookies can I get rid of the
AuthCookie?

Lloyd Sheen
"Ken Dopierala Jr." <kd*********@wi.rr.com> wrote in message
news:ON*************@TK2MSFTNGP09.phx.gbl...
> Hi Lloyd,
>
> Check this line in your code:
>
> FormsAuthentication.SetAuthCookie(txtUserName.Text , True)
>
> If the 2nd argument is True like mine is then the cookie is going to
> persist
> across browser sessions. If it is set to False then you should have to
> log
> in every time you close your browser and open it again. Good luck! Ken. >
> Ken Dopierala Jr.
> For great ASP.Net web hosting try:
> http://www.webhost4life.com/default.asp?refid=Spinlight
>
> "Lloyd Sheen" <sq*******************@tostopspamhotmail.com> wrote in
> message
> news:p_********************@rogers.com...
>> Way too many times while debugging I click a menu button to go to a page >> which needs authentication to happen. The logon form is not shown. I
> have
>> closed VS2003, stopped IIS and restarted but to no avail.
>>
>> Any ideas?
>>
>> Lloyd Sheen
>>
>>
>
>



Nov 18 '05 #5

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

Similar topics

0
by: Michael Brandt Lassen | last post by:
Hi gurus This problem is about calling Web services secured by Forms Authentication from Windows Forms user controls embedded in HTML. Using the object tag I’ve managed to include a Windows...
11
by: ElmoWatson | last post by:
I tried on the Security newgroup, as well as other places, and haven't gotten an answer yet - - I'm pulling my hair out over this one. I'm trying to get Forms Authentication working.....I can get...
2
by: VR | last post by:
Hi, I am using Forms type of authentication, but having problems redirecting users to default page after they get authenticated. My default page is default.aspx, but it's in 'public'...
0
by: Dotnet Guy | last post by:
I have set up forms authentication for my web application. I have several subdirectories inside a main directory and I have forms authentication for each of my sub directories. In the logon page...
1
by: Gareth | last post by:
I have an ASP.NET application using forms authentication. I works without any problems. I have been trying to enable the login process to work over SSL but it fails with the same problem...
2
by: Mike | last post by:
1. For some reason after the session has ended and the authentication cookie has expired I'm not being redirected to the login page. Insted I'm be assigned a new authentication cookie? Anyone have...
4
by: Lewis Edward Moten III | last post by:
I have a file that users can download through a web page protected by forms authentication: Download.aspx?ID=45 and within that file ... FileInfo fileToDownload = new FileInfo(fileName);
7
by: Justin | last post by:
I am trying to password protect a subdirectory using forms authentication. I am using the "Location" tag to specify the directory to be protected. The login.aspx page is in the root directory of...
5
by: Sebastian | last post by:
Hello, I am attempting to share forms authentication between two applications but running into problems. The documentation I've been able to dig up says (to summarize) if the the Web.Config...
1
by: n33470 | last post by:
Hi all, We have an asp.net 1.1 app that we're in the process of converting to 2.0. What I'm about to describe runs just great in the 1.1 framework, but does not work in the 2.0 framework. ...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.