web.config authentication problem

Discussion in 'ASP .Net' started by Mr. x, Dec 13, 2003.

  1. Mr. x

    Mr. x Guest

    I have in the web.config file something like this :

    <configuration>
    <system.web>
    <authentication mode="Forms">
    <forms name=".ASPXAUTH" loginUrl="main.aspx" protection="All"
    timeout="1" path="/" requireSSL="false" slidingExpiration="true">
    </forms>
    <passport redirectUrl="internal" />
    </authentication>
    </system.web>
    </configuration>

    When I try to open main.aspx I get the error :
    Configuration Error
    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.

    The same error is on my computer, and also on hosting computer.

    Why ?

    Thanks :)
    Mr. x, Dec 13, 2003
    #1
    1. Advertising

  2. Mr. x wrote:

    > I have in the web.config file something like this :
    >
    > <configuration>
    > <system.web>
    > <authentication mode="Forms">
    > <forms name=".ASPXAUTH" loginUrl="main.aspx" protection="All"
    > timeout="1" path="/" requireSSL="false" slidingExpiration="true">
    > </forms>
    > <passport redirectUrl="internal" />
    > </authentication>
    > </system.web>
    > </configuration>
    >
    > When I try to open main.aspx I get the error :
    > Configuration Error
    > 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.
    >
    > The same error is on my computer, and also on hosting computer.
    >
    > Why ?
    >
    > Thanks :)
    >
    >

    Do you have a virtual directory setup for the directory this .config is
    in? You can't have the authentication section you've shown defined in a
    subdirectory that isn't also setup as a web app (virtual directory in IIS).

    --
    Craig Deelsnyder
    Microsoft MVP - ASP/ASP.NET
    Craig Deelsnyder, Dec 13, 2003
    #2
    1. Advertising

  3. Mr. x

    Mr. x Guest

    Craig Deelsnyder Wrote :

    > Do you have a virtual directory setup for the directory this .config is
    > in? You can't have the authentication section you've shown defined in a
    > subdirectory that isn't also setup as a web app (virtual directory in

    IIS).
    >
    > --


    Well, I have web.config on the main directory,
    and also on the sub-directory.

    The kind of problem I am talking about, is for sub-directory : when I put
    web.config on the sub directory.
    How can I set the sub directory ?
    Can you lead me to some help about it, please ?

    Thanks :)
    Mr. x, Dec 13, 2003
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Benny Ng
    Replies:
    9
    Views:
    9,941
    Benny Ng
    Oct 13, 2005
  2. CSharpner
    Replies:
    0
    Views:
    1,013
    CSharpner
    Apr 9, 2007
  3. Shailesh

    web.config and authentication problem.

    Shailesh, Jun 10, 2004, in forum: ASP .Net Security
    Replies:
    2
    Views:
    171
    Shailesh
    Jun 11, 2004
  4. Shailesh

    web.config and authentication problem.

    Shailesh, Jun 10, 2004, in forum: ASP .Net Security
    Replies:
    0
    Views:
    114
    Shailesh
    Jun 10, 2004
  5. Mr. x

    web.config authentication problem

    Mr. x, Dec 13, 2003, in forum: ASP .Net Web Controls
    Replies:
    0
    Views:
    159
    Mr. x
    Dec 13, 2003
Loading...

Share This Page