config file dosn't work when I deploy my app

A

ALI-R

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>
 
R

Richard Blewett [DevelopMentor]

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>
 
A

ALI-R

Thanks very much.it is now workin.
ALi
Richard Blewett said:
app.config is a Visual Studio thing. VS.NET copies this file into the
build directory (bin\debug for example) as said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top