Monday, February 7, 2011

How to consume a .NET Dll in Classic ASP?

1.Use regsvr32  /u   to uninstall the existing  OLD ASP dll by navigating to the exact path of dll location in command prompt.
   Eg:regsvr32  /u CLib.dll

2. Go to Visual Studio Command Prompt.

3. Navigate to the path where the new .Net Dll (say CLib.dll) is residing.

4. Make the assembly CLibshared by adding it to GAC using below statement
   gacutil –i  CLib.dll 

5. Install the assembly into the registry using below command.
   regasm CLib.dll /tlb: CLib.tlb

6. Reset the IIS using command iisreset(not mandatory)

7. Now we can use our .Net DLL CLib.dll in ASP page.