ActiveDirectory üzerinden doğrulama yapıyorum, masaüstü uygulamalarda sorun yok ancak IIS üzerinde çalıştırdığım web servis metodumda bir süre sonra aşağıdaki hata oluşmaya başlıyor
Kod: Tümünü seç
Multiple connections to a server or shared resource by the same user, using more than one user name, are not allowed. Disconnect all previous connections to the server or shared resource and try again
Kod: Tümünü seç
uses
ActiveDs_TLB
function doLogin(pUserName,pPassword : String) : Boolean;
var
intResult : Integer ;
Obj : IADs ;
begin
try
CoInitialize(nil);
try
intREsult := ADsOpenObject('WinNT://'+FieldByName('domain').AsString,pUserName,pPassword,1,IADs,Obj);
Result := Succeeded( intResult ) ;
except on e: exception do
begin
Result := False;
end;
end;
finally
CoUninitialize;
end;
end;