Re: Forms Auth and codebehind

From: Mads Jacobsen (mads.jacobsen@pol.dk)
Date: 01/23/03


From: "Mads Jacobsen" <mads.jacobsen@pol.dk>
Date: Thu, 23 Jan 2003 08:21:49 +0100


I have the page directive:

<%@ Page language="c#" Codebehind="Logon.aspx.cs" AutoEventWireup="false"
Inherits="Polfoto.Logon" %>

and the error I get is:

*****
Server Error in '/Polfoto' Application.
----------------------------------------------------------------------------

----
Parser Error
Description: An error occurred during the parsing of a resource required to
service this request. Please review the following specific parse error
details and modify your source file appropriately.
Parser Error Message: Could not load type 'Polfoto.Logon'.
Source Error:
Line 1:  <%@ Page language="c#" Codebehind="Logon.aspx.cs"
AutoEventWireup="false" Inherits="Polfoto.Logon" %>
Line 2:  <script runat="server">
Line 3:    private void btnLogon_Click(object sender, System.EventArgs e)
Source File: D:\Wwwroot\Polfoto_dk\Polfoto\Logon.aspx    Line: 1
*****
Logon.aspx is in the <root>/Polfoto/Logon.aspx and the web.config of course
is in in <root>/Polfoto/web.config. In the IIS I have:
- made <root>/Polfoto an application
- removed Windows Integrated Security from <root>/Polfoto dir
The page will load if I remove Inherits="Polfoto.Logon" from the page
directive, but then I can't use the code behind...
Hope to get help on this...
Regards,
Mads
"Adam Kinney" <quemark@hotmail.com> skrev i en meddelelse
news:erL4e4kwCHA.2668@TK2MSFTNGP12...
> Whats the error, or what doesn't work about it?
>
>
> "Mads Jacobsen" <mads.jacobsen@pol.dk> wrote in message
> news:OJFtuYjwCHA.1620@TK2MSFTNGP11...
> > Hi,
> >
> > Does anyone know why I can't use codebehind when trying to use Forms
> > authentication?
> >
> > In my web.config, i have the lines:
> >
> > <authentication mode="Forms">
> >   <forms name="Logon" loginUrl="Logon.aspx" />
> > </authentication>
> >
> > <authorization>
> >   <deny users="?" />
> > </authorization>
> >
> > I'm using VS.NET, and I have never tried having Forms authentication
work.
> > This time i really have to...
> >
> > Regards,
> > Mads
> >
> >
> >
>
>


Relevant Pages

  • Re: Parser error
    ... I get the message cannot load type XXXX.Global... ... details and modify your source file appropriately. ... Parser Error Message: ... Line 3: <HTML> ...
    (microsoft.public.dotnet.framework.aspnet)
  • Could not load Type ... Error
    ... Server Error in '/' Application. ... details and modify your source file appropriately. ... Parser Error Message: Could not load type 'E_Business.WebForm1'. ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • could load type
    ... If I hit anything in the root folder then everything seems to be working ... details and modify your source file appropriately. ... Parser Error Message: Could not load type 'blueconnect.admin.login'. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: could load type
    ... > If I hit anything in the root folder then everything seems to be working ... > details and modify your source file appropriately. ... > Parser Error Message: Could not load type 'blueconnect.admin.login'. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Parser error
    ... > I keep getting the parser error, and I have no idea why. ... > 4)recreating the virtual dir in IIS ... > details and modify your source file appropriately. ... > Parser Error Message: ...
    (microsoft.public.dotnet.framework.aspnet)