开发者

Azure set hostHeader according to project configuration

开发者 https://www.devze.com 2023-03-15 02:13 出处:网络
hostHeader can be set in ServiceDefinition.csdef file as <Site name=\"Web\"> <Bindings> <Binding name=\"Endpoint1\" endpointName=\"Endpoint1\" hostHeader=\"www.mysite.com\"/>

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

精彩评论

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

关注公众号