Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
i am using Microsoft.Office.Interop.Outlook. i followed all the steps as you mention above but i don't get any success.
following are the server information:
IIS 7
Windows 2008 server.
i am receiving the following error:
Server Error in '/' Application.
 
Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80080005.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
 
Exception Details: System.Runtime.InteropServices.COMException: Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80080005.
 
Source Error:
 
Line 19:     protected void btnCalender2_Click(object sender, EventArgs e)
Line 20:     {
Line 21:         _Application olApp = (_Application)new Application();
Line 22:         NameSpace mapiNS = olApp.GetNamespace("MAPI");
Line 23:
Posted 11-Oct-12 21:17pm
Tauiqr438
Edited 11-Oct-12 21:20pm
Mehdi Gholam266.9K
v2
Comments
Sergey Alexandrovich Kryukov at 12-Oct-12 18:19pm
   
Well, as it says: please review the stack trace, it will show you the call stack which originally thrown the exception.
--SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Please see my comment to the question. The simplest way of look at the stack trace is this: System.Exception.StackTrace:
http://msdn.microsoft.com/en-us/library/system.exception.stacktrace.aspx[^].
 
Looking at System.Exception.InnerException (recursively) may also help, please see below. See:
http://msdn.microsoft.com/en-us/library/system.exception.innerexception.aspx[^].
 
It's enough to catch all exceptions only once per thread, on top stack frame of the stack of each thread. But it does not mean that it always help to resolve a problem, because some exceptions could be caught down the stack with their propagation blocked, simply by not re-throwing such exceptions. If this is your code, try to avoid it. In some cases, this is acceptable, then log the exception information:
http://msdn.microsoft.com/en-us/library/system.diagnostics.eventlog.aspx[^].
 
One special case of blocking propagation could be re-throwing a different exception (a different type or a different instance). In particular, it could be re-thrown in a different thread. The usual practice is to "pack" the original exception in InnerException; that's why I noted its importance above.
 
Please takes these measures to get further information on your problem. For now, based on your information, that's all I can advise.
 
—SA
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

Hello,
 
Your error details:
 
HRESULT: 0x80080005 (2148007941)
Name: CO_E_SERVER_EXEC_FAILURE
Description: n/a
Severity code: Failed
Facility Code: FACILITY_WINDOWS (8)
Error Code: 0x0005 (5)
 
Actually I think that simplify that Outlook isn't installed on that system or installed different version.
Anyway, check for COM object with CLSID is registred or not.
Anothir thing is you creating "Application" object - which can be System.Windows.Forms.Application or your Outlook appllication - try to specify full object path in that stament to outlook interop.
 
Regards,
Maxim.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 390
1 Maciej Los 205
2 Peter Leow 140
3 Suvendu Shekhar Giri 134
4 Abhinav S 126
0 Sergey Alexandrovich Kryukov 9,623
1 OriginalGriff 8,895
2 Peter Leow 5,044
3 Kornfeld Eliyahu Peter 3,333
4 Maciej Los 2,561


Advertise | Privacy | Mobile
Web03 | 2.8.150327.1 | Last Updated 13 Oct 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100