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

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'"..."

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.

"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'"...
>

Advertisements

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'"...
>>
>
>

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?

"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'"...
>>>

Share This Page

Welcome to The Coding Forums!

Welcome to the Coding Forums, the place to chat about anything related to programming and coding languages.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask questions about coding or chat with the community and help others.
Sign up now!