Authentication with PSI for Project Server 2007

T

tggonzox

I have seen a number of posts, but I have yet to see an answer to the
ubiquitous 401 error.

Here is my situation...

I have a web page that consumes the project web service. I have the
following code...
_project.Credentials = new NetworkCredential(username, password);

This works fine so long as I am accessing the website from within the
same domain as Project Server. When doing so, it will use the higher
credentials rahter than my own as desired. However, If I try to
access the web page from the internet or from a different domain, I
get a 401: Unauthorized error.

The server is behind a firewall with SSL.

I'm not a network guy, and I am sure not 'getting it'. Ideas?

TIA,
Pat

PS Just for kicks, I tried the Project Server Logon demo in the SDK.
In the same situation, it will connect using Windows Auth, but not
forms. Once I leave the domain, I cannot access either leading me to
believe that PWS is not "Forms Enabled".
 
J

Jim Corbin [MSFT]

The basic issue is that credentials don't hop through IIS. Take a look at
the Account Security and 401 Errors section in the SDK article Walkthrough:
Develop an Impersonation Web Application (
http://msdn2.microsoft.com/en-us/library/bb428835.aspx#pj12_ImpersonationWeb_AccountSecurity )
..

However, the article does not cover the issues for access from a different
domain or from the Internet. For Internet access, you would need to install
a PWA Server in a DMZ (perimeter network) and then 'probably' use
impersonation to access Project Server on the Intranet. For an overview of
extranet access, see Supported Project Server 2007 extranet topologies (
http://technet2.microsoft.com/Offic...67e1-4e5b-9119-62f7ff6b83861033.mspx?mfr=true )
.. I say 'probably' because I haven't tried it.

--Jim
 
A

Ajit

Use LoginWindows Web service. Create a object objLoginWindows
Use the following code:
objLoginWindows.Url = //specify the url of the web reference
objLoginWindows.credential = CredentialCache.DefaultCredentials;
objLoginWindows.Login();

Add the logged in user as a member in pwa having sufficent rights.

also u can use SPSecurity.RunWithElevatedPriviledges(delegate
//Method
));

Hope u'll problem will be resolved
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top