how to import a dll into a asp.net web application running on webserver

19,597

You need to copy the DLL to the bin (instead of app_code) folder of the web server, and even better - click on Add Reference on the Web Site in Visual Studio and add your DLL as a reference. And you should also probably read some more about ASP.NET fundamentals

Here is an article that explains ASP.NET compilation in detail: http://www.west-wind.com/presentations/AspNetCompilation/AspNetCompilation.asp

Share:
19,597

Related videos on Youtube

Beginner
Author by

Beginner

I am a Beginner to everything

Updated on June 14, 2022

Comments

  • Beginner
    Beginner over 1 year

    I have a dll created in VS 2010. i put it into the app_code folder on the webserver and then i accesses it by trying to use imports GetWebPageData

    the dll is in the vs project under bin/debug if that means anything

  • Beginner
    Beginner about 12 years
    the website is running on server and not in vs
  • Beginner
    Beginner about 12 years
    i get error - This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
  • Vroomfundel
    Vroomfundel about 12 years
    then you need to build your assembly (the DLL file) with the same version of the .NET framework. Check what version are you running on the server - that's done with the IIS console, check the properties of the web application. Then, in Visual Sudio go to project properties of your class library and set the same version explicitly.