473,321 Members | 1,708 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,321 software developers and data experts.

X509Certificate on Compact Framework.

I'm trying to use a certificate on my pocket PC device to access a
WebService using VS2003/VS2005.

I've been able to read the certificate of my Certificate Store, but I don't
know how to use it since the WebService does not have a AddCertificate
method.

Seems to be the same in both the Compact Framework 1.0 and 2.0

Any ideas how to do this ?

Kay
Jun 21 '06 #1
5 3304
Hi, your WebService security is implemented with WSE 2.0 or WSE 3.0?
"Kay-Christian Wessel" wrote:
I'm trying to use a certificate on my pocket PC device to access a
WebService using VS2003/VS2005.

I've been able to read the certificate of my Certificate Store, but I don't
know how to use it since the WebService does not have a AddCertificate
method.

Seems to be the same in both the Compact Framework 1.0 and 2.0

Any ideas how to do this ?

Kay

Jun 22 '06 #2
Thanks,

The WebService is made using Visual Studio 2005, but not by me. It is
external to me. Any way I can check this ?

Kay

"Azzi Stefano" <Az*********@discussions.microsoft.com> skrev i melding
news:38**********************************@microsof t.com...
Hi, your WebService security is implemented with WSE 2.0 or WSE 3.0?
"Kay-Christian Wessel" wrote:
I'm trying to use a certificate on my pocket PC device to access a
WebService using VS2003/VS2005.

I've been able to read the certificate of my Certificate Store, but I don't know how to use it since the WebService does not have a AddCertificate
method.

Seems to be the same in both the Compact Framework 1.0 and 2.0

Any ideas how to do this ?

Kay

Jun 22 '06 #3
Here is my sample code from Visual Studio 2005 with the full Framework which
is working fine. My problem is to port this code to my Device-project.

Dim x As New TestWebService

Dim store As X509Certificates.X509Store = New
X509Certificates.X509Store(X509Certificates.StoreN ame.My)
store.Open(X509Certificates.OpenFlags.MaxAllowed)
Dim mycollection As X509Certificates.X509CertificateCollection =
store.Certificates

Dim cert As Security.Cryptography.X509Certificates.X509Certifi cate

For Each cert In mycollection
If cert.Subject.Substring(0, 7) = "CN=Test" Then
x.ClientCertificates.Add(cert)
Exit For
End If
Next

mycollection.Clear()
mycollection = Nothing

store.Close()
store = Nothing

x.Url = "https://PDA.Test.com"


Here is my new code for my Device-project :
Dim x As New TestWebService

Dim store As
InTheHand.Security.Cryptography.X509Certificates.X 509Store = New
InTheHand.Security.Cryptography.X509Certificates.X 509Store(InTheHand.Securit
y.Cryptography.X509Certificates.StoreName.My)
store.Open(InTheHand.Security.Cryptography.X509Cer tificates.OpenFlags.MaxAll
owed)

Dim mycollection As
InTheHand.Security.Cryptography.X509Certificates.X 509CertificateCollection =
store.Certificates

Dim cert As Security.Cryptography.X509Certificates.X509Certifi cate

For Each cert In mycollection
If cert.GetName.Substring(0, 7) = "CN=Test" Then
x.ClientCertificates.Add(cert)
'This is not working in the Compact Framework 1.0/2.0
Exit For
End If
Next

mycollection = Nothing

store.Close()
store = Nothing

x.Url = "https://PDA.Test.com"


How to make this work on my Device ?
Best regards
Kay
Jun 22 '06 #4
Vaz
I am in the same situation. Did you managed do get there?
I would appreciate to hear from you, please.

"Kay-Christian Wessel" wrote:
Here is my sample code from Visual Studio 2005 with the full Framework which
is working fine. My problem is to port this code to my Device-project.

Dim x As New TestWebService

Dim store As X509Certificates.X509Store = New
X509Certificates.X509Store(X509Certificates.StoreN ame.My)
store.Open(X509Certificates.OpenFlags.MaxAllowed)
Dim mycollection As X509Certificates.X509CertificateCollection =
store.Certificates

Dim cert As Security.Cryptography.X509Certificates.X509Certifi cate

For Each cert In mycollection
If cert.Subject.Substring(0, 7) = "CN=Test" Then
x.ClientCertificates.Add(cert)
Exit For
End If
Next

mycollection.Clear()
mycollection = Nothing

store.Close()
store = Nothing

x.Url = "https://PDA.Test.com"


Here is my new code for my Device-project :
Dim x As New TestWebService

Dim store As
InTheHand.Security.Cryptography.X509Certificates.X 509Store = New
InTheHand.Security.Cryptography.X509Certificates.X 509Store(InTheHand.Securit
y.Cryptography.X509Certificates.StoreName.My)
store.Open(InTheHand.Security.Cryptography.X509Cer tificates.OpenFlags.MaxAll
owed)

Dim mycollection As
InTheHand.Security.Cryptography.X509Certificates.X 509CertificateCollection =
store.Certificates

Dim cert As Security.Cryptography.X509Certificates.X509Certifi cate

For Each cert In mycollection
If cert.GetName.Substring(0, 7) = "CN=Test" Then
x.ClientCertificates.Add(cert)
'This is not working in the Compact Framework 1.0/2.0
Exit For
End If
Next

mycollection = Nothing

store.Close()
store = Nothing

x.Url = "https://PDA.Test.com"


How to make this work on my Device ?
Best regards
Kay

Jun 24 '06 #5
No, I have no solution to this. I tried to contact some companies to see if
there are som third party products available, but I get no response at all.

I will continue my search in August.

Kay

"Vaz" <Va*@discussions.microsoft.com> skrev i melding
news:CE**********************************@microsof t.com...
I am in the same situation. Did you managed do get there?
I would appreciate to hear from you, please.

"Kay-Christian Wessel" wrote:

Jun 25 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: boble | last post by:
Sorry, it's may be off topic ;_((( The following article http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppc2k3/ht ml/winmob03.asp states that a.. Microsoft Windows .NET...
0
by: Earle Oxner | last post by:
We are developing an application on PocketPC2002 platform and we are trying to make webservice calls using HTTPS. HTTP works fine but HTTPS does not work. The same code which doesn't work on...
2
by: Duncan | last post by:
I am using the evaluation version of CE.NET 4.1. I had also installed the release version of the Compact Framework. I uninstalled the CE.NET 4.1, and then realized I needed it again and...
1
by: Asad Khan | last post by:
Hi, I have Visual Studio 2002 Enterprise Architecture Edition. I was wondering if anyone has any information on how I can develop applications for .Net Compact Framework using this IDE. I've heard...
2
by: rawCoder | last post by:
Hi All, I have a *.cer file, a public key of some one and I want to encrypt some thing using this public key. Can someone point me to a sample code for Encrypting some file using...
2
by: Hans Kesting | last post by:
Is it possible to mix code meant for the CompactFramework and code meant for the standard framework? We are trying to make PDA and light-weight "laptop" versions of one application. This means a...
0
by: Roland Rosier | last post by:
Hello, I am trying to understand Managed C++ and the .Net Framework, and as far as I can tell, you add a /CLR option to the compiler to make it generate MSIL from C++. However, I need to...
5
by: bob | last post by:
Hi Using 2003 - targeting the compact framework (c#), but would like to do most development using the full.net (manually leaving out stuff not in the compact framework). Q. Trying to find a...
3
by: Greg | last post by:
Hello all, I am looking to download an image from a website from within a compact framework pda app. I have tried everything I could find and thus I turn to you. Any help or suggestions would be...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.