Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem deploying ActiveX DLL on IIS

Status
Not open for further replies.

cynthialeslie

Programmer
Nov 25, 2003
2
US
Hello.

I am an experienced Web developer (experienced with HTML, Perl, C), but I am fairly new to ASP and ActiveX DLLs.

I need help understanding the correct procedure for uploading new versions of an ActiveX DLL to my Web server, which is a Windows 2000 Professional machine running IIS.

I used Visual Basic 6.0 to create a simple ActiveX DLL for testing purposes, and I created a simple ASP page that calls a function in the ActiveX DLL.

I placed the ActiveX DLL file and the ASP file on my Web server and used regsvr32 to register the ActiveX DLL.

When I load the ASP file into my browser, the code seems to work fine. However, after I run it once, the DLL file seems to be "locked." That is: I can't delete the DLL file, and I can't replace it with a new version of the DLL file until I reboot the server.

This means that every time I make a change to my VB code and compile a new version of the ActiveX DLL, I have to reboot the server in order to install the new DLL file!

Note that if I load the ASP file into my browser multiple times (which runs the DLL multiple times), it works okay - but I still can't delete or replace the DLL file until I reboot the server.

Can somebody tell me why this is happening?

Below is the VB source code for my ActiveX DLL, along with my ASP code.


* * * * * * * * * * * * * * * * * *
VB source code for ActiveX DLL
(this code is in a class named CSomeDLL, which is in a VB project named SomeDLL)
* * * * * * * * * * * * * * * * * *

Option Explicit

Public Function ReverseString(ByRef SomeString As String) As String

ReverseString = StrReverse(SomeString)

End Function



* * * * * * * * * * * * * * * * * *
ASP code
* * * * * * * * * * * * * * * * * *

<HTML>
<TITLE>My Cool DLL </TITLE>
<BODY>
<%
Dim finalanswer
Dim theObj
Set theObj=Server.CreateObject(&quot;SomeDLL.CSomeDLL&quot;)
finalanswer=theObj.ReverseString(&quot;whatever&quot;)
Response.write finalanswer
Set theObj = NOTHING
%>
<BODY>
<HTML>



Any and all help will be appreciated!


- Cynthia Leslie
 
Never mind - I have found the solution to this problem!

Microsoft Knowledge Base Article 200260 explains that this behavior is by design. The URL for the Microsoft KB article is
To replace the DLL on the server with a new version, I followed this procedure:

* On the server, at the cmd line, type: net stop iisadmin /y and then press Enter.

* Replace the old DLL file with the new DLL file.

* Type: net start w3svc from the run line.

- Cynthia Leslie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top