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
Related videos on Youtube
Comments
-
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 about 12 yearsthe website is running on server and not in vs
-
Beginner about 12 yearsi get error - This assembly is built by a runtime newer than the currently loaded runtime and cannot be loaded.
-
Vroomfundel about 12 yearsthen 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.