469,283 Members | 2,303 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,283 developers. It's quick & easy.

Custom Configuration at Application Directory Level

In reading MSDN docs on creating custom Configuration sections, I found this
page:

http://msdn.microsoft.com/library/de...ionhandler.asp

At the very bottom, it says:

Configuration File
This element can be used in the application configuration file, machine
configuration file (Machine.config), and Web.config files that are not at the
application directory level.

What do they mean by "Web.config files that are not at the application
directory level." I thought this was the whole point of custom web.config
sections. If I have a web service running in

http://myserver/MyWebService/myEndpoint.asmx

Does this mean I can't define a custom configuration section in a web config
at:

http://myserver/MyWebService/web.config
Thanks in advance,
Mike
Nov 19 '05 #1
5 2061
Hi, rdcpro.

You can have web.config files, which determine
how the Application responds, in subdirectories
of the Application.

You could have different web.config files in *every*
subdirectory of the Application if you so wished or needed.

OTOH, you can only have one global.asax for the Application.


Juan T. Llibre
ASP.NET MVP
===========
"rdcpro" <rd****@community.nospam> wrote in message
news:61**********************************@microsof t.com...
In reading MSDN docs on creating custom Configuration sections, I found
this
page:

http://msdn.microsoft.com/library/de...ionhandler.asp

At the very bottom, it says:

Configuration File
This element can be used in the application configuration file, machine
configuration file (Machine.config), and Web.config files that are not at
the
application directory level.

What do they mean by "Web.config files that are not at the application
directory level." I thought this was the whole point of custom web.config
sections. If I have a web service running in

http://myserver/MyWebService/myEndpoint.asmx

Does this mean I can't define a custom configuration section in a web
config
at:

http://myserver/MyWebService/web.config
Thanks in advance,
Mike

Nov 19 '05 #2
On Mon, 24 Jan 2005 16:39:03 -0800, rdcpro <rd****@community.nospam> wrote:
In reading MSDN docs on creating custom Configuration sections, I found
this
page:

http://msdn.microsoft.com/library/de...ionhandler.asp

At the very bottom, it says:

Configuration File
This element can be used in the application configuration file, machine
configuration file (Machine.config), and Web.config files that are not
at the
application directory level.

What do they mean by "Web.config files that are not at the application
directory level." I thought this was the whole point of custom
web.config
sections. If I have a web service running in

http://myserver/MyWebService/myEndpoint.asmx

Does this mean I can't define a custom configuration section in a web
config
at:

http://myserver/MyWebService/web.config
Thanks in advance,
Mike


I think they mean 'application configuration file' can be web.config, as
it's the app config file for a web app. Then, in addition, you can use it
in web.config files in subdirectories of a web app. A little confusing,
but they're trying to cover web and windows apps in one sentence (page).

--
Craig Deelsnyder
Microsoft MVP - ASP/ASP.NET
Nov 19 '05 #3
Hi Mike,

The
=================
Configuration File
This element can be used in the application configuration file, machine
configuration file (Machine.config), and Web.config files that are not at
the application directory level.

=================

in the MSDN reference is focus on asp.net configuration scenario. Every
asp.net web application (in IIS) will be hosted in an Virutual dir which is
configured as "Application". And this virtual dir is called the root
directory of the asp.net web application.( there may exists many hierarchy
of sub dirs under it). And we can put web.config file in both root dir or
sub dir( roor dir's web.config is not optional). However, not all those
xml config element are allowed to used in the sub dir's web.config, some
are only allowed to appear once for each asp.net web application (in the
root dir's web.config). That's why each config element in MSDN 's schema
reference will have the above notes.

=================
Configuration File
This element can be used in the application configuration file, machine
configuration file (Machine.config), and Web.config files that are not at
the application directory level.

=================

this means that this element can be used not only in asp.net application's
root dir's web.config but also in subdir's web.config file.

If there is still anything unclear, please feel free to post here. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #4
Ok, thanks! I see that I read it wrong. I thought it was saying you couldn't
do this at the root level, only in subdirs! Doh.

Thanks to all who responded.

Mike

"Steven Cheng[MSFT]" wrote:
Hi Mike,

The
=================
Configuration File
This element can be used in the application configuration file, machine
configuration file (Machine.config), and Web.config files that are not at
the application directory level.

=================

in the MSDN reference is focus on asp.net configuration scenario. Every
asp.net web application (in IIS) will be hosted in an Virutual dir which is
configured as "Application". And this virtual dir is called the root
directory of the asp.net web application.( there may exists many hierarchy
of sub dirs under it). And we can put web.config file in both root dir or
sub dir( roor dir's web.config is not optional). However, not all those
xml config element are allowed to used in the sub dir's web.config, some
are only allowed to appear once for each asp.net web application (in the
root dir's web.config). That's why each config element in MSDN 's schema
reference will have the above notes.

=================
Configuration File
This element can be used in the application configuration file, machine
configuration file (Machine.config), and Web.config files that are not at
the application directory level.

=================

this means that this element can be used not only in asp.net application's
root dir's web.config but also in subdir's web.config file.

If there is still anything unclear, please feel free to post here. Thanks.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #5
You're welcome Mike,

Have a good day!

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Nov 19 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Geopsaros | last post: by
5 posts views Thread by Arsalan Ahmad | last post: by
6 posts views Thread by chokk | last post: by
2 posts views Thread by BentleyInc | last post: by
3 posts views Thread by Dirk | last post: by
reply views Thread by Atul Thombre | last post: by
reply views Thread by =?Utf-8?B?UGhpbGlw?= | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.