Web Part 401

E

Erik K

Hi,
I have a custom web part that is throwing a 401 Unauthorized error when
making a PSI call. I know there are a lot of factors that could cause this,
so I will lay out the basics. It is a 2 server setup (WFE/App and SQL
Server) on WSS and Project Server SP2. We are using host headers for the PWA
site. PWA functions just fine. I can view the .asmx in the browser fine. The
web part is on the Project Center page. The web part fails when trying to
call ReadProjectStatus. Here is a snippet from my web part:

Dim PSIURL As String = SPContext.Current.Web.Url &
"/_vti_bin/psi/Project.asmx"
Dim PSIProject As New PSI_Project.Project
Dim projDS As New PSI_Project.ProjectDataSet

With PSIProject
.Url = PSIURL
.Credentials = CredentialCache.DefaultCredentials
End With

projDS = PSIProject.ReadProjectStatus(Guid.Empty,
PSI_Project.DataStoreEnum.WorkingStore, _
String.Empty,
PSLib.Project.ProjectType.Project)

Everything works fine on my dev machine, which is also setup to use host
headers but has this machine has WSS, Project Server and SQL Server installed
as well as VS2008.

Is there something fundamental that I am missing?
Thanks in advance,
Erik
 
P

Parth

Can you tell us that what do you want to achieve using this
ReadProjectStatus.. !!?

can this be done using Select Query ???

Thanks

Parth
 
E

Erik K

Hi Parth,
ReadProjectStatus returns a dataset of basic project info that is limited to
the projects that the user can see based on category permissions. Sure, this
data could be retrieved by a direct SQL query, but using the web service
methods is the right way to get this data. My issue has to do with my web
part getting an authorization error when hitting the web service.
Thanks,
Erik
 

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