Click here to Skip to main content
13,044,428 members (116,913 online)
Click here to Skip to main content
Add your own
alternative version


18 bookmarked
Posted 3 Aug 2004

Modify the realm in the browser's authentication dialog

, 3 Aug 2004
Rate this:
Please Sign up or sign in to vote.
An article on using ISAPI with MFC support to modify the authentication realm.


This article shows how you can use the SF_NOTIFY_SEND_RESPONSE notification that is not available if you use the MFC ISAPI Filter App-Wizard. With this sample, you are able to use the function OnSendResponse to modify the header and data of each HTTP response before the IIS sends it back to the client's browser.


In the GetFilterVersion, we register the SF_NOTIFY_SEND_RESPONSE flag. Then, we wait in the overwritten HttpFilterProc for the SF_NOTIFY_SEND_RESPONSE notification and call our own OnSendResponse routine. In all other cases, we call the standard CHttpFilter::HttpFilterProc.

Using the code

What we can do with the OnSendResponse routine is to modify the realm.

Authentication Dialog


Keep it simple. There are two GUI front-ends to configure this filter. The first is called regedit.exe and the second is called regedt32.exe, you will found it on your server ;o). Create two subkeys under HKEY_LOCAL_MACHINE\SOFTWARE\ called "LEAN Software Production\IISModifyRealm", and under this, a String value Realm; the Value data will be the realm.

the gui frontend

  1. Copy the IISModifyRealm.dll file to the %WINDIR%\System32\inetsrv directory.
  2. Make sure the System account has execute rights on the filter DLL file.
  3. Start "Internet Information Services" from the Control Panel\Administrative Tools, and open the Properties of your Default Web Site.
  4. Click the ISAPI Filter Tab and Add the Filter by typing a name and the full path to the Filter DLL (%WINDIR%\System32\inetsrv\IISModifyRealm.dll).
  5. Restart the WWW service.


// Copyright (C) 2004 LEAN Software Production
if((this == "nice") || (this == "great")) 
    pReponse->SetHeader(pfc, (char*) _T("great-stuff:"), (char*) _T("true"));
    return SF_STATUS_REQ_ERROR; 

Please rate this article for me! You found the rating down right.


Version: - prepared for uploading.


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Germany Germany
Interested about me, then ask

You may also be interested in...

Comments and Discussions

GeneralMy vote of 2 Pin
Sapien211-Jun-09 1:53
memberSapien211-Jun-09 1:53 
GeneralI Need username and password from the textbox introduced Pin
maparicio31-Mar-08 1:59
membermaparicio31-Mar-08 1:59 
GeneralRe: I Need username and password from the textbox introduced Pin
Proxy4NT6-Apr-08 23:56
memberProxy4NT6-Apr-08 23:56 
QuestionHow can modify the content of body Pin
Morteza Ghasemi10-Dec-05 5:53
memberMorteza Ghasemi10-Dec-05 5:53 
AnswerRe: How can modify the content of body Pin
Proxy4NT11-Feb-06 5:53
memberProxy4NT11-Feb-06 5:53 
GeneralISAPI 2003 Pin
waelahmed16-Aug-04 3:03
memberwaelahmed16-Aug-04 3:03 
GeneralRe: ISAPI 2003 Pin
Proxy4NT16-Aug-04 5:52
memberProxy4NT16-Aug-04 5:52 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.170713.1 | Last Updated 4 Aug 2004
Article Copyright 2004 by Proxy4NT
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid