(401) Unauthorized from Web Service from CF

T

Tom

Hello,

I have a C# CF app that can consume Web Services from an
XP box all day long until I turn on Windows Authentication
on the IIS server. I then supply a
System.Net.NetworkCredential but still get an Unauthorized
(401) error from the host.

If I navigate to the Web Service from IE on the CE
Device,the browser prompts me for a user, password and
domain. Then it brings up the default page for the web
service on the host. So....I know that it COULD work.

I found what appeared to be a solution using the
CredentialCache class. However, it is not available on the
CF.

Any Suggestions appreciated,
Tom.
 
A

Alex Feinman [MVP]

Windows Authentication is not supported in CF, but digest (and basic) is
 
T

Tomd

Thanks,

I believe I can set this up on the IIS server fairly
easily, but I am not sure of what to do on the CF client.
In fact, I don't find any client code which handles the
digest building and challenge/response, etc. Any pointers
would be appreciated.

Tom
 
M

Mike Boilen [MS]

The .net Compact Framework http client classes support both basic and
digest authentication. Therefore, if the server requests that the client
authenticate itself using either of those authentication schemes, and the
HttpWebRequest class has been provided with credentials (in the form of a
NetworkCredential class or some other ICredentials instance), then the http
client will authenticate to the server

Mike Boilen
Developer
.NET Compact Framework

This posting is provided "AS IS" with no warranties, and confers no rights.
http://www.gotdotnet.com/team/netcf/FAQ.aspx

--------------------
| Content-Class: urn:content-classes:message
| From: "Tomd" <[email protected]>
| Sender: "Tomd" <[email protected]>
| References: <[email protected]>
<[email protected]>
| Subject: Re: (401) Unauthorized from Web Service from CF
| Date: Tue, 21 Oct 2003 09:17:38 -0700
| Lines: 42
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Thread-Index: AcOX7thJNdK96dFeTiGioVfsyn1D1w==
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| Path: cpmsftngxa06.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.compactframework:36428
| NNTP-Posting-Host: TK2MSFTNGXA13 10.40.1.165
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| Thanks,
|
| I believe I can set this up on the IIS server fairly
| easily, but I am not sure of what to do on the CF client.
| In fact, I don't find any client code which handles the
| digest building and challenge/response, etc. Any pointers
| would be appreciated.
|
| Tom
| >-----Original Message-----
| >Windows Authentication is not supported in CF, but digest
| (and basic) is
| >
| message
| >| >> Hello,
| >>
| >> I have a C# CF app that can consume Web Services from an
| >> XP box all day long until I turn on Windows
| Authentication
| >> on the IIS server. I then supply a
| >> System.Net.NetworkCredential but still get an
| Unauthorized
| >> (401) error from the host.
| >>
| >> If I navigate to the Web Service from IE on the CE
| >> Device,the browser prompts me for a user, password and
| >> domain. Then it brings up the default page for the web
| >> service on the host. So....I know that it COULD work.
| >>
| >> I found what appeared to be a solution using the
| >> CredentialCache class. However, it is not available on
| the
| >> CF.
| >>
| >> Any Suggestions appreciated,
| >> Tom.
| >
| >
| >.
| >
|
 

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