Ask a Question related to ASP.NET Security, Design and Development.
-
ryan_fagan #1
Forms Authentication - GenericPrincipal- How to use web.config configuration
MSDN has good articles that explains how to use GenericPrincipal
objects with forms authentication. For instance,
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnnetsec/html/SecNetHT04.asp[/url]
However, in each of the examples I have seen, they do not use the
values that are specified in the web.config for forms authentication.
For instance the code below creates the cookie with an expiration of
60. I want to use the value in the web.config as configured in
FormsAuthentication. However, this information is not exposed by the
System.Web.Configuration objects or the FormsAuthentication objects.
Does anyone know a good way to access that data?
// Create the authentication ticket
FormsAuthenticationTicket authTicket = new
FormsAuthenticationTicket(
1, // version
txtUserName.Text, // user name
DateTime.Now, // creation
DateTime.Now.AddMinutes(60),// Expiration
false, // Persistent
roles ); // User data
ryan_fagan Guest
-
Configuration Error using Forms Authentication
I am authenticating users with a database table. I am using Forms Authentication, and I am able to login, but when I want to register I get this... -
Doubt in Forms authentication configuration settings
In Asp.net forms authentication. In order to restrict certain files from anonymous users the settings in web.config should be <deny users="?"/>... -
Machine.config Configuration Error
I've recently moved web hosts to Network Solutions (Sorry to drop names), and I'm now getting the following error... Configuration Error... -
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... -
web.config Configuration Error when deploy
Hi, I develop a Asp.net application using VS.NET and It work well on my computer . but when I deploy the application to another IIS runming...



Reply With Quote

