Usercontrol in webforms subfolder

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Lars Pedersen

    Usercontrol in webforms subfolder

    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 ='MachineToAppl ication' 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: <authenticati on 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.fold er.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

    #2
    Re: Usercontrol in webforms subfolder

    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" <lsp@wanadoo.dk > schrieb im Newsbeitrag news:OfERqg7QDH A.1988@TK2MSFTN GP12.phx.gbl...[color=blue]
    > 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 ='MachineToAppl ication' 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: <authenticati on 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.fold er.class'"
    >
    > Does anyone know what is wrong here, because the webforms in the root of the
    > project folder seems to run perfectly??
    >
    > -Lars
    >
    > [/color]

    Comment

    • Lars Pedersen

      #3
      Re: Usercontrol in webforms subfolder

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

      -Lars
      "Axel Dahmen" <NoSpam@NoOneKn ows.de> skrev i en meddelelse
      news:eD73ju7QDH A.2276@TK2MSFTN GP12.phx.gbl...
      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" <lsp@wanadoo.dk > schrieb im Newsbeitrag
      news:OfERqg7QDH A.1988@TK2MSFTN GP12.phx.gbl...[color=blue]
      > 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[/color]
      a[color=blue]
      > UserControl to this webform.
      > Then after setting this webform as new startpage and debugging it, I get[/color]
      the[color=blue]
      > Error:
      >
      > Parser Error Message: It is an error to use a section registered as
      > allowDefinition ='MachineToAppl ication' beyond application level. This[/color]
      error[color=blue]
      > can be caused by a virtual directory not being configured as an[/color]
      application[color=blue]
      > in IIS.
      >
      > Source Error:
      >
      > Line 36: "Passport" and "None"
      > Line 37: -->
      > Line 38: <authenticati on 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.fold er.class'"
      >
      > Does anyone know what is wrong here, because the webforms in the root of[/color]
      the[color=blue]
      > project folder seems to run perfectly??
      >
      > -Lars
      >
      >[/color]


      Comment

      Working...