Usercontrol in webforms subfolder

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default 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='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 Guest

  2. Similar Questions and Discussions

    1. Event not firing in usercontrol inside usercontrol
      I'm stumped on this problem. I've created a user control that dynamically creates 5 linkbuttons in the CreateChildControls method. Each of these...
    2. CDONTS - WebForms - Pls Help
      I am hoping that someone can help me Here is what I want to do; I need to have a htm page that has text boxes that website visitors fill out...
    3. Use LoadControl to load a usercontrol but the webcontrol in the usercontrol can not AutoPostBack
      a uscontrol test.ascx have a dropdownlist web control the dropdownlist's AutoPostBack property is set "true" but when i use...
    4. HELP - WebForms as HttpResponseHandlers
      Hello All, I'm using the <httpHandlers> section of the web.config file to specify a webform class (WebForm1) that is the base class for...
    5. WebForms as HttpResponseHandlers?
      Hello All, I'm using the <httpHandlers> section of the web.config file to specify a webform class (WebForm1) that is the base class for...
  3. #2

    Default 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:OfERqg7QDHA.1988@TK2MSFTNGP12.phx.gbl...
    > 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 Guest

  4. #3

    Default Re: Usercontrol in webforms subfolder

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

    -Lars
    "Axel Dahmen" <NoSpam@NoOneKnows.de> skrev i en meddelelse
    news:eD73ju7QDHA.2276@TK2MSFTNGP12.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:OfERqg7QDHA.1988@TK2MSFTNGP12.phx.gbl...
    > 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 Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139