问题
For development purpose, we want to specify the port of EndPoint only for local, and the real used port for cloud deployment, any way to get this work?
回答1:
Since the endpoints are defined in csdef
file which goes into the package, one possible solution would be to create two separate cloud projects - one for local and other for cloud and define ports which needs to be opened according to the environment. In fact, this is what we did in one of our projects.
Other idea would be to apply XDT transformation to your csdef file. Please see this blog post for more details: http://fabriccontroller.net/blog/posts/apply-xdt-transforms-to-your-servicedefinition-csdef-file/
来源:https://stackoverflow.com/questions/23234807/how-to-set-separate-port-for-local-and-cloud-in-azure