473,805 Members | 2,099 Online
Bytes | Software Development & Data Engineering Community
+ 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 2350
Hi Lloyd,

Check this line in your code:

FormsAuthentica tion.SetAuthCoo kie(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************ *******@tostops pamhotmail.com> wrote in message
news:p_******** ************@ro gers.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.StarterK it as the basis for the site. In the login
page there is no use of FormsAuthentica tion.SetAuthCoo kie but uses
FormsAuthentica tion.RedirectFr omLoginPage(cus tomerId ,
RememberLogin.C hecked)

I have used the RememberLogin.C hecked 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******** *****@TK2MSFTNG P09.phx.gbl...
Hi Lloyd,

Check this line in your code:

FormsAuthentica tion.SetAuthCoo kie(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************ *******@tostops pamhotmail.com> wrote in
message
news:p_******** ************@ro gers.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.EventArg s) Handles btnLogout.Click
FormsAuthentica tion.SignOut()
Response.Redire ct("HomePage.as px")
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************ *******@tostops pamhotmail.com> wrote in message
news:OL******** ************@ro gers.com...
I am using the ASPNET.StarterK it as the basis for the site. In the login
page there is no use of FormsAuthentica tion.SetAuthCoo kie but uses
FormsAuthentica tion.RedirectFr omLoginPage(cus tomerId ,
RememberLogin.C hecked)

I have used the RememberLogin.C hecked 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******** *****@TK2MSFTNG P09.phx.gbl...
Hi Lloyd,

Check this line in your code:

FormsAuthentica tion.SetAuthCoo kie(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************ *******@tostops pamhotmail.com> wrote in
message
news:p_******** ************@ro gers.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******** *******@TK2MSFT NGP15.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.EventArg s) Handles btnLogout.Click
FormsAuthentica tion.SignOut()
Response.Redire ct("HomePage.as px")
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************ *******@tostops pamhotmail.com> wrote in
message
news:OL******** ************@ro gers.com...
I am using the ASPNET.StarterK it as the basis for the site. In the login
page there is no use of FormsAuthentica tion.SetAuthCoo kie but uses
FormsAuthentica tion.RedirectFr omLoginPage(cus tomerId ,
RememberLogin.C hecked)

I have used the RememberLogin.C hecked 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******** *****@TK2MSFTNG P09.phx.gbl...
> Hi Lloyd,
>
> Check this line in your code:
>
> FormsAuthentica tion.SetAuthCoo kie(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************ *******@tostops pamhotmail.com> wrote in
> message
> news:p_******** ************@ro gers.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
1667
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 Forms user control in my HTML page (a .NET alternative to good old ActiveX). I’d like to use my control to call web-services instead of using behaviours (webservices.htc).
11
3612
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 any requested page to automatically go to the Login.aspx page, AND, the ReturnURL querystring is correct in the address bar, but no matter what, I can't get it, once the user is authenticated, to redirect to the new page. It ALWAYS refreshes the...
2
1496
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' directory in realtion to my virtual directory: "/public/default.aspx". In IIS I set the default document to be "/public/default.aspx".
0
270
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 when the user is authenticated, I have FormsAuthentication.RedirectFromLoginPage(txtLogonid.Text, False) And in the web.config files of my subdirectory, I have
1
1760
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 everytime: "Access is denied". I have created my own SSL certificate and enabled SSL encryption on a sub-directory of the web site called "/IRWebAdmin/secure". In this directory is my "AdminLogin.aspx" page. In the root directory is my...
2
386
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 any ideas as to what may be causing this? (I'm using Microsoft's example 2. I'm also transferring a forms authentication cookie recieved from a web service (SQL Reporting Services) thru my app to the client. For some reason the expired cookie is...
4
2502
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
2049
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 the app. Here is the web.config: <location path="Admin"> <system.web> <authentication mode="Forms"> <forms name="authAdmin" loginUrl="Login.aspx" protection="All" timeout="30"> <credentials passwordFormat="Clear"> <user name="Admin"...
5
1524
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 settings are the same between the apps they should work happily together. The only difference I have between the apps Web.Config settings is their <forms> loginUrl, which isn't supposed to make a difference. App1 Web.Config: <authentication...
1
6454
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. This app uses forms authentication and denies all unauthenticated users. There is a location override in the web.config so that we can open up a directory for unauthenticated users to create a login account. There is only 1 web.config in the...
0
9718
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10614
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10369
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10109
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9186
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5678
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4327
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 we have to send another system
2
3847
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3008
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.