WodVPNCom does not OLE.Disconnect in ISAPI Applica (General questions)
I use the wodVPNCom-Component in a Delphi ISAPI-WebModule.
Everything works great until I want to shutdown the Server.
The Application hangs when the destructor of the component is called.
I could track with the Debugger until
[code]
CP: IConnectionPoint;
CP.Unadvise(Connection) //program freezes
[/code]
Why is the component not destroyed?
Re: WodVPNCom does not OLE.Disconnect in ISAPI App
Bencoder,
I don't think we can say - I have no idea what and how this happens under the hood .
Any chance you can send us something we can run on our computer to see what's going on?
Kreso
Re: WodVPNCom does not OLE.Disconnect in ISAPI App
A Delphi Project is available at this link:
Bencoder_wodvpn_isapi.Zip by Bigupload.Com
Attach the DLL to an IIS and then try to shutdown.
IIS can't be terminated anymore.
Restart Server or use Delphi Debugger with Attach to Process...
Thanks for you fast(!) answer!
Re: WodVPNCom does not OLE.Disconnect in ISAPI App
Hi bencoder,
I'm not really a Delphi guru, so i must ask if you could perhaps provide me with exact steps to reproduce the issue?
I've downloaded the sample you provided.
Regards,
Damba
How to create an ISAPI DLL and debug it in delphi
Well, alright!
You need IIS on your computer.
!!! Start the IIS Admin and WWW-Publishing Service with your UserAccount-Settings !!!
1. Open Delphi Project. (I open it in Delphi2007)
2. Specify in Project/Options... (last menupoint) -> Directories -> OutputDirectory a valid Directory, equivalent to the one specified.
3. Go to DELPHI_PROGRAM_DIR /lib/ and temporarly(!) replace the ComObj.dcu and OleServer.dcu with their equivalent in the debug-subdirectory. (That makes debugging easier)
4. Compile/Generate the application.
5. Go to IIS Administration Tool: My Workplace -> (right click) manage -> Services and Application -> Internet Information Services -> [Choose the Website] -> (right click) Properties -> Basicdirectory (lower 3rd register from left) -> Configuration... -> Add -> [Select the compiled DLL and an Extension e.g. wod ] -> [Checkbox: Check file exists DONT CHECK] -> OK -> OK
6. Make sure WWW-Publishing Service (usually last Service) is Running.
7. Open URL: http://localhost/somefilename.wod -> Blank Page is success
8. Set a breakpoint in the WebModuleDestroy-Method.
9. In Delphi: Menu Run/Attach to Process.../[select the inetinfo.exe] -> Connect
10. Wait until all modules are loaded and click Run...(|>) if a breakpoint stopps the loading process.
11. Now stop the WWW-Service. The Debugger should halt at the breakpoint.
12. Debug...
Hope this is detailed enough and that is works :)
Re: WodVPNCom does not OLE.Disconnect in ISAPI App
bencoder,
For some reason, i'm stuck at step 7. When i open any file ending with .wod, it errors with Page cannot be displayed error.
I followed your steps exactly, and I can open any other files. WWW Publishing service is running, and when I attach Delphi to inetinfo.exe everything is ok. However, when i stop service, nothing happens?
The debugger doesn't enter the code, nor does it stop.
Perhaps I made a mistake somewhere?
regards,
Damba
IIS is a funny thing
Sounds good so far,
i hope that at least http://localhost/ shows a testpage, so the webserver is running.
* The DLL in the inetsrv directory needs access permissions.
The user who executes the iis/www-service and the IWAM-<COMPUTERNAME> User get access permissions.
* At the InternetInformationService-Administration-Tool -> Register BasicDirectory -> [Set the 1st ComboBox to at least just Scripts ] and [Activate the 1st CheckBox ScriptAccess ]
* At Point 5 -> is the mentioned checkbox really unchecked?
You did great job until now.
btw, do you understand my English well? It's not my mother-tongue.
Re: WodVPNCom does not OLE.Disconnect in ISAPI App
Hi bencoder,
I did all that, as well as providing IIS admin privileges, but to no avail. The server works well, i get standard help page when I open http://localhost , but if I enter any resource with .wod extension, then The page cannot be displayed appears.
I'm testing this on WinXP SP2. Could this be the problem?
I also did what you suggested for scripts only as well as Scripts and Executables but no effect.
Also, I can understand you well...
Any other suggestions? What OS are you trying this on?
Regards,
Damba
Exact Error
I develop in Win2K and IIS 5.0 but I have also a Test-Environment in WinXP SP2.
In WinXP the DLL works, or better, I can't unload the DLL too.
What HTTP Error-Code do you get?
Better HTTP 500 Error Description
HTTP 404 means, the 'wod'-Extension is not mapped to the DLL properly.
-----------------------
Did you check the Scriptmodul Checkbox (upper checkbox) in the dialog where you define the path to the DLL?
-----------------------
Did you configure in Internet-Informationservices the Basicdirectory of the Websites or Defaultwebsite Sub-treeitem.
Configure the Defaultwebsite .
-----------------------
Have you ever changed the computername after installing IIS? Then you might do a clear reinstall of IIS. (Uninstall, Reboot, Install)
Re: WodVPNCom does not OLE.Disconnect in ISAPI App
Bencode,
Could you contact us on techsupport@weonlydo.com ?
I'd like to provide you with access to a Virtual machine, so you could set up the environment so that we could duplicate the problem that you have...
Regards,
Damba