In a .NET MVC 3.0 Application I have the following configuration in appSettings
:
web.config
<appSettings>
<add key="SMTPHost" value="mail.domain.com"/>
<add key="SMTPUsername" value="user@gmail.com"/>
<add key="SMTPPort" value="25"/>
<add key="SMTPPwd" value="mypassword"/>
<add key="EmailFrom" value="notific@gmail.com"/>
</appSettings>
For debugging, I have the following configuration transform defined:
web.Debug.config
<appSettings>
<add key="SMTPPort" value="58" xdt:Transform="Replace" xdt:Locator="Match(key)" />
</appSettings>
And I run the application in debug mode, but my SMTP port is still taking the value from the web.config
, not web.Debug.config
.
Can anyone suggest what could be wrong in this configuration?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…