How to deploy an app using external libraries In IIS

0

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.

asp.net
iis
dll
deployment
windows-server-2012-r2
asked on Stack Overflow Jan 23, 2020 by Marouane • edited Jan 23, 2020 by Marouane

1 Answer

0

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

answered on Stack Overflow Jan 23, 2020 by Aristos

User contributions licensed under CC BY-SA 3.0