A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

COMException



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old April 16th 07, 09:45 PM posted to microsoft.public.outlook.program_vba
Jennifer
external usenet poster
 
Posts: 7
Default COMException

I am writing an ASP.NET/C# application and having trouble with outlook. I
keep receiving this error.

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:
80040154.

Source Error:

Line 1196: {
Line 1197: // Create an Outlook application.
Line 1198: Outlook.Application oApp = new Outlook.ApplicationClass();
Line 1199:
Line 1200: // Get the Mapi NameSpace and the Logon.


I do not know how to fix this. Please help!

Jennifer


  #2  
Old April 16th 07, 10:39 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default COMException

Where is this code running? Normally ASP.NET code runs on the server and
unless you have Outlook installed and configured on the server the code
would error.

If the code is running on a client where Outlook is installed then you have
to verify if script code can run on that computer, if the code has to be
signed and designated as safe for scripting and safe for initialization.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Jennifer" wrote in message
...
I am writing an ASP.NET/C# application and having trouble with outlook. I
keep receiving this error.

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:
80040154.

Source Error:

Line 1196: {
Line 1197: // Create an Outlook application.
Line 1198: Outlook.Application oApp = new
Outlook.ApplicationClass();
Line 1199:
Line 1200: // Get the Mapi NameSpace and the Logon.


I do not know how to fix this. Please help!

Jennifer


  #3  
Old April 16th 07, 10:46 PM posted to microsoft.public.outlook.program_vba
Jennifer
external usenet poster
 
Posts: 7
Default COMException

Currently I have it running on localhost (my machine) and Outlook is
installed. The code ran a couple of times an then this error appeared.
When I run this code in debug mode I do not recieve this error. I have
checked the regedit CLSID and the default value is not set. I am not sure
what else to do?


"Ken Slovak - [MVP - Outlook]" wrote in message
...
Where is this code running? Normally ASP.NET code runs on the server and
unless you have Outlook installed and configured on the server the code
would error.

If the code is running on a client where Outlook is installed then you
have to verify if script code can run on that computer, if the code has to
be signed and designated as safe for scripting and safe for
initialization.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Jennifer" wrote in message
...
I am writing an ASP.NET/C# application and having trouble with outlook. I
keep receiving this error.

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:
80040154.

Source Error:

Line 1196: {
Line 1197: // Create an Outlook application.
Line 1198: Outlook.Application oApp = new
Outlook.ApplicationClass();
Line 1199:
Line 1200: // Get the Mapi NameSpace and the Logon.


I do not know how to fix this. Please help!

Jennifer




  #4  
Old April 16th 07, 11:05 PM posted to microsoft.public.outlook.program_vba
Jennifer
external usenet poster
 
Posts: 7
Default COMException

I mean the regedit CLSID default value is set to OUTLOOK.EXE. When I
typed the path in the Run dialog box Outlook came up, so I assume that the
path is correct.

"Jennifer" wrote in message
...
Currently I have it running on localhost (my machine) and Outlook is
installed. The code ran a couple of times an then this error appeared.
When I run this code in debug mode I do not recieve this error. I have
checked the regedit CLSID and the default value is not set. I am not
sure what else to do?


"Ken Slovak - [MVP - Outlook]" wrote in message
...
Where is this code running? Normally ASP.NET code runs on the server and
unless you have Outlook installed and configured on the server the code
would error.

If the code is running on a client where Outlook is installed then you
have to verify if script code can run on that computer, if the code has
to be signed and designated as safe for scripting and safe for
initialization.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Jennifer" wrote in message
...
I am writing an ASP.NET/C# application and having trouble with outlook.
I keep receiving this error.

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: 80040154.

Source Error:

Line 1196: {
Line 1197: // Create an Outlook application.
Line 1198: Outlook.Application oApp = new
Outlook.ApplicationClass();
Line 1199:
Line 1200: // Get the Mapi NameSpace and the Logon.


I do not know how to fix this. Please help!

Jennifer






  #5  
Old April 17th 07, 12:18 AM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default COMException

You will probably need to set security on the application, sign it and
install it for it to run in non-debug mode, but that's a question for an
ASP.NET group that deals with deployment. I don't do much ASP programming so
I don't have an answer for that.

Do you have scripting enabled in your browser and other conditions set so
ASP code can run?

When you do deploy you will need to account for all the things I mentioned
and run the code client side unless you only want to access Outlook
installed on the server.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Jennifer" wrote in message
...
I mean the regedit CLSID default value is set to OUTLOOK.EXE. When I
typed the path in the Run dialog box Outlook came up, so I assume that the
path is correct.

"Jennifer" wrote in message
...
Currently I have it running on localhost (my machine) and Outlook is
installed. The code ran a couple of times an then this error appeared.
When I run this code in debug mode I do not recieve this error. I have
checked the regedit CLSID and the default value is not set. I am not
sure what else to do?


  #6  
Old April 17th 07, 07:58 AM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default COMException

I think she means that both the IIS and server and the client are on the
same machine.
Since this is C#, and IE does not run any .Net code the way it runs VB and
Java Scrips, I suspect that the code is actually executed in the IIS server
context (which is a service), and no Office app (inclusing Outlook) should
be used in any Windows service.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Ken Slovak - [MVP - Outlook]" wrote in message
...
You will probably need to set security on the application, sign it and
install it for it to run in non-debug mode, but that's a question for an
ASP.NET group that deals with deployment. I don't do much ASP programming
so I don't have an answer for that.

Do you have scripting enabled in your browser and other conditions set so
ASP code can run?

When you do deploy you will need to account for all the things I mentioned
and run the code client side unless you only want to access Outlook
installed on the server.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Jennifer" wrote in message
...
I mean the regedit CLSID default value is set to OUTLOOK.EXE. When I
typed the path in the Run dialog box Outlook came up, so I assume that the
path is correct.

"Jennifer" wrote in message
...
Currently I have it running on localhost (my machine) and Outlook is
installed. The code ran a couple of times an then this error appeared.
When I run this code in debug mode I do not recieve this error. I have
checked the regedit CLSID and the default value is not set. I am not
sure what else to do?




  #7  
Old April 23rd 07, 05:46 PM posted to microsoft.public.outlook.program_vba
Jeff
external usenet poster
 
Posts: 41
Default COMException

You want:

= new Outlook.Application();

not

= new Outlook.ApplicationClass();



On Apr 16, 3:45 pm, "Jennifer" wrote:
I am writing an ASP.NET/C# application and having trouble with outlook. I
keep receiving this error.

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:
80040154.

Source Error:

Line 1196: {
Line 1197: // Create an Outlook application.
Line 1198: Outlook.Application oApp = new Outlook.ApplicationClass();
Line 1199:
Line 1200: // Get the Mapi NameSpace and the Logon.

I do not know how to fix this. Please help!

Jennifer



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 11:31 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.