0

in my application i am trying to get my outlook contacts it is working fine in my system (local) but when i uploaded the code into our server which is some where. I am getting the error like this

Retrieving the COM Class factory for component with CLSID failed due to the following error:80040154

i added the outlook reference in server also. still it is getting the error. can u help me

Surya sasidhar
  • 29,607
  • 57
  • 139
  • 219
  • possible duplicate of [Retrieving the COM class factory for component with CLSID {XXXX} failed due to the following error: 80040154.](http://stackoverflow.com/questions/1036856/retrieving-the-com-class-factory-for-component-with-clsid-xxxx-failed-due-to-th) – CoderDennis Sep 08 '10 at 19:46

2 Answers2

1

This looks like a 64bit issue like Retrieving the COM class factory for component with CLSID {XXXX} failed due to the following error: 80040154.

Is the server running a 64bit edition of Windows?

The following link may be of interest to you Using X86 COM interop with ASP.Net application in Windows x64.

Community
  • 1
  • 1
stevehipwell
  • 56,138
  • 6
  • 44
  • 61
0

The asp.net worker process may not have sufficient permissions to do the COM calls. I'm not sure what the exact permissions will be but it definately needs registery permissions and permissions on the outlook executeable

Carl Rippon
  • 4,553
  • 8
  • 49
  • 64
  • Mr. rip how can i solve this problem and thank you for response – Surya sasidhar Jan 25 '10 at 07:10
  • First find out what user account the ASP.NET worker process is running under. Note: System.Security.Principal.WindowsIdentity.GetCurrent().Name should give you this. Then elevate the permissions for this account on the relevant resources. For example to give registry permissions, open regedit, go to Edit > Permissions, add the user (if it’s not already there) and give it full control permissions. – Carl Rippon Jan 25 '10 at 08:38
  • Mr. Rip sorry frankly to say i not understand – Surya sasidhar Jan 25 '10 at 09:22