locked
How to Automatic Update Service Rerefence RRS feed

  • Question

  • User44088339 posted

    Web create private company project. We use ASP.NET C# MCV tecnology.  Project using the web service when connect to the database. Now we keep going project smoothly. But when we changed web service code and copy compiled ddl to project bin directory, then project disown the changed web service dll. Therefore when service dll changed i always click Services / Update Service Reference button. For now i can click because project is run in my local computer. Following monts  we load the project to the remote server. In this case when we change web service dll we will always copy compiled project and web service ddl to remove server. I heard some people was configure their project for updated web service dll automatically. How can i configure my project for update web service dll automatically or what should i do

    Web Service Updatea

    Friday, September 29, 2017 1:07 PM

Answers

  • User475983607 posted

    If the data contracts or method signatures change then the client source code must change which requires a build.

    If the data contacts and methods do NOT change then there is no reason to update the service reference.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, September 29, 2017 3:30 PM

All replies

  • User475983607 posted

    If the data contracts or method signatures change then the client source code must change which requires a build.

    If the data contacts and methods do NOT change then there is no reason to update the service reference.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, September 29, 2017 3:30 PM
  • User44088339 posted

    thanks for your answer. i think it was a easy resolution :) I also want to ask you something. last year i worked company and 4 team working one Project.  when they publish web service, Data contract dlls were being loading Shared Data. Now when i was published all data contract dlls is not load in shared data. i dont remember exatly. when then copy shared dll's to MVC bin all dlls update automaticaly.  I think when i publish my Data contract as shared data everything will be done.  I'm sorry for not remembering what this team did. How can i configure web service for publish data contract  as Shared Data. 

    Friday, September 29, 2017 7:51 PM
  • User44088339 posted

    I search classlib Project SharedData keyword in Google and I find an article which is exlain  detailing this subject.  He is used Package Reference (NuGet) technique for share Class Library. The other methods is commonly used technique. These methods are Project Reference and DLL Reference. (NuGet) technique is best for me because when i add my shared library by using (NuGet) technique Project is automatically recognised my shared dlls. 

    You can find this article in Google. Write "Creating your first shared library in .NET Core" keyword and search.  Site name is devtrends and articles written by Paul Hiles. 

    I will try this technique on Monday. 

    Saturday, September 30, 2017 3:48 PM
  • User1168443798 posted

    Hi renegadecomm,

    Has your issue been resolved?

    I would suggest you try ChannelFactory to generate Client proxy dynamically.

    # Dynamic Generation of Client Proxy at Runtime in WCF using a Single Factory

    https://www.codeproject.com/Tips/138388/Dynamic-Generation-of-Client-Proxy-at-Runtime-in

    Best Regards,

    Edward

    Monday, October 2, 2017 1:58 AM