COM-object is locked after first use in ASP, DLL can't be deleted - why?
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Thread: COM-object is locked after first use in ASP, DLL can't be deleted - why?

Hybrid View

  1. #1
    Join Date
    Feb 2001
    Posts
    3

    COM-object is locked after first use in ASP, DLL can't be deleted - why?

    Hi there,

    I have a big problem with my COM-objects, after I compiled them as a DLL and after running them succesfully in an ASP-script I can't recompile the DLL in VC++ because the file is somehow locked - read: in use, but all my browser windows and server-sessions using this COM-object are closed. The only solution for this problem is to restart the computer, this is really a SLOW process ...
    I also tried to unregister the object with the regsvr32-command but this did not really help :-( ... any solution for this problem? Did I oversee a setting in the configuration of my IIS (Win2000) ? Or is the problem COM-related and if so, is there a fix? I think the solution must be very simple but for the moment I'm somehow to blind ... btw. this also happens with other components, so others than mine, the problem seems to be the ASP-script or so ...

    I use: set objTest = Server.CreateObject ("ASPTest.myASPtest")
    to create the object and
    objTest.Testfunc ()
    to call a function ... as it is described in every book ...

    HELP!?

    Thank you in advance!

    Tristan McLure


  2. #2
    Join Date
    Feb 2001
    Location
    Sydney, Australia
    Posts
    8

    Re: COM-object is locked after first use in ASP, DLL can't be deleted - why?

    Running an ASP script loads that object into memory, hence you cannot delete it. If it is an un-configured component, you'll need to restart IIS or if it is configured, just shut down the application in which the component sits.


  3. #3
    Join Date
    Jun 1999
    Posts
    28

    Re: COM-object is locked after first use in ASP, DLL can't be deleted - why?

    At your Windows->Start->Run type the following:
    net stop w3svc

    This will stop the IIS and MTS components and you don't need to restart the machine if you are using Windows 2000 (On NT4.0 somehow you may still have to restart the server).

    When you update your MTS components, you can run the following to resume the IIS:
    net start w3svc

    Hope this helps.


  4. #4
    Join Date
    Mar 2000
    Posts
    2

    Re: COM-object is locked after first use in ASP, DLL can't be deleted - why?

    Your DLL is locked by inetinfo.exe (IIS or PWS)
    Kill the process INETINFO.EXE, rebuild and restart inetinfo.exe


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center