<p>I'm using a Visual Studio web setup project to install an application that extends the functionality of Project Server. I want to call a method from the PSI ( Project Server Interface ) from one of the custom actions of my setup project, but every time a get a "401 Unauthorized access" error. What should I do to be able to access the PSI? The same code, when used from a Console Application, works without any issues.</p>

[{'answer_id': 23056, 'author': 'Christopher Scott', 'author_id': 1346, 'author_profile': 'https://Stackoverflow.com/users/1346', 'pm_score': 3, 'selected': True, 'text': "<p>It sounds like in the console situation you are running with your current user credentials, which have access to the PSI. When running from the web, it's running with the creds of the IIS application instance. I think you'd either need to set up delegation to pass the session creds to the IIS application, or use some static creds for your IIS app that have access to the PSI.</p>\n"}, {'answer_id': 39143, 'author': 'kjv', 'author_id': 1360, 'author_profile': 'https://Stackoverflow.com/users/1360', 'pm_score': 2, 'selected': False, 'text': "<p>I finally found the answer. You can call the LoginWindows PSI service an set the credentials to NetworkCredentials using the appropriate user, password and domain tokens. Then you can call any PSI method, as long as the credentials are explicit. Otherwise, using DefaultCredentials you'll get an Unauthorized Access error, because an msi is run with Local System Account.</p>\n"}]
['https://Stackoverflow.com/questions/20782', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1360/']