Ask a Question related to ASP.NET Security, Design and Development.
-
Justin Morris via DotNetMonster.com #1
sessions and forms authentication tickets
When implementing ASP.NET forms authentication everything worked out just
fine. I wanted to add the UserID and UserFName to my usage so I would have
this information throughout their session without having to return to the
database. I am upgrading from ASP so my first thought is Session(?UserID?)
which works fine if the user stays in the same folder (members). But if
they click a link outside that folder and return to that folder the Session
values I had set are now gone.
I use the return path code so when they click the login link it takes them
to the default.aspx login page without logging in again. Like I said
earlier, when they login the Session values work, and if they click links
in the same folder (members) the Session values work, but if they go to
another folder and return to the members folder the Session values are gone.
Should I not use Session(?Value?)? How can I add other values to the
FormsAuth Ticket we created and use in my pages to display User Name?
--
Message posted via [url]http://www.dotnetmonster.com[/url]
Justin Morris via DotNetMonster.com Guest
-
Accessing htm files without authentication (forms authentication)
I have application with forms authentication. All works fine. When user opens .aspx file gets login form, login and then get the .aspx page. But... -
ASP.Net Forms authentication with basic authentication popup
Relatively new to ASP.Net but have a strange problem. My site uses forms authentication for a large administration section however after the user... -
Forms authentication then redirection to a secure web with NT authentication?
Hi, I want to allow access to particular secured intranet web sites. These intranet are stored in sharepoint (2003 version) Actually I've... -
Authentication ticket, cookieless, forms authentication?
Hi. I want to use Forms Authentication, cookieless. The issue is setting the Authentication Ticket without using cookies (!) That is, the... -
Sessions, authentication and $_SERVER
I'm trying to understand sessions and authentication. I gathered that the only way of preserving data across script invocations was to use a... -
Paul Glavich [MVP ASP.NET] #2
Re: sessions and forms authentication tickets
You can easily add custom data to an auth cookie by using the following:
FormsAuthenticationTicket ticket = new FormsAuthenticationTicket(
1,
email,
System.DateTime.Now,
System.DateTime.Now.AddMinutes(30),
false, // not persistent
userData, // <-- THIS CAN BE A STRING OF YOUR CUSTOM DATA, PERHAPS
SEMI-COLON DELIMITED.
FormsAuthentication.FormsCookiePath);
Note: the 'userdata' variable which is of type string.
--
- Paul Glavich
ASP.NET MVP
ASPInsider ([url]www.aspinsiders.com[/url])
"Justin Morris via DotNetMonster.com" <forum@nospam.DotNetMonster.com> wrote
in message news:a6cbd5f34654423a9537afe03f335fa1@DotNetMonste r.com...have> When implementing ASP.NET forms authentication everything worked out just
> fine. I wanted to add the UserID and UserFName to my usage so I wouldSession(?UserID?)> this information throughout their session without having to return to the
> database. I am upgrading from ASP so my first thought isSession> which works fine if the user stays in the same folder (members). But if
> they click a link outside that folder and return to that folder thegone.> values I had set are now gone.
>
> I use the return path code so when they click the login link it takes them
> to the default.aspx login page without logging in again. Like I said
> earlier, when they login the Session values work, and if they click links
> in the same folder (members) the Session values work, but if they go to
> another folder and return to the members folder the Session values are>
> Should I not use Session(?Value?)? How can I add other values to the
> FormsAuth Ticket we created and use in my pages to display User Name?
>
> --
> Message posted via [url]http://www.dotnetmonster.com[/url]
Paul Glavich [MVP ASP.NET] Guest



Reply With Quote

