none
Should we need to take update service reference if we deploy same wcf service on different port ? RRS feed

  • Question

  • We have developed one wcf service for sharepoint foundation 2010. We are frequently deploying that wcf service on development environment as well SIT environment. Both development and SIT environment having different ports.  All other things are same. Suppose we have published that same wcf service and deployed it on SIT without any changes in wcf. We have only chnaged port number in web.config file and does not taken 'Update Service Reference'. Is it necessary that we should always take 'Update Service Reference' ? If it is necessary then please share the pros and cons related to  'Update Service Reference' in context of port number change

    Friday, September 27, 2013 5:44 AM

Answers

  • Hi,

    I have test a simple scenario, then I found we should take the 'Update Service Reference' with the http address.

    First we should use the wsdl address to let our client call the wcf service.

    Then after the service port are changed, we should Update Service Reference, or we will meet error.

    Best Regards,
    Amy Peng


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Tuesday, October 1, 2013 8:33 AM
    Moderator
  • Hi Shailesh,

    By 'Update Service Reference', If you mean that you should change client side endpoint configuration, then yes, you should update service reference.

    However, if you mean that you can simply change the client side endpoint configuration manually to match the port changes done on server, then in that case you can skip 'Update Service Reference', as changing the port just impacts the service address location (<endpoint address=""> attributes).

    Regarding pros and cons of related to  'Update Service Reference' in context of port number change, there're not much to worry if you do "Update Service reference". The "Update Service reference" includes download the metadata, then generate proxy code and configuration out of it. Pros are that it's less error prone as endpoint configuration is taken from WSDL. Cons are that it'll again download metadata and replace proxy code and part of related configuration. So, the manual changes done on these file may be lost or changed so that they're not applied. Thus, it'd require to do some rework.

    HTH,

    Amit Bhatia

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Tuesday, October 1, 2013 10:49 AM
    Moderator

All replies

  • Hi,

    I have test a simple scenario, then I found we should take the 'Update Service Reference' with the http address.

    First we should use the wsdl address to let our client call the wcf service.

    Then after the service port are changed, we should Update Service Reference, or we will meet error.

    Best Regards,
    Amy Peng


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Tuesday, October 1, 2013 8:33 AM
    Moderator
  • Hi Shailesh,

    By 'Update Service Reference', If you mean that you should change client side endpoint configuration, then yes, you should update service reference.

    However, if you mean that you can simply change the client side endpoint configuration manually to match the port changes done on server, then in that case you can skip 'Update Service Reference', as changing the port just impacts the service address location (<endpoint address=""> attributes).

    Regarding pros and cons of related to  'Update Service Reference' in context of port number change, there're not much to worry if you do "Update Service reference". The "Update Service reference" includes download the metadata, then generate proxy code and configuration out of it. Pros are that it's less error prone as endpoint configuration is taken from WSDL. Cons are that it'll again download metadata and replace proxy code and part of related configuration. So, the manual changes done on these file may be lost or changed so that they're not applied. Thus, it'd require to do some rework.

    HTH,

    Amit Bhatia

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    Tuesday, October 1, 2013 10:49 AM
    Moderator