473,516 Members | 3,064 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

two config files

Hi

Is it possible to have two config files (not just web.config) in one folder?
I need the other one for connection string to the DB

Thank you
Vaclav
Nov 19 '05 #1
10 1044
You can have as many as you want, but you have to process them yourself.
The server only processes the web.config.

"Vaclav" <no@spam.please> wrote in message
news:O#*************@TK2MSFTNGP14.phx.gbl...
Hi

Is it possible to have two config files (not just web.config) in one folder? I need the other one for connection string to the DB

Thank you
Vaclav

Nov 19 '05 #2
Hi,

Having two config files can be better than having one. If u keep everything
in web.config and try to change any bit from it, application will be
restarted. This may not be good on production server. So u can separate out
those bits which are bound to change in separate config file.

Thanks you

"Vaclav" wrote:
Hi

Is it possible to have two config files (not just web.config) in one folder?
I need the other one for connection string to the DB

Thank you
Vaclav

Nov 19 '05 #3
Thank you very much.
I read somewhere that it is possible to include a small config file in the
normal web.config and then there is no need to process them separately. But
I cannot find the syntax how to do it.

Vaclav
"Peter Rilling" <pe***@nospam.rilling.net> píše v diskusním příspěvku
news:un*************@TK2MSFTNGP15.phx.gbl...
You can have as many as you want, but you have to process them yourself.
The server only processes the web.config.

"Vaclav" <no@spam.please> wrote in message
news:O#*************@TK2MSFTNGP14.phx.gbl...
Hi

Is it possible to have two config files (not just web.config) in one

folder?
I need the other one for connection string to the DB

Thank you
Vaclav


Nov 19 '05 #4
That is different from your original question. Take a look a
IConfigurationSectionHandler. Using this you can create arbitrarily complex
configuration sections in the standard web.config.

"Vaclav" <no@spam.please> wrote in message
news:O0**************@TK2MSFTNGP09.phx.gbl...
Thank you very much.
I read somewhere that it is possible to include a small config file in the
normal web.config and then there is no need to process them separately. But I cannot find the syntax how to do it.

Vaclav
"Peter Rilling" <pe***@nospam.rilling.net> píše v diskusním příspěvku
news:un*************@TK2MSFTNGP15.phx.gbl...
You can have as many as you want, but you have to process them yourself.
The server only processes the web.config.

"Vaclav" <no@spam.please> wrote in message
news:O#*************@TK2MSFTNGP14.phx.gbl...
Hi

Is it possible to have two config files (not just web.config) in one

folder?
I need the other one for connection string to the DB

Thank you
Vaclav



Nov 19 '05 #5
By the way, I have been playing around with ASP.NET 2 and there is a section
specifically designed to hold connection strings.

"Peter Rilling" <pe***@nospam.rilling.net> wrote in message
news:O9**************@TK2MSFTNGP15.phx.gbl...
That is different from your original question. Take a look a
IConfigurationSectionHandler. Using this you can create arbitrarily complex configuration sections in the standard web.config.

"Vaclav" <no@spam.please> wrote in message
news:O0**************@TK2MSFTNGP09.phx.gbl...
Thank you very much.
I read somewhere that it is possible to include a small config file in the normal web.config and then there is no need to process them separately.

But
I cannot find the syntax how to do it.

Vaclav
"Peter Rilling" <pe***@nospam.rilling.net> píše v diskusním příspěvku
news:un*************@TK2MSFTNGP15.phx.gbl...
You can have as many as you want, but you have to process them yourself. The server only processes the web.config.

"Vaclav" <no@spam.please> wrote in message
news:O#*************@TK2MSFTNGP14.phx.gbl...
> Hi
>
> Is it possible to have two config files (not just web.config) in one
folder?
> I need the other one for connection string to the DB
>
> Thank you
> Vaclav
>
>



Nov 19 '05 #6
Thank you,
Maybe I did not explain it clear. I need to put the connection string to a
separate file (not just section) because when I FTP my app to the production
server, I do not want to pass my development DB conn string there. So I want
to upload all settings but the conn string. I heard there is some sort of
external include for the web.config.

Vaclav

"Peter Rilling" <pe***@nospam.rilling.net> píše v diskusním příspěvku
news:O9****************@TK2MSFTNGP15.phx.gbl...
That is different from your original question. Take a look a
IConfigurationSectionHandler. Using this you can create arbitrarily
complex
configuration sections in the standard web.config.

"Vaclav" <no@spam.please> wrote in message
news:O0**************@TK2MSFTNGP09.phx.gbl...
Thank you very much.
I read somewhere that it is possible to include a small config file in
the
normal web.config and then there is no need to process them separately.

But
I cannot find the syntax how to do it.

Vaclav
"Peter Rilling" <pe***@nospam.rilling.net> píše v diskusním příspěvku
news:un*************@TK2MSFTNGP15.phx.gbl...
> You can have as many as you want, but you have to process them
> yourself.
> The server only processes the web.config.
>
> "Vaclav" <no@spam.please> wrote in message
> news:O#*************@TK2MSFTNGP14.phx.gbl...
>> Hi
>>
>> Is it possible to have two config files (not just web.config) in one
> folder?
>> I need the other one for connection string to the DB
>>
>> Thank you
>> Vaclav
>>
>>
>
>



Nov 19 '05 #7

"Vaclav" <no@spam.please> a écrit dans le message de news:
ep****************@TK2MSFTNGP09.phx.gbl...
Thank you,
Maybe I did not explain it clear. I need to put the connection string to a
separate file (not just section) because when I FTP my app to the
production server, I do not want to pass my development DB conn string
there. So I want to upload all settings but the conn string. I heard there
is some sort of external include for the web.config.

