I developed one console application using DI API(x64). Now I am trying to develop a web application using the same code but getting the following error in the very first line
SAPbobsCOM.Company sboCompany = new SAPbobsCOM.Company(); //in this line
Retrieving the COM class factory for component with CLSID {632F4591-AA62-4219-8FB6-22BCF5F60090} failed due to the following error:
80040154 Class not registered (Exception from HRESULT: 0x80040154
(REGDB_E_CLASSNOTREG)).
I have tried changing Platform target (x84, any, x64) but no luck. I also have Enabled 32-Bit Applications on IIS.
I am using Visual studio 2017 community version and Windows 10(x64).
I have no idea why I am getting this error as its perfectly working for my console application. I have seen some are suggesting to use DI Server for web application but I am wondering if its possible to use DI API as I won't have much traffic.
Any help would be highly appreciated.
Related
I am currently working on upgrading an ASP.NET web application to use Crystal Reports SP31. When running the web application on our web server, I get the following error:
System.Runtime.InteropServices.COMException (0x8007007F): Retrieving the COM class factory for component with CLSID {F734A321-8381-4FFD-A614-139E8906DC83} failed due to the following error: 8007007f The specified procedure could not be found. (Exception from HRESULT: 0x8007007F).
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper.CreateRptDoc()
at CrystalDecisions.ReportAppServer.ReportClientDocumentWrapper..ctor()
at CrystalDecisions.CrystalReports.Engine.ReportDocument.Initialize()
at CrystalDecisions.CrystalReports.Engine.ReportDocument..ctor()
at CrystalDecisions.CrystalReports.Engine.ReportClass..ctor()
The Crystal Reports runtime (32-bit) is installed on the web server, and its IIS is configured to allow 32-bit applications. I've run the same web application on my own local machine with no problems.
Any advice would be greatly appreciated.
Update - I've identified the cause of the issue. The server also has Shibboleth 3.3.0 installed on it, and apparently that "breaks" the Crystal Reports runtime. Unfortunately, the Shibboleth application is required, so I can't just uninstall it.
Does anyone have any suggestions on what to do here?
I have a application written in asp.net VB; it runs well on my production server. However, when I executed on my desktop / or development server, I get the 80040154 related error mentioned in my header. While doing some research, it was mentioned that the issue is a result of the target platform being set to run on any computer and that I need to set it to run on 64-bit. Using Visual Studio 2012 Ultimate, I performed the following Build >> Configuration Manager >> ... and then under "Active Solution Platform" >> I selected "New" and added x64 to list. ...I still get the error: Retrieving the COM class factory for component with CLSID {E916A72F-7F85-4642-A2CB-CD13DAC01F55} failed due to the following error: 80040154.
Label As I mentioned, it works on my live server, and I'm trying to get it to run on my development server. ..Could I please get some assistance? Thanks in Advance.
I am using Microsoft Document imaging tool for OCR functionality in my asp.net application. I have referred interop.MODI.dll in my project. It works fine in my local windows 7 dev environment. But when I move it to server which is winodws server 2012 environment. Its gives me a error.
Error Message: Retrieving the COM class factory for component with CLSID {40942A6C-1520-4132-BDF8-BDC1F71F547B} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
I have installed Microsoft document imaging tool in server.
Could anyone help me with this
Got Solution. Changed the Identity settings in IIS this solved the issue.
I got a new problem while using vb6 dll in my Web Services. When using dll, the object instance is created fine but when I start calling it's method from my service I got this exception:
Server was unable to process request. ---> Unable to cast COM object
of type 'WS_Resevat_DLL.WS_ResevatCLClass' to interface type
'WS_Resevat_DLL._WS_ResevatCL'. This operation failed because the
QueryInterface call on the COM component for the interface with IID
'{69F1DA59-56D1-47CE-94A4-D681ABECDF80}' failed due to the following
error: No such interface supported (Exception from HRESULT: 0x80004002
(E_NOINTERFACE)).
The whole system runs fine when I test it on my computer IIS (I have Windows 7 with IIS 7). The problem starts when I publish it on server (Windows Server 2003 with IIS 6). I'm using asp.net 3.5 web services with SOAP 1.1. The VB dll is from the third part and I sadly can't debug it (the only thing I checked with dll creator is that binary compatability is enabled, I don't know VB at all), but when it runs outside the service (on Win Server 2003) it works fine.
Some explanation bout the types (WS_ResevatCLClass and WS_ResevatCL). In origin the dll has only one type: WS_ResevatCl. But when I look at the dll in component explorer in Visual Studio I see strange things - there is a class called WS_ReservatCLClass and 4 different interfaces: _WS_ResevatCL, WS_ResevatCL, WS_ResevarCL_v0 and WS ResevatCL_v1. And the most strange thing is that I can create instance of one them (WS_ResevatCL) and it drives exactly like an instance of the class.
Are there any significant differences between Win7 and WinServer2003 that can cause the crash with such exception?
Has anyone managed to get PDFCreator running on an ASP.NET 2.0 website ?
On my development machine with Visual Studio webserver, it works just fine after following this procedure :
create a com interop dll with tlbimp
reference this dll
write some code to use it
However, when I deploy it to our test server, it fails miserably with this error :
Retrieving the COM class factory for component with CLSID {082391C9-8188-4364-B4FD-66A1524B2097} failed due to the following error: 80070005.
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.UnauthorizedAccessException: Retrieving the COM class factory for component with CLSID {082391C9-8188-4364-B4FD-66A1524B2097} failed due to the following error: 80070005.
And I can't find this component in DCOMCNFG.msc.
Our server configuration :
Windows 2003
Asp.net 2.0
MS Office XP
PDFCreator 0.9.0
The problem is that IIS process (and so ASP.Net processes) run as the SYSTEM account, wich does not have any printers set up.
You have two options:
1 - Set up the printers for the system account using the article provided by Craig Lebakken
2 - Impersonate the ASP.Net site to use an account wich has the printers set up
The following Microsoft Knowledgebase article describes the problem and a solution:
COM objects fail to print when called from ASP