More than one login page/web.config files

Discussion in 'ASP .Net' started by Guest, Aug 20, 2005.

  1. Guest

    Guest Guest

    Hi

    I'm building an asp.net application with forms authentication. I need to
    have 2 login pages and I guess therefore also 2 web.config files (one in the
    main application folder and another in a new subfolder to handle their
    associated web forms in each folderlevel). But I get this errormessage:

    Description: An error occurred during the processing of a
    configuration file required to service this request. Please review the
    specific error details below and modify your configuration file
    appropriately.

    Parser Error Message: It is an error to use a section registered as
    allowDefinition='MachineToApplication' beyond application level. This
    error can be caused by a virtual directory not being configured as an
    application in IIS.

    How do I fix this problem? I'm using the IIS in Windows XP as my "developing
    IIS", the finish application will run on a IIS 6 server.

    Thanks
    "Namespace"
     
    Guest, Aug 20, 2005
    #1
    1. Advertisements

  2. Guest

    jasonkester Guest

    It sounds like the built in forms authentication model doesn't exactly
    fit your application. Looks like you'll have to roll some if it
    yourself. It's pretty simple.

    I personally never use FormsAuthentication straight out of the box. I
    tend to derive a handful of Page objects that I use as the base for my
    webforms. These know how to pull user context from the
    FormsAuthentication model, check security, and redirect to a login page
    by themself.

    There are plenty of reasons to roll your own Page objects, and custom
    security is just a small example. In this case, it would add maybe 10
    lines of code to the YourSecurePage object.

    Good luck!

    Jason Kester
    Expat Software Consulting Services
    http://www.expatsoftware.com/
     
    jasonkester, Aug 20, 2005
    #2
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.