I have built a com visible dll in .Net 3.5. As i wanted to call it from classic asp & I registered it in the following way.
Expand|Select|Wrap|Line Numbers
- gacutil /i COMCallFromASP.dll
- regasm /tlb COMCallFromASP.dll
Expand|Select|Wrap|Line Numbers
- <%
- Dim obj
- Set obj = Server.CreateObject("COMCallFromASP.HelloWorld")
- Dim str
- obj.SayHello "San", str
- response.write str
- %>
Now I made a change in the function body (not in the parameter or return type) to return like "Hi there San" & the I re-registered the dll by Uninstalling & installing the dll again...
Expand|Select|Wrap|Line Numbers
- regasm /u COMCallFromASP.dll
- gacutil /f /u COMCallFromASP
- gacutil /i COMCallFromASP.dll
- regasm /tlb COMCallFromASP.dll
When I restart the machine & then only I get the desired result. Guess there's a problem in dll caching.
Pls help how to do it without restarting the machine. I also checked the folder %SystemRoot%\System32\DllCache but theres no sign of my dll there at any time.
Also after the first call to the page i find dllhost.exe is running in the taskmanager & though I unregister the dll I can't delete the .tlb file as its locked by dllhost. Why dllhost is not unloading after the call?