views:

318

answers:

2

How can I connect with the TWebBrowser-component in Delphi from outside an ADS-Domain to a Sharepoint-Server. I've created an user-account in my domain and will connect with this information to the server.

the following don't work:

const
USERNAME = '[email protected]';
PASSWORD = 'Password2009';
var
Url, Headers: OleVariant;
begin
URL := 'http://192.168.100.130';
Headers := 'Authorization: NTLM ' + Base64Encode(USERNAME + ':' + PASSWORD)+ sLineBreak;
WebBrowser1.Navigate2(Url, EmptyParam, EmptyParam, EmptyParam, Headers);

with Basic-Auth the same (not working) result ..

thanks for any hint!

:-) tpau17

A: 

In our Intranet and with the Indy TIdHTTP component I used this for the username:

Username := "domainname\username";

It also worked in FireFox where the NTLM secured server will not cause a 'Domain' input field in the login dialog like in IE, but only the default user / password input fields.

mjustin
A: 

When you mentioned this call failed, why not check on SharePoint/IIS side what error was recorded? If it was a 401.1 error, Security event log should contain a Logon Failure record and tell you the reason. (Logon audit for failure must be enabled on the server via Local Security Policy.)

Lex Li