Tuesday, July 14, 2009

Is it possible to use a DLL in an ASP.NET (C#) application?

I am fairly new to ASP.NET, and would like to write a web-based application in C#. I was wondering if it were possible import a dll I made that generates Sudoku puzzles. It is located on my server and I want to use it in my application.


Thank you.

Is it possible to use a DLL in an ASP.NET (C#) application?
it depends on what the DLL.
Reply:it depends on what the DLL.





You can reference .NET assembles (they are a kind of DLL's) from any .NET application (including ASP.NET applications).





You can also reference COM components.





From visual studio, Right click your project, and choose Add Reference. Browse for your DLL and add it. You should now be able to access classes/methods in the DLL.





Hope this helps.
Reply:No problem, just right click on the project in the project explorer and choose Add Reference and choose the DLL you created.
Reply:yes, if the dll is an assembly container...





When deploy your application, load the dll in the assembly global cache (normally c:\windows\assembly directory)

verbena

No comments:

Post a Comment