开发者

How to transform this portion of webconfig in my web.config.release?

开发者 https://www.devze.com 2023-03-13 19:18 出处:网络
I need to change SMTP host value on web.config transform. Here is what I have: <system.net> <mailSettings>

I need to change SMTP host value on web.config transform. Here is what I have:

<system.net>
    <mailSettings>
      <smtp from="some@sioem.com">
        <network host="localhost" userName="" password=""/>
      </smtp>
    </mailSettings>
  </system.net>

How should I put it in web.release.config so instead of localhost it says 192.168.1.9 ?

I transform connection string like this but not sure how to do it with smtp

<connectionStrings>
  <add name="CoreModelContext"
    connectionString="metadata=&&quot;" providerName="System.Data.EntityClient"
    xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/&开发者_Go百科gt;
</connectionStrings>


<system.net>
  <mailSettings>
    <smtp>
      <network xdt:Transform="Replace" host="192.168.1.9" userName="" password="" />
    </smtp>
  </mailSettings>
</system.net>
0

精彩评论

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

关注公众号