Error when sending email via outlook, Does this require a server application?

0

Requirement: My application has a requirement to send emails via outlook. I could accomplish this using Outlook = Microsoft.Office.Interop.Outlook;

The application works fine on development environment but iam getting an exception: System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))

Detailed:

System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache)
 at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache)
at System.Activator.CreateInstance(Type type, Boolean nonPublic)
at InvoiceSearchTool.Controllers.emailController.CreateMessageWithAttachment(String invoiceNumber, String recipient, String messageBody) in C:\Projects\KeleInvoice\InvoiceSearchTool\Controllers\emailController.cs:line 38

I do not have outlook installed on an application server. Do I need to install outlook on a server? or the exception is for some other reason? how to get rid of it?

email
outlook
.net
windows
asked on Server Fault Jan 20, 2012 by Mini • edited Jan 20, 2012 by Zero

1 Answer

1

The CLSID for Outlook is {0006F03A-0000-0000-C000-000000000046}. As the error code suggest, it cannot find the Class. You will need to install Outlook (the same version on you have on the development should be also installed on the application server).

(ps - please tick if i am correct, thank you!)

answered on Server Fault Jan 20, 2012 by Cold T

User contributions licensed under CC BY-SA 3.0