Click to See Complete Forum and Search --> : components contd......
rammy
Jan 12th, 2001, 01:41 AM
Hi,
Ive created a component using VB. I now need to be able to use this component from an ASP file. How do I go about registering the dll file on the server? (the server is a different computer from the one Ive developed the dll on.) Is there anything to be done other than just copying the dll file to the server and then using regsvr32 <dllname> to register it??? :confused:
Thanx in advance.
Clunietp
Jan 12th, 2001, 10:32 AM
Keep in mind that you actually have to physically go over to the server and run REGSVR32. Putting the DLL on the server via a shared directory and running regsvr from your development PC will only re-register it on your development PC
I don't mean to insult your intelligence if I did, but this might be news to you :) Otherwise, please ignore this post and accept my apologies
rammy
Jan 16th, 2001, 03:13 AM
yes, i do realize that i have to do that.... :-) but is there anything else to be done?? coz this isnt working
[Edited by rammy on 01-16-2001 at 04:17 AM]
rammy
Jan 16th, 2001, 04:32 AM
well, Ive managed that....have got my asp file running....but Im stuck with another problem....when I make any changes to the dll file and then try to replace the old dll file existing on the server, I get an error message saying "Cannot delete file. The source or destination files may be in use" ...but Ive unregistered the old dll before trying to delete it. Any ideas??? as of now Im getting my work done my placing multiple copies...in different folders and then working....
Thanx a ton.
razzaj
Jan 16th, 2001, 12:28 PM
I am facing the same problem you were facing before , the one of rgistering the component ... please can you tell me what you did other than Put the Dll on the Server and Run Regsver32 ??? coz I am stuck...
Thank you
rammy
Jan 16th, 2001, 09:49 PM
razzaj,
thats abt all I did...copied the file onto the server and ran regsvr32 <dllname>. But Ive been told that there's another way of going abt this....that involves COM+.....but Im not sure abt how to go abt that....any ideas, anyone?
rammy
Jan 16th, 2001, 09:56 PM
guess this is kinda related...when u register the dll, where does it get registered?
Clunietp
Jan 16th, 2001, 10:11 PM
Hello all
when you register a DLL, the appropriate keys that COM relies on are added to the registry. COM won't work without these keys
The reason you are getting a "can't delete file, the file is in use" is because when you call a COM, the DLL runs in-process with the calling application, whether it be IIS or your own EXE. Of course, there are exceptions to this (like MTS or COM EXEs). What you have to do is shut down the process that created these objects, in your case it would be IIS. Stop and restart the WWW service and the IISAdmin service, you should then be able to replace your DLL
Clunietp
Jan 16th, 2001, 10:24 PM
I'd also like to post my method of how I get around this problem
I usually have my components registered with MTS. I may or may not have them run as a server package or library package, depending on various factors
If I run them as a dedicated server process (in its own process), then I can shut down the package via the MTS manager and replace the DLLs as I like
If I run them as in-proc library packages, I will usually run the website in a separate address space so that I may press the UNLOAD button in the IIS manager for that application. I may then replace the DLLs as I like.
By using MTS I can manage all of my components remotely and never have to walk up to the server to do any REGSVR32ing :)
rammy
Jan 16th, 2001, 10:32 PM
how do u do that Clunietp?
Clunietp
Jan 16th, 2001, 10:33 PM
do what?
I think that should have read stop iisadmin and wwwroot services, copy on the new dll, register it then restart the iisadmin and www services.
If you are using Win2k and IIS5 you can just drop the new dll straight onto the server and it does the rest for you. Sounds pretty good to me.:)
rammy
Jan 17th, 2001, 10:25 PM
well, Ive finally managed to get it all to work! Thanx a lot to everyone who helped me out here! :)
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.