By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,537 Members | 1,743 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,537 IT Pros & Developers. It's quick & easy.

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

P: n/a
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...WebApplication
http://mydomain.org/FirstPublication...ageApplication

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...ageApplication
) . 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
Jun 12 '07 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Hello ke*****@nospam.nospam,

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

Jun 13 '07 #2

P: n/a
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" <ne*****@msn.comwrote in message
news:a2***************************@msnews.microsof t.com...
Hello ke*****@nospam.nospam,

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


Jun 13 '07 #3

P: n/a
Hello ke*****@nospam.nospam,
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?...llowDefinition
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" <ne*****@msn.comwrote in message
news:a2***************************@msnews.microsof t.com...
>Hello ke*****@nospam.nospam,

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

Jun 14 '07 #4

This discussion thread is closed

Replies have been disabled for this discussion.