How do I use Request.ServerVariables in Delphi 2006

Posted on 2008-11-05
Last Modified: 2010-04-04
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.

Question by:gms2702
    LVL 27

    Expert Comment

    Are you actually using ASP components in Delphi? Could you post your snippet?

    Accepted Solution

    Found alternative method.

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

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
    Windows Script Host (WSH) has been part of Windows since Windows NT4. Windows Script Host provides architecture for building dynamic scripts that consist of a core object model, scripting hosts, and scripting engines. The key components of Window…
    The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
    This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now