Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Services > Setting SMTP on a Production Machine

Reply
Thread Tools

Setting SMTP on a Production Machine

 
 
Tushar Karsan
Guest
Posts: n/a
 
      11-01-2004
Please help.

I would like to use the following web-services / ASP.Net code to be used in
an intranet environment:

MailMessage Message = new MailMessage();
Message.To = ...
....
SmtpMail.SmtpServer = ...
SmtpMail.Send(Message);

In order for this code to work on a production machine is the IIS [SMTP
Service] required even if there is Exchange-Server running on
another server?

In order to make e-mailing work with a domain-user recognised by the
exchange-server, is it true that I need to edit web.config file in the
following way?

<identity
impersonate="true"
userName="DOMAIN\UserName"
password="Password" />

Such that UserName is recognised by Exchange-Server?

Doing this, does this mean that this ASP.Net will use this identity for all
server accesses including database access? Should I be setting database
security for this application using this identity and not the ASPNET user?

Please help and give more info.




---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.788 / Virus Database: 533 - Release Date: 01/11/2004


 
Reply With Quote
 
 
 
 
Dan Rogers
Guest
Posts: n/a
 
      11-16-2004
Hi Tushar,

The code you showed could come from the simple SMTP object that is
installed by IIS, and also could come from a full MAPI installation, so
it's hard to answer your question without some uncertainty.

In order for the code you showed to work, there will need to be some SMTP
client software installed on the server where your service will run. If
you decide to use the SMTP that comes with IIS, you can still link it to
your exchange server by setting up a smart-host configuration. This makes
the local SMTP server pass off the mail to exchange accounts (check out
MSDN or google for Smart Host)

If you are using MAPI as a client, then you'll need to set up exchange
sessions as a part of the code, and then you can use the impersonate
information for the service to log into the exchange account. Be aware
that this gives the service code the same permissions as granted to the
named account - so this should be a carefully controlled non-human account
if possible.

Regarding your database security question - yes, without futher steps,
activating impersonation will mean that if you also use Windows Secuity to
access a database, this will be the account used to access the database.
If you avoid using your own or someone elses (a person) account, there
should be little issue in controlling/setting database access to a
"service" account.

Personally, I would advise against using SQL security (e.g. passwords
managed by the database). These introduce new security issues - but in the
end you'll have to balance your own needs to come up with the right answer.

I hope this helps,

Dan Rogers
Microsoft Corporation
--------------------
>From: "Tushar Karsan" <(E-Mail Removed)>
>Followup-To: microsoft.public.dotnet.framework.aspnet
>Subject: Setting SMTP on a Production Machine
>Date: Mon, 1 Nov 2004 21:57:17 -0000
>Keywords: Identity SMTP MailMessage Send
>Lines: 41
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
>Message-ID: <(E-Mail Removed)>
>Newsgroups:

microsoft.public.dotnet.framework.aspnet,microsoft .public.dotnet.framework.a
spnet.webservices
>NNTP-Posting-Host: 213.78.106.224
>Path:

cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFT NGP08.phx.gbl!TK2MSFTNGP12
phx.gbl
>Xref: cpmsftngxa10.phx.gbl

microsoft.public.dotnet.framework.aspnet.webservic es:26337
microsoft.public.dotnet.framework.aspnet:272880
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es
>
>Please help.
>
>I would like to use the following web-services / ASP.Net code to be used

in
>an intranet environment:
>
>MailMessage Message = new MailMessage();
>Message.To = ...
>...
>SmtpMail.SmtpServer = ...
>SmtpMail.Send(Message);
>
>In order for this code to work on a production machine is the IIS [SMTP
>Service] required even if there is Exchange-Server running on
>another server?
>
>In order to make e-mailing work with a domain-user recognised by the
>exchange-server, is it true that I need to edit web.config file in the
>following way?
>
><identity
> impersonate="true"
> userName="DOMAIN\UserName"
> password="Password" />
>
>Such that UserName is recognised by Exchange-Server?
>
>Doing this, does this mean that this ASP.Net will use this identity for

all
>server accesses including database access? Should I be setting database
>security for this application using this identity and not the ASPNET user?
>
>Please help and give more info.
>
>
>
>
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.788 / Virus Database: 533 - Release Date: 01/11/2004
>
>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
SessionID Changes in production machine....help =?Utf-8?B?UmV6YSBTb2xvdWtp?= ASP .Net 5 05-13-2005 02:34 PM
SMTP Settings on Production Machine Tushar ASP .Net 4 11-02-2004 09:58 AM
Setting SMTP on a Production Machine Tushar Karsan ASP .Net 0 11-01-2004 09:57 PM
impersonation fails on production machine Seth Darr ASP .Net 2 10-06-2004 07:32 PM



Advertisments