PC Review


Reply
Thread Tools Rate Thread

Custom Configuration at Application Directory Level

 
 
=?Utf-8?B?cmRjcHJv?=
Guest
Posts: n/a
 
      25th Jan 2005
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


 
Reply With Quote
 
 
 
 
Juan T. Llibre
Guest
Posts: n/a
 
      25th Jan 2005
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" <(E-Mail Removed)> wrote in message
news:61A70695-6C21-4078-B587-(E-Mail Removed)...
> 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
>
>



 
Reply With Quote
 
Craig Deelsnyder
Guest
Posts: n/a
 
      25th Jan 2005
On Mon, 24 Jan 2005 16:39:03 -0800, rdcpro <(E-Mail Removed)> 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
 
Reply With Quote
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      25th Jan 2005
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.)

 
Reply With Quote
 
=?Utf-8?B?cmRjcHJv?=
Guest
Posts: n/a
 
      25th Jan 2005
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.)
>
>

 
Reply With Quote
 
Steven Cheng[MSFT]
Guest
Posts: n/a
 
      26th Jan 2005
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.)

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to set application dependency on custom configuration files? Laser Lu Microsoft ASP .NET 3 12th Apr 2006 09:10 AM
Re: Custom TransformerProvider in Configuration Application Block Mona Microsoft Dot NET Framework 0 7th Sep 2005 12:17 PM
Re: Custom TransformerProvider in Configuration Application Block Mona Microsoft Dot NET 0 7th Sep 2005 12:17 PM
Re: Custom TransformerProvider in Configuration Application Block Mona Microsoft C# .NET 0 7th Sep 2005 12:17 PM
Re: Custom Application Configuration Files Allen Jones Microsoft Dot NET 1 16th Jul 2003 12:06 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:53 AM.