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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Permission Denied when making DLLs in VB

Status
Not open for further replies.

bistec

Technical User
Dec 12, 2001
16
AU
I'm developing VB DLLs to be called by ASP pages on the web. However I find that after I run the ASP pages that calls the DLLs, the next time I try to "make" the DLL, VB gave me Permission Denied error. I was told using MTS will help.
But so far, I find that it only helps a bit, such that I can make the DLL under a different name, eg mycom1.dll, mycom2.dll and drag and drop it into MTS and I'll only see mycom components, but VB still give me Permission Denied error.
Can anyone tell me whether there's a way around the Permission Denied error.
Thanks in advance!
 
Maybe you need to set the transaction timeout to zero!

Hope this helps you!
 
There are a number of things you should be aware of. First, you should be aware of compatibility issues for components while developing them. Components should be marked for "project compatibility" while developing them. Any component that is marked for binary compatibility may give you this error, particularly if you are altering a method signature. Once your components have tested out and you are ready to put them into production, they should be marked with "binary compatibility".
Second, whenever you want to save changes to a component you are debugging, you may need to "shut down server processes" in the MTS explorer window for the computer you are working with, which will most likely be your local computer. Another reason for this error is that the component is being referenced by an active project, so you'll need to uncheck the reference to the component, or close the project that is referencing the component before you try to save any changes.
 
If you are using dll (Developed in VB) in ASP and try to recompile the VB dll
First you have to remove all the references that were given to that dll or Even if this doesnt work you can unregister dll by using regsvr32 /u (here give path of dll) at run command.Then recompile dll.iI think then it should work.
 
I've found i need to stop IIS, make the change, and then restart the server
 
That's because the DLL is not registered as an MTS component. You have to shut down the IIS Administrator service, which keeps the DLL open indefinitely once an ASP page references it. Those who responded assumed the DLL was registered with MTS because, well, this is an MTS forum. If your component was registered under MTS, you could use the MTS explorer to shut it down (but, depending on what your DLL does, MTS might boost or reduce the performance of your application).

To save time in doing the shut-down and restart, I wrote a VB app that simplifies the update process. One button shells NET STOP to shut down the IIS Admin service, redirecting the output to a text file (using the DOS ">" symbol). The text file will contain a list of dependent processes that were also shut down.

A second button reads the text file and parses through it to get the names of the process that were shut down, the write a series of NET START commands to a BAT file that will restart them in reverse order (start with the last one to be shut down). Then this button's sub shells that BAT file.

With this code, I
- press button 1
- wait for the shelled stop command to finish
- recompile
- press button 2
- wait for the shelled BAt file to finish.

It saves a lot of time. Round trip on a P350 server w/IIS, SiteServer, NT4sp6a, MTS, etc takes about 2 minutes, and I don't have to worry about restarting the dependent services.

Larry

Larry
Larryh@ecn.ab.ca

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top