none
Web Service update change ServiceModel/ endpoint binding configuration and bining name in App.Config file RRS feed

  • Question

  • Hi,

    I'm doing web service testing, in VS. Where I've couple of service references..

    To avoid any conflict, i've given custom binding name and bidnding congiuration o ServiceModel/Client/endpoints.

    i.e. <endpoint address="https://servername:8090/v1_0/ABCService.svc"
            binding="basicHttpBinding" bindingConfiguration="BasicHttpsWinAuthABC"
            contract="PayeeService.IPayeeService" name="BasicHttpsWinAuthABC" />

       It's and also give the same name to its binding 

        <binding name="BasicHttpsWinAuthABC">
              <security mode="Transport">
                <transport clientCredentialType="Windows" />
              </security>
            </binding>

    It's all work fine, unless I try to update the service.

    As soon as I update the service, It added a new endpoint

          <endpoint address="https://servername:8090/v1_0/ABCService.svc"
            binding="basicHttpBinding" bindingConfiguration="BasicHttpsWinAuth"
            contract="PayeeService.IPayeeService" name="BasicHttpsWinAuth" />

        <binding name="BasicHttpsWinAuth">
              <security mode="Transport">
                <transport clientCredentialType="Windows" />
              </security>
            </binding>

    Now it start creating a problem, because I using binding name BasicHttpsWinAuthABC across the places, however it looks for BasicHttpsWinAuth.

    Is there any way I can restrict not to update the binding name and bindingconfiguration to some defaut and keep my custom whenever i take service update. ? or any work around.





    Thursday, August 7, 2014 3:39 PM

Answers

  • Hi,

    It seems very strange, I have created a test project in my side, then when click the update service reference, the endpoint does not update with automatically in app.config with the default binding name.

    Maybe when you want to update the service reference, you need to use the add the service reference, then update the binding name with some meaningful name.

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, August 15, 2014 11:05 AM
    Moderator

All replies

  • Hi,

    >>As soon as I update the service, It added a new endpoint

    From the above I know that when you update your service, then it adds a new endpoint. Could you please tell me how do you update your service?

    Maybe you can just use the following:

    <binding> <security mode="Transport"> <transport clientCredentialType="Windows" /> </security> </binding>

    ....

     <endpoint address="https://servername:8090/v1_0/ABCService.svc"
            binding="basicHttpBinding"
            contract="PayeeService.IPayeeService" />

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Friday, August 8, 2014 5:50 AM
    Moderator
  • Hey Amy,

    Basically, I'm unit testing the Web services in visual Studio. So, I've a unit test project, where I've added Service References.. as soon as I add the service reference, it create endpoint and binding in the app.config file of the project. All is good so far, after that I go and change the binding name with some meaningful name.. all works good.

    But When I update the service (from unit test project, right click and service reference and click update) the endpoint updated with automatically in app.config with the default binding name..

    I tried with without given binding name then it's gives me error.

    Tuesday, August 12, 2014 6:38 PM
  • Hi,

    It seems very strange, I have created a test project in my side, then when click the update service reference, the endpoint does not update with automatically in app.config with the default binding name.

    Maybe when you want to update the service reference, you need to use the add the service reference, then update the binding name with some meaningful name.

    Best Regards,
    Amy Peng


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, August 15, 2014 11:05 AM
    Moderator