|
Microsoft Usenet > > > The request failed with HTTP status 401: Unauthorized (2007, C#)
View Full Version : The request failed with HTTP status 401: Unauthorized (2007, C#)
Omri Swissa 08-27-2006, 04:51 PM Every time I try to call 'ListResources' or 'ReadUserList' methods I get:
"The request failed with HTTP status 401: Unauthorized." though I'm an admin
on the server… (I can do a lot of things that I'm authorized to, like create
a project for example)
why?
Thanks,
Omri
Omri Swissa 08-28-2006, 12:19 PM problem solved... Sorry
"Omri Swissa" wrote:
> Every time I try to call 'ListResources' or 'ReadUserList' methods I get:
> "The request failed with HTTP status 401: Unauthorized." though I'm an admin
> on the server… (I can do a lot of things that I'm authorized to, like create
> a project for example)
> why?
>
> Thanks,
> Omri
>
>
Sohaib Al-Husseini 02-08-2007, 10:05 AM HI,
I am also facing the problem of accessing the PSI web services, i have tried
everything posted on the net but with no avail:
1. Adjust Windows Server 2003 SP1 registry (Posted on the MSDN).
2. in web.config i allowed the impersonation.
3. Allowed anonymous acces on the shared services, with windows
authentication, and digest authentications.
4. in my program i used the project.Credentials =
System.Net.DefaultCredentials.
5. also tried he project.Credentials = System.Net.DefaultNetworkCredentials.
and i wans't able to anything. I have deployed the MOSS2007 and then
deployed the project server2007 so I can have the workflow feature.
Please if anyone can get me an answer, because as you see I have tried
everything!
Thanks
Jim Corbin [MSFT] 02-08-2007, 03:49 PM Hi Sohaib,
Please see the Project_programmability blog, for the December post about an
impersonation Web application:
http://blogs.msdn.com/project_programmability/archive/2006/12/20/an-impersonation-web-application.aspx.
The post includes setup instructions and a zip download with a working
example.
The site should allow *only* Windows authentication, not annonymous access
or digest auth.
--Jim
"Sohaib Al-Husseini" <SohaibAlHusseini@discussions.microsoft.com> wrote in
message news:B2E08E38-C42A-4C8E-8E4A-4DA8663E670E@microsoft.com...
> HI,
>
> I am also facing the problem of accessing the PSI web services, i have
> tried
> everything posted on the net but with no avail:
> 1. Adjust Windows Server 2003 SP1 registry (Posted on the MSDN).
> 2. in web.config i allowed the impersonation.
> 3. Allowed anonymous acces on the shared services, with windows
> authentication, and digest authentications.
> 4. in my program i used the project.Credentials =
> System.Net.DefaultCredentials.
> 5. also tried he project.Credentials =
> System.Net.DefaultNetworkCredentials.
>
> and i wans't able to anything. I have deployed the MOSS2007 and then
> deployed the project server2007 so I can have the workflow feature.
>
> Please if anyone can get me an answer, because as you see I have tried
> everything!
>
> Thanks
David 05-07-2007, 04:25 PM Hi Jim,
I download and install pj12Impersonation.zip file on my development machine
which has no share point server installed. Copied Microsoft.SharePoint.dll,
Microsoft.SharePoint.Search.dll and
Microsoft.Office.Project.Server.Library.dll to its bin dir. When I tried to
build the solution got "Could not load file or assembly
'Microsoft.SharePoint.Search' or one of its dependencies. An attempt was made
to load a program with an incorrect format.". Can you help?
--
David
"Jim Corbin [MSFT]" wrote:
> Hi Sohaib,
>
> Please see the Project_programmability blog, for the December post about an
> impersonation Web application:
> http://blogs.msdn.com/project_programmability/archive/2006/12/20/an-impersonation-web-application.aspx.
> The post includes setup instructions and a zip download with a working
> example.
>
> The site should allow *only* Windows authentication, not annonymous access
> or digest auth.
>
> --Jim
>
> "Sohaib Al-Husseini" <SohaibAlHusseini@discussions.microsoft.com> wrote in
> message news:B2E08E38-C42A-4C8E-8E4A-4DA8663E670E@microsoft.com...
> > HI,
> >
> > I am also facing the problem of accessing the PSI web services, i have
> > tried
> > everything posted on the net but with no avail:
> > 1. Adjust Windows Server 2003 SP1 registry (Posted on the MSDN).
> > 2. in web.config i allowed the impersonation.
> > 3. Allowed anonymous acces on the shared services, with windows
> > authentication, and digest authentications.
> > 4. in my program i used the project.Credentials =
> > System.Net.DefaultCredentials.
> > 5. also tried he project.Credentials =
> > System.Net.DefaultNetworkCredentials.
> >
> > and i wans't able to anything. I have deployed the MOSS2007 and then
> > deployed the project server2007 so I can have the workflow feature.
> >
> > Please if anyone can get me an answer, because as you see I have tried
> > everything!
> >
> > Thanks
>
>
>
I don't know if this is helpful or not, but I am having the same problem with
getting a "401 Unauthorized" error when trying to do impersonation.
When I installed the log viewer on the server (from
http://www.codeplex.com/features), I see the following error msg:
"Information PSI Auth: User <<my domain>>\<<my user ID>> doesn't have access
to the PSI" BUT, I have been added to the process account list for the SSP
in the configuration manager, AND I am in the administrators group on the
server, AND I am in the administrators group in Project Server.
I can't think of any more rights I might need. Any suggestions?
"David" wrote:
> Hi Jim,
> I download and install pj12Impersonation.zip file on my development machine
> which has no share point server installed. Copied Microsoft.SharePoint.dll,
> Microsoft.SharePoint.Search.dll and
> Microsoft.Office.Project.Server.Library.dll to its bin dir. When I tried to
> build the solution got "Could not load file or assembly
> 'Microsoft.SharePoint.Search' or one of its dependencies. An attempt was made
> to load a program with an incorrect format.". Can you help?
> --
> David
>
>
> "Jim Corbin [MSFT]" wrote:
>
> > Hi Sohaib,
> >
> > Please see the Project_programmability blog, for the December post about an
> > impersonation Web application:
> > http://blogs.msdn.com/project_programmability/archive/2006/12/20/an-impersonation-web-application.aspx.
> > The post includes setup instructions and a zip download with a working
> > example.
> >
> > The site should allow *only* Windows authentication, not annonymous access
> > or digest auth.
> >
> > --Jim
> >
> > "Sohaib Al-Husseini" <SohaibAlHusseini@discussions.microsoft.com> wrote in
> > message news:B2E08E38-C42A-4C8E-8E4A-4DA8663E670E@microsoft.com...
> > > HI,
> > >
> > > I am also facing the problem of accessing the PSI web services, i have
> > > tried
> > > everything posted on the net but with no avail:
> > > 1. Adjust Windows Server 2003 SP1 registry (Posted on the MSDN).
> > > 2. in web.config i allowed the impersonation.
> > > 3. Allowed anonymous acces on the shared services, with windows
> > > authentication, and digest authentications.
> > > 4. in my program i used the project.Credentials =
> > > System.Net.DefaultCredentials.
> > > 5. also tried he project.Credentials =
> > > System.Net.DefaultNetworkCredentials.
> > >
> > > and i wans't able to anything. I have deployed the MOSS2007 and then
> > > deployed the project server2007 so I can have the workflow feature.
> > >
> > > Please if anyone can get me an answer, because as you see I have tried
> > > everything!
> > >
> > > Thanks
> >
> >
> >
Sohaib Al-Husseini 06-24-2007, 09:46 PM Hi tfz
I was able to do something about it using these steps:
1. Do not logon programmatically to project server when using PSI.
2. When assigning one of PSI instance (i.e Project.Credentials) assign
as the following --> Project.Credentials = new NetworkCredentials("UserName",
"Password", "Domain"), if you like put them in the web.config, or keep them
in the code, this was my only solution, and I don't like it, cause it is
similar to hardcoding it!
The point is to create new instance of network credential, and use it. It
somehow worked.
Good luck
"tfz" wrote:
> I don't know if this is helpful or not, but I am having the same problem with
> getting a "401 Unauthorized" error when trying to do impersonation.
>
> When I installed the log viewer on the server (from
> http://www.codeplex.com/features), I see the following error msg:
> "Information PSI Auth: User <<my domain>>\<<my user ID>> doesn't have access
> to the PSI" BUT, I have been added to the process account list for the SSP
> in the configuration manager, AND I am in the administrators group on the
> server, AND I am in the administrators group in Project Server.
>
> I can't think of any more rights I might need. Any suggestions?
>
>
> "David" wrote:
>
> > Hi Jim,
> > I download and install pj12Impersonation.zip file on my development machine
> > which has no share point server installed. Copied Microsoft.SharePoint.dll,
> > Microsoft.SharePoint.Search.dll and
> > Microsoft.Office.Project.Server.Library.dll to its bin dir. When I tried to
> > build the solution got "Could not load file or assembly
> > 'Microsoft.SharePoint.Search' or one of its dependencies. An attempt was made
> > to load a program with an incorrect format.". Can you help?
> > --
> > David
> >
> >
> > "Jim Corbin [MSFT]" wrote:
> >
> > > Hi Sohaib,
> > >
> > > Please see the Project_programmability blog, for the December post about an
> > > impersonation Web application:
> > > http://blogs.msdn.com/project_programmability/archive/2006/12/20/an-impersonation-web-application.aspx.
> > > The post includes setup instructions and a zip download with a working
> > > example.
> > >
> > > The site should allow *only* Windows authentication, not annonymous access
> > > or digest auth.
> > >
> > > --Jim
> > >
> > > "Sohaib Al-Husseini" <SohaibAlHusseini@discussions.microsoft.com> wrote in
> > > message news:B2E08E38-C42A-4C8E-8E4A-4DA8663E670E@microsoft.com...
> > > > HI,
> > > >
> > > > I am also facing the problem of accessing the PSI web services, i have
> > > > tried
> > > > everything posted on the net but with no avail:
> > > > 1. Adjust Windows Server 2003 SP1 registry (Posted on the MSDN).
> > > > 2. in web.config i allowed the impersonation.
> > > > 3. Allowed anonymous acces on the shared services, with windows
> > > > authentication, and digest authentications.
> > > > 4. in my program i used the project.Credentials =
> > > > System.Net.DefaultCredentials.
> > > > 5. also tried he project.Credentials =
> > > > System.Net.DefaultNetworkCredentials.
> > > >
> > > > and i wans't able to anything. I have deployed the MOSS2007 and then
> > > > deployed the project server2007 so I can have the workflow feature.
> > > >
> > > > Please if anyone can get me an answer, because as you see I have tried
> > > > everything!
> > > >
> > > > Thanks
> > >
> > >
> > >
|
|
|