Tom,
If you check my blog:
spaces.msn.com/sholliday/
2/8/2006 entry
There is a "smtp server settings" project.
Of course, smtp server settings isn't what you're looking for, ~but it has
the code for writing
configuration section handler as Nicholas talks about.
Mine looks like this:
and I use it to create
SmtpServer objects (with some properties)
and put those into a
SmtpServerCollection object.
its basically an xml file to object mapping type system.
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<section name="EmailSettingsSectionName"
type="GranadaCoder.Email.Settings.EmailSmtpSetting sHandler,GranadaCoder.Emai
l.Settings" />
</configSections>
<EmailSettingsSectionName defaultEmailFrom="do********@donotreply.com"
portNumber="25">
<!--You need to add a reference to
GranadaCoder.Email.Settings.EmailSmtpSettingsHandl er.dll since this dll
lives outside this (Presentation) assembly-->
<!--Comments can go here-->
<!--SSL example. Google(gmail)Mail is a good (free) example of this.
Naturally, you need to provide a legitimate username and password-->
<!--Note, with the 2.0 Framework, my tests show that gmail likes port 587-->
<smtpServer enabled="true" smtpServerName="smtp.gmail.com"
defaultEmailFrom="do********@gmail.com" portNumber="465"
authenicationMode="SSL" smtpUserName="my************@gmail.com"
smtpUserPassword="mygmailpassword" executeOrder="3"/>
<!--Basic authentication. Passing in a username (and sometimes a password)
are used here.-->
<smtpServer enabled="true" smtpServerName="smtp-server.nc.rr.com"
defaultEmailFrom="do********@rr.com" portNumber="25"
authenicationMode="basic" smtpUserName="my*****@rr.com" executeOrder="2"/>
<!--None authentication. Nothing but the smtp-server name is provided-->
<smtpServer enabled="false" smtpServerName="smtp.noauthenticationneeded.com"
authenicationMode="none" executeOrder="1"/>
</EmailSettingsSectionName>
</configuration>
<ne***************@charter.netwrote in message
news:Ub*************@fe03.lga...
>
Is there an MSDN article that I can't find on replacing the registry calls
(Registrykey.GetValue, Registrykey.SetValue) with the calls to get and put
the same data in app.config?
Thanks
Tom