Re: ASP application using ASP.NET Forms Authentication
- From: Leandro David <leandrodvd@xxxxxxxxx>
- Date: Tue, 12 Jun 2007 19:29:10 -0000
Hi, here I am again,
I´m trying to do the form authentication, but it´s not working.
What I did:
After doing an authentication in a login.asp file, it redirects the
user to login.aspx file just to do an automatic Form Authentication.
The redirect URL used in login.asp is "login.aspx?
ReturnUrl=admin_default.asp". I used the ReturnUrl because I want to
redirect to this page after doing the automatic Form Authentication
The login.aspx file contain this simple code :
<%@Page Language="VB" %>
<%@Import Namespace="System.Web.Security" %>
<script language="VB" runat="server">
Sub Page_Load(objSender As Object, objArgs As EventArgs)
FormsAuthentication.RedirectFromLoginPage("DotNetLogin", False)
End Sub
</script>
and this is my web.config :
<configuration xmlns="http://schemas.microsoft.com/.NetConfiguration/
v2.0">
<system.web>
<customErrors mode="Off" />
<authentication mode="Forms">
<forms loginUrl="http://localhost/principal/default.asp"
protection="All" timeout="15" />
</authentication>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</configuration>
I also configured in IIS a mapping to the aspnet_isapi.dll
for .html, .htm and .pdf files.
Ok, after loging in at login.asp , the user is correctly redirected to
login.aspx and then to admin_default.asp , and so it can open all
the .asp files but, when I try to open an user html or pdf file it
just redirects to the login page like if it is not really
authenticated.
What am I forgetting ? Is the
FormsAuthentication.RedirectFromLoginPage() method enough for creating
the cookie authentication ? Do I need anything else ?
Thanks Again
Leandro David
.
- References:
- ASP application using ASP.NET Forms Authentication
- From: Leandro David
- Re: ASP application using ASP.NET Forms Authentication
- From: Dominick Baier
- ASP application using ASP.NET Forms Authentication
- Prev by Date: Re: AzMan scope level application groups seem to be br ...
- Next by Date: Re: accessing IWA secured website from Mac?
- Previous by thread: Re: ASP application using ASP.NET Forms Authentication
- Next by thread: Error Hosting ASP.NET 2.0 though UNC
- Index(es):
Relevant Pages
|
|