Can web service values only be given in the app.config file?
I have this web service as a web reference in my VB.NET console application. What this means is that a XML app.config file is created to store some values about this web service.
It is extremely important that this application is published as a single .exe file, not in need of any XML/config files. If I place the .exe alone, away from the config file, the application simply does not work. I have tried removing the values that is not critical needed for the application to work, and I stand with this XML file. If anything here is changed, the applicati开发者_StackOverflow中文版on does not work:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<client>
<endpoint binding="basicHttpBinding" contract="Corruption_webservice.Corruption_webserviceSoap" />
</client>
</system.serviceModel>
</configuration>
I'm not quite sure what the solution for this should be. I would like to just hard-code these values in the code, but it seems impossible with my knowledge.
Also, in my code I have managed to put some of the needed values, like the remoteAddress
of the web service. It is just these two values that won't work anywhere.
精彩评论