PC Review


Reply
Thread Tools Rate Thread

401 Authentication fail calling Web Service over SSL from PocketPC with Basic Authentication.

 
 
John Hynes
Guest
Posts: n/a
 
      19th Sep 2003
Hi,

I'm trying to access a Web Service over SSL from a PocketPC device (iPaq).

The Web service is running on IIS 5.0, with Basic Authentication and Require
SSL enabled.

I can successfully access the web service from the browser - I have to enter
the username/password and OK a message box about the server certificate name
not matching the server name (it does!).

When calling from a pocket PC application, I have created an implementation
of ICertificatePolicy and overridden CheckValidationResult to return true
for my server and avoid "Trust Failure" exceptions.

Now when I call the web service it throws an exception - "401 Authentication
Failure".

If I don't use SSL everything works OK.

Code to access my service is:

m_nc = new NetworkCredential( strNetUser, strNetPassword,
strDomain );
m_ms = new MyMobileService.MobileService();
m_ms.Timeout = 60000;
m_ms.Url = "https://.....";
m_ms.Credentials = m_nc.GetCredentials( new Uri(m_ms.Url),
"Basic" );
m_ms.PreAuthenticate = true;

m_ms.Login(); // web service call - throws exception

Since I can access the service through a browser I'm guessing the server
setup must be OK, and the code above works fine if i use http rather than
https.

Anyone any ideas what to try?
If you're not familiar with the Compact Framework, CredentialCache is not
supported, Windows Authentication is not supported, and client certificates
are not supported so I have to use basic authentication.

Thanks
John






 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ASP.NET Forms Authentication site calling web service Ryan Microsoft ASP .NET 8 4th Feb 2010 07:12 PM
Fail to login using NT Authentication method =?Utf-8?B?QmVu?= Microsoft Dot NET 1 28th Mar 2004 01:27 PM
Forms Authentication displays basic authentication dialogue window Brett Porter Microsoft ASP .NET 5 3rd Feb 2004 07:06 PM
Basic Authentication v. Integrated Windows Authentication w/ Delegation Mark Microsoft ASP .NET 0 20th Jan 2004 03:13 PM
ASP.Net Forms authentication with basic authentication popup Brett Porter Microsoft ASP .NET 2 20th Jan 2004 02:17 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:23 PM.