Highlighted
Absent Member.
Absent Member.
2592 views

[archive] Windows 2008 CGI Error 502.2 - Bad Gateway

[Migrated content. Thread originally posted on 03 July 2010]

I have been using the 7.2.1 runtime as CGI on a Windows 2000 Server computer running IIS 5 to dynamically return Vision query results. I am now trying to use the 8.1.2 runtime as CGI with the same COBOL objects on a Windows 2008 Server running IIS 7. In the web site setup on the new server, I did "Add Application" using the cgi-bin folder where the runtime resides. I can use the runtime in that folder from the Windows desktop with no problems. When I try to call it through IIS, I get the following error message:

HTTP Error 502.2 - Bad Gateway
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are "License file '\\?\D:\database\cgi-bin\wrun32.dll' inaccessible ".

Module CgiModule
Notification ExecuteRequestHandler
Handler CGI-exe
Error Code 0x0000000a
Requested URL http://data1.bsmgr.com:80/cgi-bin/wrun32.exe?-f+BKSEARCH
Physical Path D:\database\cgi-bin\wrun32.exe
Logon Method Anonymous
Logon User Anonymous

I ran the license activator in the D:\database\cgi-bin folder. The runtime, dll and license files are all in that folder. I put the folder in the system path. I gave the IUSR user Modify/Read/Write permissions on the folder and everything in it (files and subfolders), and even tried it with the Windows Firewall disabled.

Any ideas or suggestions? Is there a setup sequence somewhere for implementing the runtime for use with CGI calls on IIS 7 in Windows 2008?

TIA!

Shane
0 Likes
3 Replies
Highlighted
Absent Member.
Absent Member.

RE: [archive] Windows 2008 CGI Error 502.2 - Bad Gateway

I don't have anything specific to your problem, but will share my own experience with Server 2008 and windows 7 environments, that programs need to be installed as administrator. I had to re-install the programs and select 'run as administrator' and then they worked as before. I haven't had any problems with my Extend8 runtimes in these environments, but other applications that I call were suddenly not working properly after I had upgraded them. Even though, I was an administrator group member, they didn't work properly. One vendor suggested the above and it did the trick for me.
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Windows 2008 CGI Error 502.2 - Bad Gateway

Even though it was working with a desktop shortcut, I unistalled 8.1.2, then re-installed choosing "run as administrator" for "autorun.exe" on the root of the CD (since that is what the AUTORUN.INF file runs). I can still run COBOL programs with a desktop icon, and I still get the 502.2 error as inidicated above when trying to call wrun32.exe from a web page. Has anyone been able to get the runtime to work from IIS 7.0 on Windows 2008 as a CGI application?
0 Likes
Highlighted
Absent Member.
Absent Member.

RE: [archive] Windows 2008 CGI Error 502.2 - Bad Gateway

In the error message you posted, it looks like the request URL points directly to wrun32.exe in your cgi-bin directory. I don't think this is how you want it set up. Typically the requested URL is to a compiled object file (.acu) located in cgi-bin. Then your IIS configuration for the cgi-bin directory would make an association between files with the .acu extension and the wrun32.exe executable (which might be in its normal c:\program files... location).

extension: .acu
executable: "c:\program files\acucorp\acucbl812\acugt\bin\wrun32 -f %s"
(IIS will replace the %s with the targeted .acu filename)

I don't recall if I've tested this on IIS 7 on Win2008 but it should be a similar setup.

If you had it working with version 7.2.1 can you review how you've got it set up there?
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.