February 13, 2008, 10:10 AM
GamPMAINTAIN does not retrieve cgi variable
My maintain has the requirement of retrieving the username from the system.
So I set up my stsem with IIS secure (IWA and Basic checked, anonymous access disabled).
In tomcat I specified the tomcatAuthentication="false".
In the site.wfs I specified:
<sendvar>
FullUser=&REMOTE_USER
JustUser=&WF_REMOTE_USER
<endsendvar>
Restarted everything.
After restart I check with an ad hoc request:
TABLE FILE CAR
"FullUser = &FullUser"
"JustUser = &JustUser"
PRINT CAR MODEL SEATS
BY COUNTRY
END
and it gave me the expected uername with and without domain.
So I modified my maintain with the statement:
Compute mnt_user/a25 = IWC.getAppCGIValue("REMOTE_USER");
And ran it. The result is that my mnt_user variable is empty.
Also tried with the deprecated method IWC.FindAppCGIValue and that one gave me the value of 'null' for the variable requested.
Also tried it with WF_REMOTE_USER, with FullUser, with JustUser. All results just return a blank field.
Anything I'm doing wrong?
Oh, btw, this is release 764.
February 13, 2008, 10:17 AM
GamPNever mind, just found the reason.
It appeared that I had forgotten to switch the development environment from tomcat (8080) to IIS (80). IIS provides the userid, tomcat doesn't.
Problem solved.
February 13, 2008, 10:28 AM
Alan BGamP
Normally I would use either GETUSER or CNCTUSR as a reliable way of getting this info.
February 13, 2008, 03:54 PM
jbanas6make sure you modify the proper site.wfs as well. I made the same mistake when running through the cgi variables in 7.64. Modify in client76\cln\etc\ I couldn't figure out the WF_REMOTE_USER and that was because i didn't configure the client
------------------------
WF 5.33 WF 7.64
Windows 2003 server, Office XP, Apache