开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