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
Related
This is my first time using IIS so I don't know much about how it works.
I developed an ASP.net c# web form app, in order to deploy it on a server using IIS. I had Visual Studio installed on the windows server, to make sure the app works fine, no problems up to this point.
When I publish the app from visual studio, and put the file system generated inside inetpub/wwwroot... the pages load fine but just when a I try feature of the app that needs an external library, an exception is raised exactly in the line where the first external library's object instaciated within the code (Information givven by the log).
I'm suspecting that once deployed on IIS app has no reference for the libraries or doesn't have the rights to access them since I haven't touched anything inside IIS besides adding the file system to the depault app pool. But how can I adress this issue?
Here are the two errors traces I got from my log :
Retrieving the COM class factory for component with CLSID {ED0EC116-16B8-44CC-A68A-41BF6E15EB3F} failed due to the following error : 80070154 Class not registred (Exception HRESULT : 0x80040154 (REGDB_E_CLASSNOTREG)).
Or Other Times:
Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error : 80070005 Access Denied. (Exception HRESULT : 0x80070005 (E_ACCESSDENIED)).
Thanks in advance.
The application is run on IIS base on the pool that you have assign it to it. This pool is run under a specific account.
So add this account to the DCOM Config to been able to access it.
First step is to find your pool user as.
Then add permissions for that user on your DCOM Applications so the pool can read them and run them.
To find the DCOM Config, go to
Control Panel | Administrative Tools | Component Services
Then open
Component Services | Computers | My Computer | DCOM Config
There find your applications that you use, left click to open the menu and select properties... there give permissions to your Pool user
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.
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 have an ASP .NET web application which has references to assemblies from the 32-bit Crystal Reports runtime. (Installed from CRRedist2008_x86.msi)
The server on which it has been deployed has a 64-bit Crystal Reports runtime.
The form containing the CrystalReportViewer throws the following exception:
System.TypeInitializationException: The type initializer for
'CrystalDecisions.CrystalReports.Engine.ReportDocument' threw an
exception. ---> System.UnauthorizedAccessException: Retrieving the COM
class factory for component with CLSID
{5FF57840-5172-4482-9CA3-541C7878AE0F} failed due to the following
error: 80070005. at
CrystalDecisions.CrystalReports.Engine.ReportDocument..cctor() --- End
of inner exception stack trace --- at
CrystalDecisions.CrystalReports.Engine.ReportDocument..ctor() at
[qualifiedFormName]_Load(Object sender, EventArgs e)
While I realize that making the dev environment identical to the runtime environment would the ideal solution, I was hoping there were some way to resolve this without having to upgrade the development environment.
Would updating the references to Crystal Reports assemblies in web.config on the server work?
Open windows registry (Regedit.exe)
Search for 5FF57840-5172-4482-9CA3-541C7878AE0F
You should find a key, expand it and go to each child nodes until you find the installation path.
Go to that path (usually C:\Program ...\Business Objects...\bin...)
Grant full permission for ASP .NET, IIS worker process, Anonymous Web User process accounts
You should be good to go.