Re: Web Service 401 Authorization Err



Hi Rick

This sounds to me like a credentials-propagation problem. When your asp.net
app tries to access the web service, it only has a credentials token from
the original caller, which is not valid across another network hop. This
would explain why the app works when on the local machine, and when there is
no database involved.

To _test_ whether this is the case, replace the Windows authentication on
your IIS asp.net app with Basic authentication. I know this is not secure,
but the difference is that the full username and password are sent to the
asp.net server, which can use them itself when talking to the web service.

If this works, credentials propagation is the problem. There is a server
setting (within Active Directory, I think) that allows a server to propagate
credentials. MSDN describes the setting as "trusted for delegation and
protocol transition". See
http://msdn2.microsoft.com/en-us/library/ms998351.aspx - of course, it
varies depending on whether you are using Windows Server 2000 or 2003.

If not, sorry - I'm lost as well.

Good luck
Neil.

"Rick Vooys" <RickVooys@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:F8C90D32-2F04-41E1-A350-4FA1F0BF0325@xxxxxxxxxxxxxxxx
We are creating a web service which contain all the buisness logic for our
application. The web service will be consumed by both a ASP.net Web
Application and a Windows Form Application.

We are new to the .Net platform, so please don't be afraid to explain
simple
concepts in great detail, everything is new to me. And if I am on the
wrong
road, give me directions.

We have created the webs service and it works for the Windows form
application. As well it run when you use the local machine as a server.
But
when it is run with the ASP.net app connecting to the server it crashes.
As
well, a webmethod was created to return a simple string an it worked, only
when the dataset is returned does it crash.

We are using windows authentication, with impersonation, the code is as
follows:

ws = new RobcoWebService.RobcoWebService()
ws.PreAuthenticate = true;
ws.Credentials = System.Net.CredentialCache.DefaultCredentials;

(As we we have tried sending specific Admin accounts through, and we
tested
what user was being passed and the current user was being used inside the
web
service)

The request failed with HTTP status 401: Unauthorized.

Any ideas? We had to scrap this for a moment and use a .DLL just so we
could
get the demo ready but we want to move back to the web service.


.



Relevant Pages

  • Passing credentials from ASP.NET website to webservice
    ... I have a problem with passing the default credentials from an ASP.NET web ... The EMM web applications access the MSCRM ... Web services which is part of the MS CRM server setup. ... since both the EMM web application and the web service reside on the same IIS ...
    (microsoft.public.inetserver.iis.security)
  • Re: Server Time Out
    ... could be not passing user credentials to the web service from the client. ... calling a remote server from a web server due to not being able to forward ...
    (microsoft.public.dotnet.framework.aspnet.webservices)
  • Re: Pass through credentials to web service
    ... It is the double-hop' limitation of NTLM authentication. ... application server, the server cannot then use those credentials to ... >I have a client application that calls a web service. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Having trouble changing a web service URL at runtime
    ... I'm playing with a simple smartphone app that communicates with a server ... The web service is generated by setting up a .Net Remoting ...
    (microsoft.public.dotnet.framework.compactframework)
  • RE: webservice to expose existing app functionality
    ... and manage your web services, then you need to create a web service project ... applicaiton makes a poor multi-user server because the console application ... benefit is that once you refactor your app in this way, ... >create a webservice without creating a new webservice project within ...
    (microsoft.public.dotnet.framework.aspnet.webservices)