Ask a Question related to ASP.NET Security, Design and Development.
-
David C. Taylor #1
Problem with Forms Authentication
I have an application using FormsAuthentication that does
not persist the authentication cookie beyond the session
so each time a user starts a session they must go through
the login page. On this login page I set a couple of
session variables while I am making the database trip for
authentication. This all works fine without any problems.
Now, I have the requirement to provide an option for a
user to 'Remember Me' using a checkbox and persisting the
cookie. The result is that users that take this option
will bypass the login page and the setting of the
necessary session variables. I decided to write the data
to the cookie as the FormsAuthenticationTicket.UserData
property and then retrieve it. I am using the MSDN
documentation for that property and the example shows how
to retrieve that value using this code in VB.Net:
Dim id As FormsIdentity = CType(User.Identity,
FormsIdentity)
Dim ticket As FormsAuthenticationTicket = id.Ticket
userData.Text = ticket.UserData
However, when I run this code I get an Invalid Cast
Exception on the first line.
I need to know how to make this type conversion work, why
it is not working, or just a workaround for this issue.
Thanks for any help,
David C. Taylor, MCP
David C. Taylor Guest
-
Problem in forms authentication
Hi friends, We have an web application which contains several folders & we are trying to implement forms authentication. Login page for the... -
forms authentication problem
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... -
Forms Authentication problem with IsAuthenticated
Hello All, I am trying to set up forms authentication for an ASP.NET web site. I programmed quite a bit of stuff with custom IPrincipal and... -
Forms Authentication Problem with WebRequest (Tried Everything)
Hello, all, I have done my homework, but I can not get my webrequest to access a page which is protected by forms authentication. As other... -
ssl with <forms authentication> and loginurl problem
Hi, I've configured SSL with server certificates on a IIS with W2K. Itested it ans works with simple html pages. I want the login page to be under...



Reply With Quote

