By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,750 Members | 1,367 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,750 IT Pros & Developers. It's quick & easy.

X509Certificate on Compact Framework.

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.