views:

263

answers:

2

I have a Microsoft Project Server 2007 instance on a network server. I want to call from a development machine a webservice from PSI. How can I connect to PS by specifying a username and password? (Something similar to what happens when you access the PWA in a browser, you enter your username and password, even if on the computer from which you work you have another user/password).

A: 

You need to use Project Server's provided impersonation solution. There is a How To and Walkthrough available here.

From memory it's quite involved to get working (e.g. need to generate web service proxies) but once you do it works well.

Alex Angas
Instead, I simply set the credentials for the web service to NetworkCredentials using a custom user, domain and password. Seems to work for what I need.
iulianchira
A: 

Instead, I simply set the credentials for the web service to network credentials using a custom user, domain and password. Seems to work for what I need.

myPSWebService.Credentials = new NetworkCredential("user", "pass", "domain");
iulianchira