Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jan 31, 2013 10:01 AM by shapper
Contributor
3932 Points
3789 Posts
Jan 31, 2013 09:52 AM|LINK
Hello,
I have the following on a Web.Config file:
<nlog> <targets> <target xsi:type="Mail" name="Mail" smtpUserName="xyz@xyz.com"/>
Is it possible in Web.Config.release to:
1 - Change the smtpUserName of Mail target without the need to redifine the entire target?
2 - Add 'smtpServer="smtp.xyz.com"' to Mail target without the need to redefine the entire target?
So, on release, I would end up with:
<nlog> <targets> <target xsi:type="Mail" name="Mail" smtpUserName="NEWxyz@xyz.com" smtpServer="smtp.xyz.com"/>
Thank You,
Miguel
Member
242 Points
49 Posts
Jan 31, 2013 09:57 AM|LINK
I believe what you need to do is "Transform your Web.Config file"
http://msdn.microsoft.com/en-us/library/dd465318(v=vs.100).aspx
http://msdn.microsoft.com/en-us/library/dd465326.aspx
The two links above should provide more assistance.
Thanks,
Jan 31, 2013 10:01 AM|LINK
That second link helps a lot ... I was looking for something with all rules but coudn't find it.
shapper
Contributor
3932 Points
3789 Posts
Edit and Insert parameters in Web.Config.Release
Jan 31, 2013 09:52 AM|LINK
Hello,
I have the following on a Web.Config file:
<nlog> <targets> <target xsi:type="Mail" name="Mail" smtpUserName="xyz@xyz.com"/>Is it possible in Web.Config.release to:
1 - Change the smtpUserName of Mail target without the need to redifine the entire target?
2 - Add 'smtpServer="smtp.xyz.com"' to Mail target without the need to redefine the entire target?
So, on release, I would end up with:
<nlog> <targets> <target xsi:type="Mail" name="Mail" smtpUserName="NEWxyz@xyz.com" smtpServer="smtp.xyz.com"/>Thank You,
Miguel
JammoD
Member
242 Points
49 Posts
Re: Edit and Insert parameters in Web.Config.Release
Jan 31, 2013 09:57 AM|LINK
I believe what you need to do is "Transform your Web.Config file"
http://msdn.microsoft.com/en-us/library/dd465318(v=vs.100).aspx
http://msdn.microsoft.com/en-us/library/dd465326.aspx
The two links above should provide more assistance.
Thanks,
shapper
Contributor
3932 Points
3789 Posts
Re: Edit and Insert parameters in Web.Config.Release
Jan 31, 2013 10:01 AM|LINK
Hello,
That second link helps a lot ... I was looking for something with all rules but coudn't find it.
Thank You,
Miguel