I lost a week trying to get my Web Reference to use HTTPS instead of HTTP. I finally had to rename my web service because the old settings (with old data) appear in the <app>exe.config.deploy file. Those old settings in <app>exe.config.deploy must be overriding my app.config! I don't know how to get rid of the old stuff in the <app>exe.config.deploy. Here is an interesting fact that makes things even more confusing! When I run in debug mode, it uses HTTPS as specified in app.config. When I run in release mode, it uses HTTP (I don't know why but it seems related to the same reason that my <app>exe.config.deploy gets the old HTTP settings!) Ok. Here are some code samples:
<applicationSettings>
<HNPcharts.Properties.Settings>
<setting name="HNPcharts_interfaxV2_InterFax" serializeAs="String">
<value>https://ws.interfax.net/dfs.asmx</value>
</setting>
</HNPcharts.Properties.Settings>
</applicationSettings>
Here is what ends up in <app>.exe.config.deploy (note it has the old name; new name has V2). Also note my new settings specify https, whereas the old settings (which I can't get rid of in <app>exe.config.deploy) specify http.
<applicationSettings>
<HNPcharts.Properties.Settings>
<setting name="HNPcharts_interfax_InterFax" serializeAs="String">
<value>http://ws.interfax.net/dfs.asmx</value>
</setting>
</HNPcharts.Properties.Settings>
</applicationSettings>
So, it seems to me, that my code would never work (used HTTP instead of HTTPS) because the old settings in <app>.exe.config.deploy would override my app.config! I worked around this problem by renaming the web service InterfaxV2 instead of Interfax. Can anyone explain how to get old stuff out of <app>.exe.config.deploy and/or how to get it updated with new settings in app.config?