How to forward forms credentials to PSI from a custom page?

M

marcoapollo2007

Hello Everyone.

I've created a web app that needs to call some PSI methods using the
current user's credentials. I've gotten this to work for windows
authenticated resources by simply setting the PSI Web Service Network
Credential property equals to the Default network Credentials, but
this method doesn't work for forms authenticated users, it picks up
the anonymous user credentials (since the the PWA site where forms
authenticated users allows anonymous access), or the windows
credentials of the user if anonymous access on the site is disabled.
Does anybody know how I can forward the credentials from PWA to a
custom page?

Some clarifications:

1. I know there are two different website for PWA, one that allows
Windows Authentication and the other one allows forms authentications,
the applicaiton is installed in the two separate web sites and it
works in the windows aunthentication site.

2. The custom site that is trying to retrieve the user's credentials
is a separate web app, with its own appliation pool and web.config
file.

thanks in advance for any help!
 
J

Jim Corbin [MSFT]

On all of the PWA sites, whether for Windows or Forms access, you should
disable anonymous access, and check *only* Integrated Windows
Authentication.

You only need to install your custom Web app once, as long as it can handle
both Windows and Forms auth. If your app is run only within the context of
PWA, you don't need to log on Project Server.

There is an example of a separate Web app in the SDK -- although it is quite
a bit more complicated than you need, because it uses impersonation.
However, the Log On part does not use impersonation, and calls some Security
and Resource PSI methods to read global permissions of the logged-on user
and get the list of enterprise users.
See Walkthrough: Develop an Impersonation Web Application (
http://msdn2.microsoft.com/en-us/library/bb428835.aspx ).

--Jim
 

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