Click here to Skip to main content
15,921,276 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all
I have one windows application which capture images.
application pass this image path to dll and that dll convert that image into byte and pass it to web service.
i have used web service because i have one software which extract image into some template for which i need license.so instead of extracting it in each local machine i am using web service.
Now my question is every time i update my web service i need to update web reference from dll then i need to build that dll and add to windows application again.
is there any way that i can update dll directly..
i tried to change config file of dll but it is not affecting the project..
give some suggestions..

I have this in my config file:
XML
<userSettings>
        <Cns_TestWebService.Properties.Settings>
            <setting name="Cns_TestWebService_localhost_Service1" serializeAs="String">
                <value>http://localhost/WebService1/Service1.asmx</value>
            </setting>
        </Cns_TestWebService.Properties.Settings>
    </userSettings>


now when i'll change my config file it should affect the web service url.

thank u..
god bless u all..:) :)
Posted
Updated 25-Oct-12 19:02pm
v2

Make call to web service remotely/dynamically for more details check following links, this may solve your problem.

Call WebService Dynamically and Read WebService Definition[^]
how-to-dynamically-invoke-web-services-in-net[^]
Call Web Service Dynamically[^]
 
Share this answer
 
First i have added appsetting part in config file of my windows application and set key value as url:

XML
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
  <appSettings>
    <add key="MyWebServiceURL" value="http://localhost/WebService2/Service1.asmx"/>
  </appSettings>
</configuration>


then included web service in my dll and change its behavior to dynamic
and made changes in its service.cs in constructor as given below.
Setting this.url from app.config.

C#
public Service1() {
           this.Url = System.Configuration.ConfigurationManager.AppSettings["MyWebServiceURL"];
}


then added dll in windows form.
Now this.Url picks up the url from windows application app config.
so i can directly change the url and run the application.
Thanx
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900