Security Error when calling outlook from an asp.net webpage

E

Eamonn_Eire

Hello,

I want to send an email via Outlook 2003 (SP1) from an asp.net page. I have
tried using the SMTP classes as recommended by Microsoft, but the environment
of my client, the email messages never arrive when sent using this method;
hense using MS Otlook on the wenserver. The code is below:

Dim oApp As Microsoft.Office.Interop.Outlook.Application
oApp = New Microsoft.Office.Interop.Outlook.Application
' Create a new MailItem.
Dim oMsg As Microsoft.Office.Interop.Outlook.MailItem
oMsg =
CType(oApp.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem), Microsoft.Office.Interop.Outlook.MailItem)
oMsg.Subject = "Hello EHASoft!!!"
oMsg.Body = "Hello World"
oMsg.To = "(e-mail address removed)"
oMsg.Send()



The code runs fine in the Visual Studio 2005 development web server, but a
security error is thrown on publishing to iis 6 (on windows server sp1):
Retrieving the COM class factory for component with CLSID
{0006F03A-0000-0000-C000-000000000046} failed with HRESULT: 0x80070005(Access
is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))).
Can anyone advise?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top