473,783 Members | 2,564 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

WebService Client Certificate Problem

(Cross-posted to dotnet.framewor k.aspnet.webser vices and
dotnet.framewor k.webservices, follow-ups set to
dotnet.framewor k.aspnet.webser vices)

Hi,

I'm attempting to connect to a 3rd party web service (for which they
have supplied client certificates), but with no success.

As far as I can tell, the code below should work, however, I always
get back an HTTP 403 (Forbidden) error returned. (I've also tried
loading the certificate from the certificate store with exactly the
same result.

I'm using a WSDL file as the basis for the interface to a web service
and using the following code (based on MSDN documentation):

/////////////////////////////////////////////////////////////////////
service = new RequestService( );

// certificate is the path to a DER encoded x509 certificate
X509Certificate x509 =
X509Certificate .CreateFromCert File(certificat e);
service.ClientC ertificates.Add (x509);

// Create a request object
RequestType request = new RequestType();
// Build request

// MakeRequest method of the service
ReplyType reply = service.MakeReq uest(request);
/////////////////////////////////////////////////////////////////////

Cheers,

Koan
Nov 21 '05 #1
0 3378

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

Similar topics

1
3289
by: Paul NGPC | last post by:
Hi folks This is a challenging and interesting topic. Need HELP on this, would be good if some tips/techniques can be given for the topic. Using VB.NET client to connect to JavaWebserver. Don't know how to use the 2-way SSL to communicate and make the SSL handshake process( at Transport level https://) transparent. Any .NET classes to make all the 2-way SSL
3
9964
by: JerryK | last post by:
Hi, I have an ASP.net page, written in VB.net. In that code I want to access a validator web services that is secured via SSL. I have installed the certificate, via a .pfx file, on the system. I can browse to the service and appear to be getting through However, from my server page I cannot access the web service. The call to the service generates the exception "Request failed with HTTP status 403: Forbidden". I had previously...
2
1442
by: Papa.Coen | last post by:
Hi, I'm experiencing problems when calling a .net webservice using SSL from a Windows Service. I get an 403.7 error: The request failed with HTTP status 403: Forbidden It's driving me nuts. Specs:
2
1308
by: thomas | last post by:
Hi everybody, Here is the scenario: webservice and a windows client application. Requirements: 1. Only authenticated and authorized users shall be able to call web methods. 2. User names or passwords shall never be sent over http. Constraints:
3
13896
by: jwillams77 | last post by:
I have searched extensively though Google and Experts Exchange and have not quite found the answer to this problem. Here is the scenario: I have a .NET 2.0 c# web service that is installed under a path on our server that requires a client certificate to reach both the service and the website that will use the service. The website however is in classic ASP, so I am having to use MSSOAP 3.0 to call the service from the ASP page. Here is...
2
2664
by: b.fokke | last post by:
I'd like to connect to a webservice using TLS/SSL. I have two separate client certificates: 1. A certificate for digital verification 2. A certificate for encryption. When I use the first one (i.e. add it to the ClientCertificates collection of the web request), I can establish a connection but I get a WebException: "Underlying connection closed: Could not establish trust relationship". When I use the second one I can't even establish a...
1
11763
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 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...
0
2034
by: Daniel Knöpfel | last post by:
Hi We have developed a webservice that was accessed by a fat windows client. A security requirement was that the client authenticates itself by using by providing a client certificate. The webserver (iis) made then sure that only clients providing a valid certificate could connect. (settings: Requeire secure channel, Require client certificates). This worked fine. Due to a request by our client, we are forced to integrate the...
6
6266
by: Doug Ferguson | last post by:
I am using a webservice client that was created from a WSDL file in .Net 1.1. The client ALWAYS works the first time I call it. The second call returns one of two exceptions. It either returns the error: A) The connection has been closed on a receive : Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
0
9643
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9946
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8968
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7494
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6737
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5379
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4044
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2877
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.