Jump to content

Single-Sign-On in IIS ISAPI mode


Raymond Ng

Recommended Posts

how can unigui get the windows logon User id and Domain (using AD) during ISAPI launching ?

Eg.
1.) User login into Windows using Active Directory authentication
2.) User Launching ISAPI web application (IIS), here need to read the User id and Domain entered during step 1
3.) Application go to main page if User id/Domain is valid, otherwise go to Login page  

Link to comment
Share on other sites

2 hours ago, Raymond Ng said:

how can unigui get the windows logon User id and Domain (using AD) during ISAPI launching ?

Eg.
1.) User login into Windows using Active Directory authentication
2.) User Launching ISAPI web application (IIS), here need to read the User id and Domain entered during step 1
3.) Application go to main page if User id/Domain is valid, otherwise go to Login page  

Hello,

how You do this on VCL ?

Is the same .

Link to comment
Share on other sites

Sample code in windows application using windows API 'GetUserName'

  dwUserNameLen := cnMaxUserNameLen - 1;
  SetLength(UserName, cnMaxUserNameLen);
  GetUserName(PChar(UserName), dwUserNameLen);
  SetLength(UserName, dwUserNameLen);
  Self.AddLog('GetUserName:'+UserName);

In Windows application, it can return the correct logon windows Id, but the same code does not work in ISAPI mode, it only return the default id defined in IIS (Server).

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...