473,386 Members | 1,798 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

config file dosn't work when I deploy my app

I have a config file in my app ,,called app.config.it works fine in debug
but when I deploy application it has no effect.Any suggestion??
Thanks for your help.

Here is my app.config
?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="defaultReportServer" value="myserver01" />
<add key="defaultDocLibrary" value="http://test/mytest" />
</appSettings>
</configuration>

Nov 16 '05 #1
2 1731
app.config is a Visual Studio thing. VS.NET copies this file into the build directory (bin\debug for example) as <yourapp>.exe.config

The config file needs to have the same name as your .exe with ".config" on the end of it for the runtime to pick it up. So if your application is called winword.exe you need to call your config file winword.exe.config

Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

I have a config file in my app ,,called app.config.it works fine in debug
but when I deploy application it has no effect.Any suggestion??
Thanks for your help.

Here is my app.config
?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="defaultReportServer" value="myserver01" />
<add key="defaultDocLibrary" value="http://test/mytest" />
</appSettings>
</configuration>

Nov 16 '05 #2
Thanks very much.it is now workin.
ALi
"Richard Blewett [DevelopMentor]" <ri******@NOSPAMdevelop.com> wrote in
message news:OX**************@TK2MSFTNGP14.phx.gbl...
app.config is a Visual Studio thing. VS.NET copies this file into the build directory (bin\debug for example) as <yourapp>.exe.config
The config file needs to have the same name as your .exe with ".config" on the end of it for the runtime to pick it up. So if your application is
called winword.exe you need to call your config file winword.exe.config
Richard Blewett - DevelopMentor
http://www.dotnetconsult.co.uk/weblog
http://www.dotnetconsult.co.uk

I have a config file in my app ,,called app.config.it works fine in debug but when I deploy application it has no effect.Any suggestion??
Thanks for your help.

Here is my app.config
?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>
<add key="defaultReportServer" value="myserver01" />
<add key="defaultDocLibrary" value="http://test/mytest" />
</appSettings>
</configuration>

Nov 16 '05 #3

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

Similar topics

9
by: ALI-R | last post by:
Hi,, I have two questions : 1) Is it mandatory that config file of a desktop application must be App.config 2) Is it possible to update config file in your code?? thanks for your help. ALI
8
by: Robert | last post by:
I have what I think should be a pretty common scenario in a corporate environment. I have a web app and three environments on three servers: Development, QA and Production. We develop in...
8
by: Henry | last post by:
Hi, in a Windows form VB.Net project I use localization for all texts. In App.Config I added: <appSettings> <add key="locale" value="de"/> </appSettings> In the project I have ressource...
12
by: dbuchanan | last post by:
Hello, (Is this the proper newsgroup?) === Background === I am building a solution with two projects. One project is my data access layer which contains my DataSet as an xsd file. The XSD...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
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...

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.