• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 322
  • Last Modified:

How do I use Request.ServerVariables in Delphi 2006

I have been given a code snippet from a client to retrieve a users id from their web environment:
sLogin = Request.ServerVariables("HTTP_X_LL_AFF_NTLM");

I have put the following code into my Delphi 2006 code:
sUserName := Request.ServerVariables('HTTP_X_LL_AFF_NTLM')

It will not compile due to 'E2003 Undeclared identifier 'Request' '.
I am obviously missing something.  Please could someone help me.

0
gms2702
Asked:
gms2702
1 Solution
 
BigRatCommented:
Are you actually using ASP components in Delphi? Could you post your snippet?
0
 
gms2702Author Commented:
Found alternative method.

      sHttpHeader := GetStringSetting( 'HttpHeader', '' );
      If not ( sHttpHeader.Trim = '' ) Then
        sUserName := CallingPage.Request.ServerVariables[sHttpHeader]
      Else
        sUserName := System.Threading.Thread.CurrentPrincipal.Identity.Name.ToString;
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now