Connect to PDS from Web Service?

C

CrazyOnU

Yet another PDS newbie question...

How do I connect to PDS from within a .Net web service? I've tried using the
PDSTest.Net code as a basis, but every time I call GetResponse(), I get a 401
error manifested as a WebException.

I can step through the code in PDSTest.Net without error, but my code errors
out every time. I'll post the code if anybody thinks that it'll prove helpful
but I don't want to waste bandwidth and lead anybody down the wrong path.

So far I've investigated:

1) Using GetCredentials against a URI created from the PDS.WSDL URL
2) Trying to get useful information about the currently executing
process/user through System.Security

Any help would be greatly appreciated as I'm yanking at my diminishing gray
hair...
 
J

Jim Corbin [MSFT]

The article Building and Hosting a PDS Web Application (
http://www.msdn.microsoft.com/libra...DC_PJHostingPDSWebApplications.asp?frame=true
) provides a sample, explanation for the 401 error, and several work-arounds.
Basically, IIS doesn't pass your Windows credentials more than 1 hop. The
work-arounds include:
(1) Use Project Server authentication; or
(2) Configure Kerberos authentication; or
(3) Use encrypted user credentials in the Project Server computer's registry
(means everyone who uses your app will have the same permission set)
 
M

Microsoft

Here is what I did when I had the PDSTest.Net not working.

One of the support pages says
------------------------------------------------------------------------
Note The default files and directories for authentication are the following:

Main directory - Integrated Windows ONLY
LGNBSC.ASP - Basic
LGNINST.ASP - Windows
LGNINTAU.ASP - Windows
LGNINTPJ.ASP - Windows
LGNPS.ASP - Windows and Anonymous
LGNPSAU.ASP - Windows and Anonymous
LGNPSPJ.ASP - Windows and Anonymous
-------------------------------------------------------------
If true, then if I open from IE browesr and supply my Project Login Account
credentials,
http://ServerName/ProjectServer/LGNPSAU.ASP?un=PLoginId&pwd=PLoginPwd
I should not be prompted for WinAuth dialog.
It should however if I
http://ServerName/ProjectServer/LGNINTPJ.asp

With the default install settings, I found the Win.Auth prompt for both.
Basically the
IIS virtual server is set for Windows Integrated Auth, which is fine, if the
above
exceptions will still be honored.

So I verified in the IIS Manager that the above files, had the flags set as
noted
above.

Then using Windows File explorer, I changed the lgnpsau.asp security setting
through the advanced and the had the flag Unchecked for "Allow inheritable
permissions from the parent to propagate to this object...".
After doing this I stopped getting the Win.Auth dialog for that page only
and
could make the code work.

AKM
 

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