Title: TRtcISAPIServerProvider - ServerVariable function Post by: roman.vitek on January 22, 2014, 12:45:16 PM Is there any chance to use function: TRtcISAPIServerProvider.ServerVariable() from ISAPI application ?
I have problem with server variable AUTH_USER (for automatic login). I found that in TRtcISAPIServerProvider.ExecuteRequest is this: s:=ServerVariable('ALL_RAW',8192); but when I used: login := Request.Value['AUTH_USER']; threre is nothing. In my old code I used TISAPIRequest.GetFieldByName('AUTH_USER') which return correct value. Thanks, Roman Title: Re: TRtcISAPIServerProvider - ServerVariable function Post by: D.Tkalcec (RTC) on January 22, 2014, 01:08:17 PM This is because in header value names in the ISAPI, all underscores are converted minus, to keep the code compatible with stand-alone Servers. In other words, to access the "AUTH_USER" header value, you need to use TRtcDataServer(Sender).Request['AUTH-USER']
Best Regards, Danijel Tkalcec Title: Re: TRtcISAPIServerProvider - ServerVariable function Post by: roman.vitek on January 22, 2014, 03:42:38 PM I use RTC version 5.17 in Delphi XE so I don´t known if your answer is correct for this version too. I change RTC source code (move TRtcISAPIServerProvider.ServerVariable to Public section add and new function in TRtcISAPIServer) and this way I can call server variable form my code. And It´s working now. When I call my "GetServerVariable('AUTH_USER')" then I get correct value. But in "Request.HeaderText" there are not value for parametr AUTH_USER nor AUTH-USER. I tested this on Win 2012 + IIS 8.x.
Roman Title: Re: TRtcISAPIServerProvider - ServerVariable function Post by: D.Tkalcec (RTC) on January 22, 2014, 03:56:38 PM Can you check what you get from the "ALL_RAW" server variable? I want to know if the text you get from the "AUTH_USER" variable is available there. All Request header values should be returned by the Server when requesting the "ALL_RAW" variable.
Best Regards, Danijel Tkalcec Title: Re: TRtcISAPIServerProvider - ServerVariable function Post by: roman.vitek on January 23, 2014, 09:00:36 AM It´s the point, I found in RTC source "ALL_RAW" and I thought that server return all server variables this way. But my experiance is different: AUTH_USER is NOT in ALL_RAW but I get it with "my" new function GetServerVariable. Result: I think that MS change this in new version of IIS - may be "security reason" ?
So I think that function GetServerVariable() will be usefull in next version of RTC. Roman Title: Re: TRtcISAPIServerProvider - ServerVariable function Post by: D.Tkalcec (RTC) on January 23, 2014, 02:04:30 PM Ok, thanks for the info. A new RTC SDK update is now available (v6.29), with the GetServerVariable function exposed on the TRtcISAPIServer component. You can download it from the RTC SDK Downloads area on the Forums.
Best Regards, Danijel Tkalcec |