nested virtual directories

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

  1. #1

    Default nested virtual directories

    I am using the Fiefdom techniques ( a seperation of
    concerns pattern ).
    I have 2 asp.nET projects, each with their own virtual dir
    1. Esa.RefData.WebClient
    2. Esa.Common.WebClient

    Now, RefData.Webclient, needs to use sme user controsl
    from Common.WebClient.
    Hence, i copy thr dlls and ascx files to have a virtual
    dir structure like this:
    Esa.RefData.WebClient (vir dir)
    bin
    Esa.RefData.WebClient.dll
    Esa.Common.WebClient.dll
    Common.WebClient (folder, not a virdir)
    CommonUserControl.ascx
    TestPage.aspx

    TestPage.aspx has a tag like this on the top of the page:
    <%@ Register TagPrefix="uc1" TagName="TopMenu"
    Src="../Esa.Common.WebClient/CommonUserControl.ascx" %>



    When i try to access the page 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.

    Source Error:


    Line 44: by Microsoft that offers a single
    logon and core profile services for member sites.
    Line 45: -->
    Line 46: <authentication mode="Windows" />
    Line 47:
    Line 48: <!-- AUTHORIZATION




    This shouldwork, and its important it does to allow
    fiefdom based builds for a Web based project. The
    web.cnfig files have nothing different from a deafult one,
    and it work fine for everything except pages that
    reference the Common.WebClient user controls.


    Any idea?

    regards

    Gerard Webb
    Ged Guest

  2. Similar Questions and Discussions

    1. Creating Virtual Directories
      I'm building an application that will host many subdomains under one domain. Each subdomain will be created on the fly by a user for demo purposes....
    2. virtual directories in flex
      Hi. I am trying to create a virtual directory in Flex 1.5 on a Windows xp pro machine using the integrated jrun server. I found the documentatation...
    3. Virtual Directories?
      I have seen websites that use a sort of "virtual directory" system... Lets say when you click on something it goes to...
    4. virtual directories and IIS
      I created a new directory on my hard drive C:\test. I mapped a virtual directory called MyWeb to this directory. Now when I try to create an...
    5. Using virtual directories for common directories (scripts, images, styles, etc.)
      Hi, (sorry for the crosspost, I wasn't sure which was the best place to put this). I was just thinking about something and wondered if any of...
  3. #2

    Default RE: nested virtual directories

    Gerard,

    This error is caused by setting the authentication mode beneath the
    application root. You can have a web.config in a sub-folder, but that
    web.config cannot contain any element (such as the <authentication>
    element) which has an allowDefinition of MachineToApplication.

    The allowDefinition is specified in the machine.config file.

    Jim Cheshire [MSFT]
    MCP+I, MCSE, MCSD, MCDBA
    Microsoft Developer Support
    [email]jamesche@online.microsoft.com[/email]

    This post is provided "AS-IS" with no warranties and confers no rights.


    --------------------
    >Content-Class: urn:content-classes:message
    >From: "Ged" <gerard.webb@bllpharma.com>
    >Sender: "Ged" <gerard.webb@bllpharma.com>
    >Subject: nested virtual directories
    >Date: Mon, 16 Aug 2004 07:45:52 -0700
    >Lines: 63
    >Message-ID: <69cd01c4839f$ba47c180$a301280a@phx.gbl>
    >MIME-Version: 1.0
    >Content-Type: text/plain;
    > charset="iso-8859-1"
    >Content-Transfer-Encoding: 7bit
    >X-Newsreader: Microsoft CDO for Windows 2000
    >thread-index: AcSDn7pHhikOncdWRw2Gf/X2yiLs5g==
    >X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
    >Newsgroups: microsoft.public.dotnet.framework.aspnet.security
    >Path: cpmsftngxa06.phx.gbl
    >Xref: cpmsftngxa06.phx.gbl
    microsoft.public.dotnet.framework.aspnet.security: 11198
    >NNTP-Posting-Host: tk2msftngxa11.phx.gbl 10.40.1.163
    >X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.security
    >
    >I am using the Fiefdom techniques ( a seperation of
    >concerns pattern ).
    >I have 2 asp.nET projects, each with their own virtual dir
    >1. Esa.RefData.WebClient
    >2. Esa.Common.WebClient
    >
    >Now, RefData.Webclient, needs to use sme user controsl
    >from Common.WebClient.
    >Hence, i copy thr dlls and ascx files to have a virtual
    >dir structure like this:
    >Esa.RefData.WebClient (vir dir)
    > bin
    > Esa.RefData.WebClient.dll
    > Esa.Common.WebClient.dll
    > Common.WebClient (folder, not a virdir)
    > CommonUserControl.ascx
    > TestPage.aspx
    >
    >TestPage.aspx has a tag like this on the top of the page:
    ><%@ Register TagPrefix="uc1" TagName="TopMenu"
    >Src="../Esa.Common.WebClient/CommonUserControl.ascx" %>
    >
    >
    >
    >When i try to access the page 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.
    >
    >Source Error:
    >
    >
    >Line 44: by Microsoft that offers a single
    >logon and core profile services for member sites.
    >Line 45: -->
    >Line 46: <authentication mode="Windows" />
    >Line 47:
    >Line 48: <!-- AUTHORIZATION
    >
    >
    >
    >
    >This shouldwork, and its important it does to allow
    >fiefdom based builds for a Web based project. The
    >web.cnfig files have nothing different from a deafult one,
    >and it work fine for everything except pages that
    >reference the Common.WebClient user controls.
    >
    >
    >Any idea?
    >
    >regards
    >
    >Gerard Webb
    >
    Jim Cheshire [MSFT] Guest

  4. #3

    Default RE: nested virtual directories

    Jim,

    Thanks. i new about this, but i reasilsed it was caused by
    the way i was structuring my code.
    i hade the .ascxc and the .cs in the same folder.
    So, when i compiled it i ended up with 2 versions of the
    dll that represented the ascx.

    This confused the hell out of the framework at the aspnet
    level.

    By simply removng the usercontrol.cs file everything
    started working.

    It all works now very well.

    thanks for the prompt reply.
    Gerard
    >-----Original Message-----
    >Gerard,
    >
    >This error is caused by setting the authentication mode
    beneath the
    >application root. You can have a web.config in a sub-
    folder, but that
    >web.config cannot contain any element (such as the
    <authentication>
    >element) which has an allowDefinition of
    MachineToApplication.
    >
    >The allowDefinition is specified in the machine.config
    file.
    >
    >Jim Cheshire [MSFT]
    >MCP+I, MCSE, MCSD, MCDBA
    >Microsoft Developer Support
    >jamesche@online.microsoft.com
    >
    >This post is provided "AS-IS" with no warranties and
    confers no rights.
    >
    >
    >--------------------
    >>Content-Class: urn:content-classes:message
    >>From: "Ged" <gerard.webb@bllpharma.com>
    >>Sender: "Ged" <gerard.webb@bllpharma.com>
    >>Subject: nested virtual directories
    >>Date: Mon, 16 Aug 2004 07:45:52 -0700
    >>Lines: 63
    >>Message-ID: <69cd01c4839f$ba47c180$a301280a@phx.gbl>
    >>MIME-Version: 1.0
    >>Content-Type: text/plain;
    >> charset="iso-8859-1"
    >>Content-Transfer-Encoding: 7bit
    >>X-Newsreader: Microsoft CDO for Windows 2000
    >>thread-index: AcSDn7pHhikOncdWRw2Gf/X2yiLs5g==
    >>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
    >>Newsgroups:
    microsoft.public.dotnet.framework.aspnet.security
    >>Path: cpmsftngxa06.phx.gbl
    >>Xref: cpmsftngxa06.phx.gbl
    >microsoft.public.dotnet.framework.aspnet.security :11198
    >>NNTP-Posting-Host: tk2msftngxa11.phx.gbl 10.40.1.163
    >>X-Tomcat-NG:
    microsoft.public.dotnet.framework.aspnet.security
    >>
    >>I am using the Fiefdom techniques ( a seperation of
    >>concerns pattern ).
    >>I have 2 asp.nET projects, each with their own virtual
    dir
    >>1. Esa.RefData.WebClient
    >>2. Esa.Common.WebClient
    >>
    >>Now, RefData.Webclient, needs to use sme user controsl
    >>from Common.WebClient.
    >>Hence, i copy thr dlls and ascx files to have a virtual
    >>dir structure like this:
    >>Esa.RefData.WebClient (vir dir)
    >> bin
    >> Esa.RefData.WebClient.dll
    >> Esa.Common.WebClient.dll
    >> Common.WebClient (folder, not a virdir)
    >> CommonUserControl.ascx
    >> TestPage.aspx
    >>
    >>TestPage.aspx has a tag like this on the top of the page:
    >><%@ Register TagPrefix="uc1" TagName="TopMenu"
    >>Src="../Esa.Common.WebClient/CommonUserControl.ascx" %>
    >>
    >>
    >>
    >>When i try to access the page 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.
    >>
    >>Source Error:
    >>
    >>
    >>Line 44: by Microsoft that offers a single
    >>logon and core profile services for member sites.
    >>Line 45: -->
    >>Line 46: <authentication mode="Windows" />
    >>Line 47:
    >>Line 48: <!-- AUTHORIZATION
    >>
    >>
    >>
    >>
    >>This shouldwork, and its important it does to allow
    >>fiefdom based builds for a Web based project. The
    >>web.cnfig files have nothing different from a deafult
    one,
    >>and it work fine for everything except pages that
    >>reference the Common.WebClient user controls.
    >>
    >>
    >>Any idea?
    >>
    >>regards
    >>
    >>Gerard Webb
    >>
    >
    >.
    >
    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