Re: Connecting PDA/Phone to Web Services using SSL?
- From: "Ginny Caughey [MVP]" <ginny.caughey.online@xxxxxxxxxxxxxx>
- Date: Wed, 14 Feb 2007 10:48:37 -0500
DevDude,
Did you copy the certificate to your device and install it?
--
Ginny
"DevDude" <icq69@xxxxxxxxx> wrote in message news:45d31175$0$9435$4c368faf@xxxxxxxxxxxxxxxxx
I am using the following code to make a connection to a remote web service running on my windows 2003 server. The server is in a domain using Certificate Services. I have assigned a certificate to the default web site and configured it. I can connect to the web service using IE, but when trying to make a web connection via my application, I get various errors. I can't seem to make it work. Here is a similar example to my code:
service.Url = @"https://" + Server + @"/WebService1/WebService1.asmx";
System.Net.NetworkCredential NC = new NetworkCredential();
ServicePointManager.CertificatePolicy = new TrustAllCertificatePolicy();
NC.UserName = username;
NC.Password = password;
NC.Domain = domain;
service.Credentials = NC;
try
{
if (service.IsConnected())
{
return true;
}
else
{
return false;
}
}
catch(Exception except)
{
MessageBox.Show(except.Message);
}
return false;
When I am not using https, things connect fine. When I use https, I get "Unable to read data from the network connection", inner exception is "the remote certificate failed validation procedure".
Is there something I'm doing wrong, or is this simply not supported with Windows Mobile?
I can't seem to find any clear answers out there. I have added the root certificate to my mobile device store and it doesnt change the error returned. Can anyone tell me how to make it work securly? I need to pass admin credentials around with other various sensitive data and I need a secure connection from the mobile device. Microsoft is doing it with Outlook, so you would think it should work.
Thanks in advance,
Nick
.
- Follow-Ups:
- Re: Connecting PDA/Phone to Web Services using SSL?
- From: DevDude
- Re: Connecting PDA/Phone to Web Services using SSL?
- References:
- Connecting PDA/Phone to Web Services using SSL?
- From: DevDude
- Connecting PDA/Phone to Web Services using SSL?
- Prev by Date: Socket restart issue
- Next by Date: WAN communications
- Previous by thread: Connecting PDA/Phone to Web Services using SSL?
- Next by thread: Re: Connecting PDA/Phone to Web Services using SSL?
- Index(es):
Relevant Pages
|