locked
Assembly resolver issue in web application RRS feed

  • Question

  • User1577438142 posted

    Hi All,

    I have a web application running under IIS server, which is referring desktop application’s assemblies.

    I need to refer dependent DLL from desktop application’s installation path (e.g. C:\Program file\ApplicationV2\).

    In my current scenario, I am able to resolve dependent DLL, which has a direct reference, but if the instance of dependent DLL is created dynamically (through reflection) then the assembly resolver is failed to load the dependent DLL. The compiler giving an error “Could not load file or assembly 'file:///C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\myappdomain\879cbc93\806ed4e1\assembly\dl3\1be953eb\c09ec85a_7ae7d301\Helper.dll' or one of its dependencies. The system cannot find the file specified.”

    Dependent DLL must be load in the same ASP.NET temp folder where the main DLL is executing.

    If we tried to load dependent DLL separately then it is loading into a different ASP.NET temp folder, which is not useful.

    Does anyone have an idea on this problem? Alternative approaches are always appreciated.

    Thanks in Advance.

    Tuesday, May 29, 2018 9:18 AM

All replies

  • User753101303 posted

    Hi,

    A higher level view could perhaps help.

    You are not thinking you'll be able to refer a client side DLL from a web application ? What is the purpose of this dynamically generated assembly. It is not under your control ?

    Tuesday, May 29, 2018 1:58 PM
  • User1577438142 posted

    Hi All,

    I have updated the query to a better understanding.

    I have implemented a desktop application using WPF and same application I have to create for the web for remote access in LAN, which is possible using IIS server hosting. Both the application are residing in the local machine; however, the web version of the application can be accessible to the different machine through LAN.

    Since the desktop application is already implemented, I want to reuse the existing code by referring desktop application's assemblies, due to that I am using assembly resolver technique to achieve my goal, although it is working fine. The only problem is for loading dependent assembly, which is dynamically referring other DLL through reflection. 

    e.g: My web application is referring A.dll and that A.dll is creating the instance of B.dll dynamically (via reflection), that means in runtime A.dll is depended on B.dll.

    Thanks & Regards,

    Sayyed Azim

    Thursday, May 31, 2018 11:17 AM
  • User753101303 posted

    Still confusing. The basic scenario would be to reference this assembly from your web app and deploy this application to a web server (using "copy local" so that this assembly is deployed as part of the web app).

    For now it seems the application is installed on end user machines and you plan to install as well a web application on some of those machines and then have other users using a web site ??? Is this needed to have some local installs because the assembly does interact with local stuff ???

    Is a web app really the best solution or could it be better to use a remote desktop solution ?

    Thursday, May 31, 2018 11:31 AM