Programmatic Login

I

Ian Lowe

Hi,
I have been trying to use the Project 2007 SDK example to perform
programmatic login to a Project Server. The server is running fine and I can
attach using a browser and perform all required functions. The site requires
Windows Authentication.

When I try to use the LoginDemo sample or create my own code as described, I
always get false returned from the webservice. I can run the program on the
server itself or from a remote machine but the result is always false. There
are no exceptions occurring. I even tried setting a boolean to true before
calling the function and the result is still false.

I assume that something is actively denying the authentication but don't
know what this could be.

I have searched but cannot find a resolution to this. I would appreciate any
ideas of how I might be able to overcome the problem.

Regards,
 
D

Dale Howard [MVP]

Ian --

I would recommend you post this question in the
microsoft.public.project.developer newsgroup, as you are more likely to get
an answer in that group. Hope this helps.
 
C

Colby Africa

Hi Ian,

Using Windows authentication, the "login" is actually implicit,
meaning that the call to the Login method is unnecesary. All that is
required is to set the network credentials and you are good to go.

In my framework, I do something like this:

try
{
_projectWebService.Credentials =
CredentialCache.DefaultNetworkCredentials
_projectWebService.ReadServerListSeparator();

}
catch (Exception e)
...

I swallow a call to ReadServerListSeparator() simply to verify I can
connect.

I don't know why the SDK does do a better job of communicating this,
but if you step through ProjTool's login, you can see that a call to
Login is never made when Windows auth is used.

Hope this helps!

Colby Africa
http://colbyafrica.blogspot.com
 
Top