Usercontrol in webforms subfolder

Discussion in 'ASP .Net' started by Lars Pedersen, Jul 6, 2003.

  1. Hi.

    I had a similar question here some days ago.....anyway..
    When in VS.Net adding a webform in a subfolder of the project, and adding a
    UserControl to this webform.
    Then after setting this webform as new startpage and debugging it, I get the
    Error:

    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.

    Source Error:

    Line 36: "Passport" and "None"
    Line 37: -->
    Line 38: <authentication mode="Windows" />
    Line 39:
    Line 40: <!-- APPLICATION-LEVEL TRACE LOGGING



    If I set the new subfolder as a Virtual Directory in IIS, there's another
    error:
    "Could not loade type 'Namespace.folder.class'"

    Does anyone know what is wrong here, because the webforms in the root of the
    project folder seems to run perfectly??

    -Lars
    Lars Pedersen, Jul 6, 2003
    #1
    1. Advertising

  2. Lars Pedersen

    Axel Dahmen Guest

    Does your web.config perhaps contain one or more <location> tags? There are some tags which may only be declared on the root level of your application.

    This is a flaw in the documentation. The <authentication> tag, for example, may not be used within a <location> branch of the web.config file.

    HTH,
    Axel Dahmen


    -------------------------------
    "Lars Pedersen" <> schrieb im Newsbeitrag news:...
    > Hi.
    >
    > I had a similar question here some days ago.....anyway..
    > When in VS.Net adding a webform in a subfolder of the project, and adding a
    > UserControl to this webform.
    > Then after setting this webform as new startpage and debugging it, I get the
    > Error:
    >
    > 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.
    >
    > Source Error:
    >
    > Line 36: "Passport" and "None"
    > Line 37: -->
    > Line 38: <authentication mode="Windows" />
    > Line 39:
    > Line 40: <!-- APPLICATION-LEVEL TRACE LOGGING
    >
    >
    >
    > If I set the new subfolder as a Virtual Directory in IIS, there's another
    > error:
    > "Could not loade type 'Namespace.folder.class'"
    >
    > Does anyone know what is wrong here, because the webforms in the root of the
    > project folder seems to run perfectly??
    >
    > -Lars
    >
    >
    Axel Dahmen, Jul 6, 2003
    #2
    1. Advertising

  3. I left the web.config untouched, and there are no location tags.

    -Lars
    "Axel Dahmen" <> skrev i en meddelelse
    news:...
    Does your web.config perhaps contain one or more <location> tags? There are
    some tags which may only be declared on the root level of your application.

    This is a flaw in the documentation. The <authentication> tag, for example,
    may not be used within a <location> branch of the web.config file.

    HTH,
    Axel Dahmen


    -------------------------------
    "Lars Pedersen" <> schrieb im Newsbeitrag
    news:...
    > Hi.
    >
    > I had a similar question here some days ago.....anyway..
    > When in VS.Net adding a webform in a subfolder of the project, and adding

    a
    > UserControl to this webform.
    > Then after setting this webform as new startpage and debugging it, I get

    the
    > Error:
    >
    > 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.
    >
    > Source Error:
    >
    > Line 36: "Passport" and "None"
    > Line 37: -->
    > Line 38: <authentication mode="Windows" />
    > Line 39:
    > Line 40: <!-- APPLICATION-LEVEL TRACE LOGGING
    >
    >
    >
    > If I set the new subfolder as a Virtual Directory in IIS, there's another
    > error:
    > "Could not loade type 'Namespace.folder.class'"
    >
    > Does anyone know what is wrong here, because the webforms in the root of

    the
    > project folder seems to run perfectly??
    >
    > -Lars
    >
    >
    Lars Pedersen, Jul 6, 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. huobazi
    Replies:
    1
    Views:
    683
    David Waz...
    Jul 3, 2003
  2. Rajesh Tiwari

    Can we use a usercontrol inside a usercontrol

    Rajesh Tiwari, Aug 12, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    410
    Rajesh Tiwari
    Aug 12, 2003
  3. nail
    Replies:
    0
    Views:
    1,539
  4. Phl
    Replies:
    2
    Views:
    521
    =?Utf-8?B?VGFtcGEgLk5FVCBLb2Rlcg==?=
    Nov 18, 2004
  5. =?Utf-8?B?aW5zdHJ1bw==?=

    .Net 2.0, UserControl in a subfolder won't compile

    =?Utf-8?B?aW5zdHJ1bw==?=, May 15, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    549
    PeterKellner
    May 16, 2006
Loading...

Share This Page