473,395 Members | 1,696 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,395 software developers and data experts.

Consuming Webservice via https

Hi and sorry for the heavy crossposting (fu2 mpdf)!

As you might have gotten out of the subject line, my application tries to
consume a webservice that's being connected to via https. This works fine
when I use a windows forms app. Trying the same from within an asp.net app
fails. As far as I can tell this is due to the lack of an installed client
certificate for the ASPNET windows user account. The certificate I use is
available as X.509 (.cer) and as PKCS #7 (.p7b). On MSDN I read an article
that tells how to install an PKCS #12 certificate (.pfx) into the machines
certificate store.

My question is now: How can I connect to the webservice using the
certificate I got?

Any answer is appreciated.

Regards!
Dec 4 '06 #1
1 11739
You can use something like this:

// Load the client certificate from a file.
X509Certificate x509 = X509Certificate.CreateFromCertFile(@"c:\user.cer") ;

// Add the client certificate to the ClientCertificates property of the
proxy class.
webservice.ClientCertificates.Add(x509);
Regards,
Catalin
"Jens Mander" wrote:
Hi and sorry for the heavy crossposting (fu2 mpdf)!

As you might have gotten out of the subject line, my application tries to
consume a webservice that's being connected to via https. This works fine
when I use a windows forms app. Trying the same from within an asp.net app
fails. As far as I can tell this is due to the lack of an installed client
certificate for the ASPNET windows user account. The certificate I use is
available as X.509 (.cer) and as PKCS #7 (.p7b). On MSDN I read an article
that tells how to install an PKCS #12 certificate (.pfx) into the machines
certificate store.

My question is now: How can I connect to the webservice using the
certificate I got?

Any answer is appreciated.

Regards!
Dec 7 '06 #2

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

Similar topics

1
by: mzam | last post by:
Hi everyone, I have a vbscript which is consuming WebMethods from a WebService. Whenever the WebMethod returns a string or integer then no problem but when the WebMethod returns a DataSet then...
0
by: Jessard | last post by:
Hi all, I am trying to consuming a .NET web service from a standard (classic) ASP page. I have come across a few articles which describe that it can be done as follows (after installing the...
0
by: Srinivas Kotta | last post by:
Hi, I am Trying to get the Array of claases from Webservice which returns an array of classes. that webservice is returned in Java and i am consumin g that webservice in ASP.Net. my...
0
by: Matthew B. Lehrman | last post by:
I've googled all over the place trying to get answer to this question and some things have come close, but nothing quite. Asp.NET 1.1, Visual Studio 2003 I am writing Visual Basic apps. I can...
7
by: Robbert van Geldrop | last post by:
Hello, I have a problem in a C# client that consumes a webservice which is wrapped by WSE 2.0 sp3: The WebService works fine but very rarely my client comes in a state where every call to the...
2
by: David G | last post by:
My company has a Webservice that is currently running in production. It is secured using SSL and clients are authenticated using X509 certificates. I am able to consume the Webservice methods in...
4
by: Boni | last post by:
I want consuming a webserivce trough a proxy. I use this code. myService s = new myService (); System.Net.WebProxy proxyObject = new System.Net.WebProxy("http://proxyhost:8080"); s.Proxy =...
2
by: Jens Mander | last post by:
Hi and sorry for the heavy crossposting (fu2 mpdf)! As you might have gotten out of the subject line, my application tries to consume a webservice that's being connected to via https. This works...
3
by: bharadwajrv | last post by:
i'm consuming a Webservice (created in java) in .Net 2003 (in C#)... whenever i invoke the webmethod, i'm getting below error message "Additional information: Client found response content type of...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.