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());
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());