Multiple applications/multiple web.configs: how to structure a big collection of (seemingly) nested

Discussion in 'ASP .Net' started by Guest, Jun 12, 2007.

  1. Guest

    Guest Guest

    I'm seeking (probably basic) guidance on the right way to split a large site
    that's supposed to represent one domain(mydomain.org) into many small VS.NET
    projects, and how to avoid issues with multiple web.config files leading to
    the error: "It is an error to use a section registered as allowDefinition =
    'MachineToApplication'"...

    I'm fairly new to VS.NET and my sloppy first solution was to make one huge
    solution/project with just one web.config. My development got very slow due
    to long compile times. It has become clear to me that this is not the right
    way to work with VS.NET and compiled web applications. I need guidance for
    how other professionals structure a large collection of related web
    applications and deploy that properly on IIS.

    One thing that led me to make the
    huge-single-project-and-solution-with-just-one-web.config was issues I had
    had in the past when I nested a web.config file past a root directory. It
    led to errors such as ""It is an error to use a section registered as
    allowDefinition = 'MachineToApplication'"..."

    What I need is
    a) To be able to develop and deploy many web applications that are nested
    from the user's/URLs point of view, e.g.:
    http://mydomain.org/FirstPublication
    http://mydomain.org/FirstPublication/PhotoWebApplication
    http://mydomain.org/FirstPublication/PhotoWebApplication/SpecializedImageApplication

    b) To be able to develop those web applications as small projects so that
    they compile very quickly.

    c) To be able to have them reference my common ORM class framework. At the
    just-concluded Tech Ed 2007 a very smart guy from Singapore named Boon
    taught me how to compile my ORM as a seperate class library and reference it
    from other projects. I think that's the solution right there, and I write it
    here for the benefit of other folks using EntitySpaces and other ORMs and
    who are wondering how to address slow compile times.

    d) To avoid the dreaded error: ""It is an error to use a section registered
    as allowDefinition = 'MachineToApplication'"..."

    As I was drinking my morning coffee it occured to me that maybe the way out
    of this problem was through IIS and IIS's use of virtual paths when I
    deploy: a "flat" directory structure might be translatable into a directory
    structure that apper as nested to the user (e.g.
    http://mydomain.org/FirstPublication/PhotoWebApplication/SpecializedImageApplication
    ) . I am not altogether too familiar with IIS virtual paths, which may have
    invited these problems in the first place.

    I work in an development shop of one, and I maintain a MSFT server
    infrastructure all by my onesome, so it is difficult to draw on peer
    expertise. Be my peers. :)

    Many thanks for any help you can offer.

    -KF
     
    Guest, Jun 12, 2007
    #1
    1. Advertising

  2. Hello am,

    Why not to provide the web.config for the each project folder and put all
    common stuff to the global web.config which is locates next to the machine.config?

    ---
    WBR, Michael Nemtsev [.NET/C# MVP].
    My blog: http://spaces.live.com/laflour
    Team blog: http://devkids.blogspot.com/

    "The greatest danger for most of us is not that our aim is too high and we
    miss it, but that it is too low and we reach it" (c) Michelangelo

    > I'm seeking (probably basic) guidance on the right way to split a
    > large site that's supposed to represent one domain(mydomain.org) into
    > many small VS.NET projects, and how to avoid issues with multiple
    > web.config files leading to the error: "It is an error to use a
    > section registered as allowDefinition = 'MachineToApplication'"...
    >
     
    Michael Nemtsev, Jun 13, 2007
    #2
    1. Advertising

  3. Guest

    Guest Guest

    Thank you Michael. My stupid response: I didn't realize this was possible.
    It sounds like an excellent solution.

    But what defines the "globalness" of the global web.config? In other words,
    what contents in that global web.config file raise the "It is an error to
    use a
    section registered as allowDefinition = 'MachineToApplication'" error? What
    declarative markup should I +not+ put in subordinate, non-global,
    per-project web.config files?

    If there is good documentation on the right way to structure multi-project
    solutions, it would be great if someone could point me to them, many
    thanks. I've been working in various ways with ASP.NET for more than two
    years, and the "right" arrangement of projects in a solution has only
    recently become clearer to me. For people who did not come into VS.NET
    through a traditional developer background, the metaphors aren't intuitive.
    Some folks are apt to analogize to the file management typical of a tool
    like Dreamweaver. As they try to organize bigger sites and collections of
    applications in the context of common code (e.g. my ORM classes) they will
    unwittingly make some suboptimum choices, as I have.

    -KF


    "Michael Nemtsev" <> wrote in message
    news:...
    > Hello am,
    >
    > Why not to provide the web.config for the each project folder and put all
    > common stuff to the global web.config which is locates next to the
    > machine.config?
    >
    > ---
    > WBR, Michael Nemtsev [.NET/C# MVP]. My blog:
    > http://spaces.live.com/laflour
    > Team blog: http://devkids.blogspot.com/
    >
    > "The greatest danger for most of us is not that our aim is too high and we
    > miss it, but that it is too low and we reach it" (c) Michelangelo
    >
    >> I'm seeking (probably basic) guidance on the right way to split a
    >> large site that's supposed to represent one domain(mydomain.org) into
    >> many small VS.NET projects, and how to avoid issues with multiple
    >> web.config files leading to the error: "It is an error to use a
    >> section registered as allowDefinition = 'MachineToApplication'"...
    >>

    >
    >
     
    Guest, Jun 13, 2007
    #3
  4. Hello am,

    > But what defines the "globalness" of the global web.config? In other
    > words, what contents in that global web.config file raise the "It is an

    error
    > to use a section registered as allowDefinition = 'MachineToApplication'"
    > error? What declarative markup should I +not+ put in subordinate, non-global,
    > per-project web.config files?


    have u tried to search this error ?
    see ther http://search.live.com/results.aspx...o use a section registered as allowDefinition

    > If there is good documentation on the right way to structure
    > multi-project solutions, it would be great if someone could point me
    > to them, many thanks.


    See there http://msdn2.microsoft.com/en-us/library/aa302436.aspx
    and there http://support.microsoft.com/kb/815174

    ---
    WBR, Michael Nemtsev [.NET/C# MVP].
    My blog: http://spaces.live.com/laflour
    Team blog: http://devkids.blogspot.com/

    "The greatest danger for most of us is not that our aim is too high and we
    miss it, but that it is too low and we reach it" (c) Michelangelo


    > "Michael Nemtsev" <> wrote in message
    > news:...
    >
    >> Hello am,
    >>
    >> Why not to provide the web.config for the each project folder and put
    >> all common stuff to the global web.config which is locates next to
    >> the machine.config?
    >>
    >> ---
    >> WBR, Michael Nemtsev [.NET/C# MVP]. My blog:
    >> http://spaces.live.com/laflour
    >> Team blog: http://devkids.blogspot.com/
    >> "The greatest danger for most of us is not that our aim is too high
    >> and we miss it, but that it is too low and we reach it" (c)
    >> Michelangelo
    >>
    >>> I'm seeking (probably basic) guidance on the right way to split a
    >>> large site that's supposed to represent one domain(mydomain.org)
    >>> into many small VS.NET projects, and how to avoid issues with
    >>> multiple web.config files leading to the error: "It is an error to
    >>> use a section registered as allowDefinition =
    >>> 'MachineToApplication'"...
    >>>
     
    Michael Nemtsev, Jun 14, 2007
    #4
    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. Øyvind Isaksen
    Replies:
    1
    Views:
    982
    Øyvind Isaksen
    May 18, 2007
  2. Shaguf
    Replies:
    0
    Views:
    363
    Shaguf
    Dec 24, 2008
  3. Shaguf
    Replies:
    0
    Views:
    458
    Shaguf
    Dec 26, 2008
  4. Shaguf
    Replies:
    0
    Views:
    244
    Shaguf
    Dec 26, 2008
  5. Shaguf
    Replies:
    0
    Views:
    220
    Shaguf
    Dec 24, 2008
Loading...

Share This Page