Change dynamic web reference from web./app.config
Posted
by
Snæbjørn
on Stack Overflow
See other posts from Stack Overflow
or by Snæbjørn
Published on 2012-09-16T09:23:32Z
Indexed on
2012/09/16
9:37 UTC
Read the original article
Hit count: 485
I have a problem changing a dynamic web reference in the config file. Changing the url in the config file doesn't have any effect. I have to change the url in .settings and compile for it to change.
I added the web reference using the wizard. Set the URL behavior to dynamic, which added the relevant XML tags in config file.
In my solution I have the web API (web reference) in a separate project (class lib), so I referenced the project and copied the <applicationSettings>
over.
<applicationSettings>
<StartupProject.Properties.Settings>
<setting name="WebReference" serializeAs="String">
<value>http://someurl/somefile.asmx</value>
</setting>
</StartupProject.Properties.Settings>
</applicationSettings>
Note that it's <StartupProject.Properties.Settings>
and not <WebRefProject.Properties.Settings>
.
Are there some limitations I'm not aware of or am I doing something wrong?
© Stack Overflow or respective owner