Vaclav

You are looking for this thype of syntax :

....

<browserCaps>
<file src="Web.browserCaps.xml" />
</browserCaps>
</system.web>

<appSettings file="Commun.config">
</appSettings>

....
Nov 19 '05 #8
Hello,

You can have all the app settings in a different file and have it referenced
in the web.config using the file attribute of <appSettings>

<appSettings file="ProductionSettings.config">
....
</appSettings>

For more info:
http://msdn.microsoft.com/library/de...ngsElement.asp

HTH

-Siva

"Vaclav" <no@spam.please> wrote in message
news:O%***************@TK2MSFTNGP14.phx.gbl...
Hi

Is it possible to have two config files (not just web.config) in one folder?
I need the other one for connection string to the DB

Thank you
Vaclav

Nov 19 '05 #9
Yes, that it! I could not find it.
Thank you very much!

Vaclav

"Siva M" <sh******@online.excite.com> píše v diskusním příspěvku
news:ed**************@TK2MSFTNGP10.phx.gbl...
Hello,

You can have all the app settings in a different file and have it
referenced
in the web.config using the file attribute of <appSettings>

<appSettings file="ProductionSettings.config">
...
</appSettings>

For more info:
http://msdn.microsoft.com/library/de...ngsElement.asp

HTH

-Siva

"Vaclav" <no@spam.please> wrote in message
news:O%***************@TK2MSFTNGP14.phx.gbl...
Hi

Is it possible to have two config files (not just web.config) in one
folder?
I need the other one for connection string to the DB

Thank you
Vaclav

Nov 19 '05 #10
Yes, that is it! I could not find it.
Thank you very much!

Vaclav

"Michel de Becdeličvre" <m_*****@msn.com> píše v diskusním příspěvku
news:eR**************@TK2MSFTNGP15.phx.gbl...

"Vaclav" <no@spam.please> a écrit dans le message de news:
ep****************@TK2MSFTNGP09.phx.gbl...
Thank you,
Maybe I did not explain it clear. I need to put the connection string to
a separate file (not just section) because when I FTP my app to the
production server, I do not want to pass my development DB conn string
there. So I want to upload all settings but the conn string. I heard
there is some sort of external include for the web.config.

Vaclav

You are looking for this thype of syntax :

...

<browserCaps>
<file src="Web.browserCaps.xml" />
</browserCaps>
</system.web>

<appSettings file="Commun.config">
</appSettings>

...

Nov 19 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
3809
by: Fuzzyman | last post by:
There have been a couple of config file 'systems' announced recently, that focus on building more powerful and complex configuration files. ConfigObj is a module to enable you to much more *simply* access config files. This is version 3, which is a big overhaul. It extends ConfigObj to reading config files with sections and various other...
22
2977
by: Daniel Billingsley | last post by:
Ok, I wanted to ask this separate from nospam's ridiculous thread in hopes it could get some honest attention. VB6 had a some simple and fast mechanisms for retrieving values from basic text files, which in turn could be simply and easily maintained with notepad. I understand the benefits of XML, really, but in the case of configuration...
1
1550
by: Rolf Molini | last post by:
Hello everybody, I put this in a separate thread because altough it is connected to the localization-problem in my former thread this is a completely different "joke" of the IDE. While waiting for some hint on how to include my own ressources in IDE-generated satellite-assemblies (because there can only be on assembly per each language) I...
4
10549
by: Bennett Haselton | last post by:
If I add this to my web.config file: <authentication mode="Forms"> <forms name=".ASPXUSERDEMO" loginUrl="login.aspx" protection="All" timeout="60" /> </authentication> I can configure the application so that users who try to access a page in the application, get redirected to login.aspx where they have to sign in. (And the "signing in"...
4
2214
by: Jeffrey Palermo [MCP] | last post by:
I use web.config files in many directories, and my aspx files can access the AppSettings. If I have a subdirectory Foo with an aspx, and Foo has a local web.config that defines an AppSetting. My aspx in the Foo directory can properly access this local AppSetting. I understand that web.config files are cumulative as you go deep into the...
8
3150
by: Graham | last post by:
I noticed a similar post awhile ago and in terms of my problem it wasnt a suitable answer so I will ask again. I have VS2005 running a on development machine in my office where I do all my development on existing and new applications. This environment also has its own Sql Server with dev versions of all our live Databases. Our live production...
1
2557
by: Joseph Geretz | last post by:
I need to download a greater than 4 megabyte attachment via WSE / DIME. The only way I know how to configure this is via a .config file. Normally, the ..config file is the same name as the base application. I built a .NET driver program to test this, NetBrokerDriver and provided a NetBrokerDriver.exe.config file which specifies the following:...
20
2588
by: tomerfiliba | last post by:
hey i've been seeing lots of config-file-readers for python. be it ConfigObj (http://www.voidspace.org.uk/python/configobj.html) or the like. seems like a trend to me. i came to this conclusion a long time ago: YOU DON'T NEED CONFIG FILES FOR PYTHON. why re-invent stuff and parse text by yourself, why the interpreter can do it for you? and...
11
3422
by: TARUN | last post by:
Hello All I need to ask about the configuration file in .NET, There are Two config File 1. Web Config 2. Machine config I understand the the usage of Web config , but not able to understand the usage of Machine config. I read in the article that you can also write your database connection string in Machine Config
1
1796
by: herbert | last post by:
In VS.2005 a Windows Service can have an app.config file. A class library can also have an app.config file. Now if my Windows Services uses three class libraries, each of it coming with its own app.config file, in which sequence are the app config files read in? eg What happens if there are trace switches of the same name with different...
0
7182
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7408
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7581
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7142
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7548
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
5714
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
3267
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3259
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1624
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.