Having trouble stopping the Windows authentication dialog popping up when using THTTPRIO. Posted on SO, but not received an acceptable answer yet. Perhaps one of you chaps has managed to fix the problem? http://stackoverflow.com/questions/28674117/how-do-i-stop-the-authentication-dialog-appearing-when-using-thttprio

Having trouble stopping the Windows authentication dialog popping up when using THTTPRIO. Posted on SO, but not received an acceptable answer yet. Perhaps one of you chaps has managed to fix the problem? http://stackoverflow.com/questions/28674117/how-do-i-stop-the-authentication-dialog-appearing-when-using-thttprio
http://stackoverflow.com/questions/28674117/how-do-i-stop-the-authentication-dialog-appearing-when-using-thttprio

Comments

  1. In the MSIE settings, there are a couple of candidates related to authentication.

    The first setting:
    Internet Options, Security Tab, for each of the relevant zone(s), Custom Level, all the way at the bottom of the list, User Authentication, Logon - select one of four (anonymous, auto in intranet, auto with current user/pwd, prompt for user/pwd).

    My guess, the last one was selected?

    The second setting:
    Internet Options, Advanced Tab, a bit down in the list, "Enable Integrated Windows Authentication".
    Not sure that this one matters for your problem, unless one of the automatic login options were chosen.

    ReplyDelete
  2. Note that I am unsure if this affects THTTPRIO at all.

    ReplyDelete
  3. Thanks Lars, but the link relates to another issue with THTTPRIO authentication that is now fixed in XE7. Everything works fine for if the authentication credentials are correct. However, if they are not, Windows pops up an authentication dialog. Obviously, this is not great, especially when running as a Windows service. It seems that HTTPRIO uses the wrong Windows API  - WinINET when it should use WinHTTP - Any chance this will be fixed Marco Cantù? It's causing us some real issues.

    ReplyDelete
  4. Paul Thornton from a scheduled blog post referencing http://qc.embarcadero.com/wc/qcmain.aspx?d=44847 Functionality has been broken or limited in use for a very long time. For instance,the SOAP implementation still relies onWinINet, even though that has been deprecated and should have been replaced by WinHTTP support, and a QC report has been in place since 2007.

    ReplyDelete
  5. Jeroen Wiert Pluimers - Thanks. Yes, I saw that post. Perhaps Marco Cantù could give us an update on the current status?

    ReplyDelete
  6. AFAIK, THttpRio can use either WinINET (since it was introduced, I know long ago) or use Indy. Moving to WinHTTP seems a good idea, but not something we have worked on so far.

    ReplyDelete
  7. Thanks Marco Cantù - How do I make THTTPRio use Indy? I tried adding {$USE_INDY} to the project's conditional defines, but the dialog still appears.

    ReplyDelete
  8. I think you also need to recompile the related units from source....

    ReplyDelete
  9. One more thing. WinINet is NOT deprecated (this is getting a bit of a forum where people have too many definitive statements), ;-) , and it is still recommended by Microsoft for a client application. WinInet is preferred for a service, but our component can be used in both... and it likely more used in clients: 

    Microsoft: (https://msdn.microsoft.com/en-us/library/windows/desktop/hh227298(v=vs.85).aspx)

    "With a few exceptions, WinINet is a superset of WinHTTP. When selecting between the two, you should use WinINet, unless you plan to run within a service or service-like process that requires impersonation and session isolation."

    ReplyDelete
  10. Thanks Marco. We are using this in a service. In any case, I would say it's not the expected behaviour for THTTPRio to pop up an authentication dialog rather than throw an exception.

    How about adding a property to HTTPRio that allows us to switch between Indy, WinINet and WinHTTP? Much nicer than forcing us to recompile the source with USE_INDY. It can still default to WinINet for backwards compatibility.

    ReplyDelete

Post a Comment