0

I have a webservcie, which is used in a window application, which is deployed in several machines. When i change the webservice, when i add a method or update the service i want the webreference be automatically updated when client invokes the service.

Note: My service address is not changed.

History of the problem:

  1. The Service was residing as an application (a virtual directory converted into application using "Convert to application" feature of IIS) inside a website.

  2. Now the application containing the service is converted back to virtual directory.

  3. Within LAN the clients which are using this service are working without any problem but the clients outside the LAN are not working as expected. They are working if we do update web-reference and deploy them again.

  4. The IIS version used is IIS 7.5.

Vinay Kumar.o
  • 316
  • 1
  • 10
  • A web reference is a visual studio thing that generates code to be compiled, you can't update already compiled client apps just because you change your service, they need to be rebuilt against the updated service. – Ben Robinson Dec 18 '14 at 17:12
  • I think the approach to use here is to rebuild the client that is capable of accessing the updated web reference, and then have the Windows Application check for a newer version and automatically download it and install it. You basically want a self updating app. See [What is the best way to auto update a windows application?](http://stackoverflow.com/questions/7395609/what-is-the-best-way-to-auto-update-a-windows-application). – mason Dec 18 '14 at 17:14
  • Why do you want to update the client proxy automatically? How are you going to call the new methods if your code doesn't know about them? If you want such "dynamic" behavior, maybe you're better off using REST. – CodeCaster Dec 18 '14 at 17:14
  • Another option would be to deploy your application as a [ClickOnce application](http://en.wikipedia.org/wiki/ClickOnce), which greatly simplifies things because it takes care of updating the client side code automatically, no need to write a separate updater. – mason Dec 18 '14 at 17:16
  • I am working an existing webservie and updated a method logic, the method is used by multiple clients(windows). now i can't share the exe after updating the webreference. So i am searching for options how to automatically udpate the clients by changing a setting at service. Note: I have full access to web service but not the client. – Vinay Kumar.o Dec 18 '14 at 17:19
  • You can't do it automatically. Note that if you add methods or change methods, the clients won't know about the changes. Even if you could update the web references in the clients, and compile the clients, the client logic _still_ wouldn't know what to do with the changes. You need a better process. – John Saunders Dec 18 '14 at 17:22
  • To be specific about the problem, We have update the dlls used in webservice not the method it self , so the signature of the web method is same, Yet the client is failing, We have update the reference for one client and tested, it is working fine, Now we can't do the same change for all clients and update. Are we missing any basics. – Vinay Kumar.o Dec 18 '14 at 17:31
  • The client doesn't care about the DLL's backing the web service on the server. If the web service really hasn't changed signatures, then updating the service reference on the client would do nothing. I suggest you trace through your application more closely to identify how the execution differs from what yuo think it should be. Use your IDE's debugger, and a look such as [Fiddler](http://www.telerik.com/fiddler) might be handy too. – mason Dec 18 '14 at 19:38

0 Answers0