Abnormal Behaviour of LoginWindows.Login

M

med111

Hello,

I try to connect programmatically to the project server 2007 using
webService WindowsLogin by developping a client application in
sharpDevelop , but, I encoutered a strange behaviour! In fact,
WindowsLogin.Login don't return the same thing (true/false). I must
try lot of times ( nbrTrial Connection = 4...93) to have a successful
connection!!
what can be the problem? (bug?in server?in sharpDevelop?other?...)

here is the little code in sharpDevelop :



_LoginWindows.Url=
_SERVERURL + _LOGINWINDOWS;
_LoginWindows.Credentials = CredentialCache.DefaultCredentials;
bool ok =false;
int nbrTrialConnection = 0;
while (!ok)
{
nbrTrialConnection ++;
try
{
if (_LoginWindows.Login())
{
ok = true;
this.lbl_Connect.Text = "Connection Succeeded";
this._Project.Credentials= this._LoginWindows.Credentials;
//ProjectREF.ProjectDataSet _Project.ReadProject();
}
else
this.lbl_Connect.Text= "Connection Failed";
}
catch(Exception ex)
{
this.lbl_Connect.Text = "ERROR";
//MessageBox.Show(ex.Message);
}
}//while
MessageBox.Show(nbrTrialConnection.ToString());
 
B

Boaz Lev [MSFT]

Hi med111,

What error (exception) do you get? I highly doubt that the error comes from
the development environment although I do not know it and have never tried
it.
How did you generate the webservice proxies? Did you by chance generate
them using any async option? Can you successfully browse to the webservices
and get the wsdls for the services?

If you need advice on how to generate the proxies, the following MSDN
article will walk you through the needed steps
(http://msdn2.microsoft.com/en-us/library/ms455600.aspx).

Hope this helps,
 
M

med111

the problem is solved now!
I used to log on my PC as limited user
in fact I have log on on my PC as administrator,
WindowsLogin works well and all other WebServices
I think that some port are blocked
 
Top