The difference in Wcf bindings when placed on azure windows

I have a wcf service application that I host on IIS and works very well.
Now I need to transfer the services to windows azure, where I place them in roles on the Internet.
I'm not sure, but I heard that there are various bindings for windows azure
Example:
azure has various bindings equivalent to basicHttp, WebHttp.
May I know what exactly I need to do to achieve the same. here is my current service configuration

<service behaviorConfiguration="mybehavior" name="***"> <endpoint address="mobile" behaviorConfiguration="web" binding="webHttpBinding" contract="*" /> <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> <host> <baseAddresses> <add baseAddress="http://127.0.0.1:81/Mobile.svc" /> </baseAddresses> </host> </service> 

what change needs this Thanks

+4
source share
1 answer

You can achieve your goal with web.config transofmrations (and here ). The problem with Azure is that there is no local host or 127.0.0.1 (well, maybe, but nothing is routed to this local loop address). All you have to do is change baseAddress.

To change baseAddress, you can do any of the following:

  • use web.config transofmrations and in your web.Release.config put your azure domain name in the base address ( http://yourapp.cloudapp.net/ or your own domain if you use it)

  • programmatically bind the wcf service using a DIP role instance (check this and that questions for more information)

+3
source

Source: https://habr.com/ru/post/1385054/


All Articles