Azure set hostHeader according to project configuration
hostHeader can be set in ServiceDefinition.csdef file as
<Site name="Web">
<Bindings>
<Binding name="Endpoint1" endpointName="Endpoint1" hostHeader="www.mysite.com"/>
</Bindings>
<开发者_JAVA技巧;/Site>
How can I change this setting according to my project configuration?
e.g. when my project is published in debug mode, hosetHeader should be set to test.mysite.com
,
and when project is published in release mode, hostHeader should be set to www.mysite.com
We use Visual Studio 10 config transformations. To get transformations working with Azure configs, see this answer.
精彩评论