How to animate a CGI program running on Microsoft Internet Information Services (IIS) of Windows XP with Net Express 4.0 or 5.0?

echinoidqueenΔιακομιστές

4 Δεκ 2013 (πριν από 3 χρόνια και 9 μήνες)

125 εμφανίσεις

How to animate a CGI program running on Microsoft Internet
Information Services (IIS) of Windows XP with Net Express 4.0 or 5.0?


There is a difference between Microsoft Internet Information Services (IIS) that comes
with Windows 2000 and the one that comes with Windows XP. The one in Windows
2000 is version 5.0 while the one in Windows XP is version 5.1. The security in the last
one is much tighter than in the first one.

IIS is running as a Windows service, and it is actually IIS that is running the CGI
program upon the web user’s request. Net Express on the other hand is a desktop
application, and IIS is not permitted to interact with the desktop by default. However, this
seems to be possible in IIS 5.0 of Windows 2000 by simply running the CBLCORED –I
command from the Net Express Command Prompt. In IIS 5.1 of Windows XP, more
steps are required.

Here are the complete steps to allow animating a CGI program running on IIS 5.1 of
Windows XP with Net Express 4.0 or 5.0:
1. Make sure you have IIS installed
2. Open Net Express
3. Go to Options | Project
4. Uncheck the “Use SOLO as the WebServer” option
5. Make sure the port number is 80, which is the default port number for IIS, or make
the change accordingly if IIS is not using port 80
6. Click the OK button to close the project options window
7. Close the Net Express window
8. Go to Start | Control Panel | Administrative Tools | Internet Information Services
9. Click on + to expand the sever name
10. Click on + to expand Web Sites
11. Click on + to expand Default Web Site
12. Right-click on Default Web Site
13. Select New | Virtual Directory
14. Click on Next
15. Type an alias for the virtual directory (e.g. cgi-bin)
16. Click on Browse to select the location of the CGI program
17. Click on Next
18. Make sure Read and Execute options are checked
19. Click on Next
20. Click on Finish
21. Right-click on the new virtual directory (see step #15) in the Default Web Site tree
view
22. Click on Properties
23. Click on the Directory Security tab
24. Uncheck the "Anonymous access" option
25. Make sure the "Integrated Windows authentication" option is checked. This would
force the user to log on using their Windows user id and password
26. Click OK
27. Close the Internet Information Services window
28. Go to All Programs | Control Panel | Administrative Tools | Services
29. Double-click on IIS Admin
30. Click on the Log On tab
31. Check the "Allow service to interact with desktop" option
32. Click OK
33. Close the Services window
34. Go to Start | All Programs | Micro Focus Net Express 4.0/5.0 | Net Express [32-bit]
Command Prompt
35. Execute cblcored -i
36. Close the Net Express Command Prompt window
37. Open Net Express
38. Open the CGI project
39. Open the CGI source file
40. Insert CALL "CBL_DEBUGBREAK" as the first statement under Procedure
Division
41. Save the change
42. Make sure all HTML forms that require the action to invoke a CGI program is
pointing to the same alias or virtual directory as specified in step #15
43. Rebuild the project
44. Run the project – DO NOT ANIMATE – (alternatively close the Net Express
window, open the Web browser, and type in the URL to open the input HTML form
or run the CGI program)
45. Click Yes when prompted to invoke the debugger – A new session of Net Express is
started to animate the CGI program
46. Step through the code as usual

Note: Do not forget to remove the CALL “CBL_DEBUGBREAK” statement and rebuild
the CGI program before deploying!