When using FormsAuthentication you can make it Persistent cookie..i.e. what happens when you select Remember Me checkbox..
e..g
FormsAuthentication.Redire
or
FormsAuthentication.SetAut
Main Topics
Browse All TopicsHow can I save a user name and password so that when the user opens their browser again, I can retreive that information and sign them in automatically?
I'm using ASP .NET 2.0 w/ C#
and using Form Authentication for logging in a user.
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
yes....you use either of that when the user first tries to Login using username/password.
The First One will redirect automatically to Default page or some requested secured page upon login.
When using Second ...you have to explicitly redirect like:
FormsAuthentication.SetAut
Response.Redirect("To somepage.aspx");
Check this for more info:
http://msdn.microsoft.com/
try removing <allow users="*"/>
<authorization>
<deny users="?"/>
</authorization>
Secondly set breakpoints at line:
33 and 35 ..see which statement is hit..
Third thing: When using FormsAuthentication.Redire
line 37 Response.Redirect("welcome
If you need Line 37....
then change
FormsAuthentication.Redire
FormsAuthentication.SetAut
Just drag and drop "LoginName" and LoginStatus Controls on your next Page
for css yes...You will have to add explicit permission to all uses for Css file
add this to your web.config ...
<configuration>
.....
<system.web>
.................
</system.web>
.....
<location path="CustomerFolder">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
</configuration>
Did you set breakpoints and see whats happening...
Did you try placing LoginName/LoginStatus on your next page that follows on login
Got this error setting up the webconfig file
Parser Error Message: It is an error to use a section registered as allowDefinition='MachineTo
Line 110: <authentication mode="Forms">
ok,
Do I have to set all my admin pages in 1 sub folder?
or can I set my admin pages in mutliple sub folders.
I have HR subfolder and also an admin folder.
HR has some admin pages that u authorization t see and all of admin pages need authorization.
Can this be achieved or should I put al lin 1 sub folder?
you can put the pages in subfolder ...
You cannot use authentication in sub-web.config but you can use authorization in sub-web.config
So set authorization for each sub-folder accordingly.
Also are you planning to put sub-folder HR withing the Admin folder or just a separate folder within the root..?
It doesn't matter though where you put as long as it has proper authorization rules.
Add a web.config to your sub-folders...
<configuration>
<system.web>
<authorization>
<deny users="?"/> //this will deny anonymous access
</authorization>
</system.web>
</configuration>
Note:
1: You just want to deny anonymous access correct ? If you want to add roles you will have to modify above rules
2: If it is just anonymous access and no roles then in that case--> if your root web.config is denying anonymous access your sub-folder are by default secure from anonymous users and in that case you don't need this second web.config.
you can set authorization rules per page using <location...> as mentioned earlier in css case....
Check this for more info:
http://weblogs.asp.net/gur
Try it and see... it should...
also you through the link I provided earlier ...
It shows how to set different attributes for FormsAuthentication.
One important to note is "timeout" you can set it to too high value ..default is 30 min.
This along with Persistent should do the job....but again client should be accepting cookies.
Business Accounts
Answer for Membership
by: sybePosted on 2009-08-25 at 08:35:47ID: 25178684
It is the browser that does that. Store some stuff in a cookie. Could be a long unique random string that identifies the user in the database.