I have a C# webservice hosted in IIS with Windows authentication enabled that I call from a Delphi 7 client.
When I call the method, I have a system login dialog and I have to enter my windows username and password in order to be authenticated.
Is there a way to skip the login dialog and use the current logged user credentials to call the webservice?
I saw a lot on post explaining how to avoid this login dialog with basic authentication by "injecting" the username/password element with InternetSetOption(...) on the BeforePost event, but nothing about Windows authentication. I was expecting everything to work flawlessly...
Thanks
EDIT
The current authentication type is NTLM.
My application do not have any login/password dialog. The login dialog I refer to is a system login dialog with "Windows security" in the title
The C# server and Delphi client are running on the same computer. My computer is part of a domain and the server will be called only within the local network.
EDIT #2 When the login is prompted, there's the request headers:
POST https://vbergeron.info.com/dev-mmcore/SecurityService.svc HTTP/1.1
SOAPAction: "http://mysite.ca/schemas/mobilemed-ws/security/ISecurityService/GetPermissions"
Content-Type: text/xml
User-Agent: mmrdv.exe/4.0.0.0 Windows-7-SP1/6.1.7601 Ultimate/x86
Host: vbergeron.info.com
Content-Length: 366
Connection: Keep-Alive
Cache-Control: no-cache
Here`s the response header:
HTTP/1.1 401 Unauthorized
Cache-Control: private
Server: Microsoft-IIS/7.5
X-AspNet-Version: 4.0.30319
WWW-Authenticate: NTLM
WWW-Authenticate: Negotiate
X-Powered-By: ASP.NET
Date: Fri, 07 Jun 2013 14:38:35 GMT
Content-Length: 0
Proxy-Support: Session-Based-Authentication
So the HTTPRio do not "handle" the NTLM header properly. It`s supposed to catch the 401 and resend the request including the authentication information... Right?