none
Any DLL affect only one page not all Project in ASP.Net. RRS feed

Answers

  • No. DLLs are loaded into the process so they could impact anything running in that process. The only way around this in .NET would be to load the assembly in a separate app domain, do whatever you need to do and then shut down the app domain but that is generally overkill and introduces its own set of issues.

    I guess if it were a native DLL you could also load the library, do the work and then unload it. But this isn't realistic in a web app.

    I believe you should post this question and a more thorough explanation of what you're trying to accomplish in the ASP.NET forums. It is likely that the problem you're trying to solve already has a better solution through other web technologies like APIs, client side components, etc.


    Michael Taylor http://www.michaeltaylorp3.net

    Tuesday, April 30, 2019 3:31 PM
    Moderator
  • Actually I have a project in which i want to add reference itextsharp.dll but it through compile time error like below:

    Error CS0433 The type 'Org.BouncyCastle.Crypto.Engines.AesFastEngine' exists in both.


    Well, is there already a version of the DLL being referenced in the project? If so, why are you trying to use another version? Why can't you remove the one that is already being reference and use the other one? Why can't you use Nuget for itextsharp and let it update your project with the right DLL version?
    Wednesday, May 1, 2019 7:11 AM

All replies

  • You set project reference to a DLL in an ASP.NET project just like any other .NETDLL. If you don't what the server-side C# code of an ASP.NET project to using the functionality of a DLL that has been refernced  that may be used by other aspects of the ASP.NET project, then you don't address the namespace used by the  DLL and the particular code can't use any of the DLL's code by use of the DLL's namespace..
    Tuesday, April 30, 2019 1:10 PM
  • No. DLLs are loaded into the process so they could impact anything running in that process. The only way around this in .NET would be to load the assembly in a separate app domain, do whatever you need to do and then shut down the app domain but that is generally overkill and introduces its own set of issues.

    I guess if it were a native DLL you could also load the library, do the work and then unload it. But this isn't realistic in a web app.

    I believe you should post this question and a more thorough explanation of what you're trying to accomplish in the ASP.NET forums. It is likely that the problem you're trying to solve already has a better solution through other web technologies like APIs, client side components, etc.


    Michael Taylor http://www.michaeltaylorp3.net

    Tuesday, April 30, 2019 3:31 PM
    Moderator
  • Actually I have a project in which i want to add reference itextsharp.dll but it through compile time error like below:

    Error CS0433 The type 'Org.BouncyCastle.Crypto.Engines.AesFastEngine' exists in both.

    Wednesday, May 1, 2019 4:14 AM
  • Actually I have a project in which i want to add reference itextsharp.dll but it through compile time error like below:

    Error CS0433 The type 'Org.BouncyCastle.Crypto.Engines.AesFastEngine' exists in both.


    Well, is there already a version of the DLL being referenced in the project? If so, why are you trying to use another version? Why can't you remove the one that is already being reference and use the other one? Why can't you use Nuget for itextsharp and let it update your project with the right DLL version?
    Wednesday, May 1, 2019 7:11 AM
  • thank u so much
    Wednesday, May 1, 2019 9:37 AM