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

Home Posts Topics Members FAQ

httpwebrequest and client certificates

We retrieve data from a company called XYZ through httpwebrequest.
The program is coded using VB.NET
They have given a certificate to install.
This certificate is included with the request object.I use httpwebrequest to
retrieve data. The certificate is added to the client certificates collection.

When this component is called from a windows application, I can retrieve the
data.
When this component is called from a web page, I get the following error
The remote server returned an error 403 forbidden.
we have no special setting in machine.config for the section processmodel.
The aspnet process is running under the username aspnet.
if I deploy my component in COM+, it runs successfully.
we feel it is because of permission issue for the user ASPNET .
I have used winhttpcertcfg tool from microsoft to give access to the private
key for the user ASPNET.
The certificate is installed under local machine account in the folder
Personals(LOCAL _MACHINE\MY).
I have no success even after utilizing winhttpcertcfg . I feel that the
httpwebrequest is somehow not passing the client certificate.
to the server. I donot want to put this component in COM+ or make any
changes to Processmodel section of machine.config files.
give me some insights into the issue
Nov 19 '05 #1
1 3907
You are right, you are having a permission issue for the user ASPNET. When I
had a similar problem, I didn't have any luck with winhttpcertcfg either. I
ended up with running the request under the same account as the certificate
was installed under. In your case this translates to changing your ASPNET
user in machine.config.

Wish you to find a better solution.

Eliyahu

"Deepak" <De****@discuss ions.microsoft. com> wrote in message
news:41******** *************** ***********@mic rosoft.com...
We retrieve data from a company called XYZ through httpwebrequest.
The program is coded using VB.NET
They have given a certificate to install.
This certificate is included with the request object.I use httpwebrequest to retrieve data. The certificate is added to the client certificates collection.
When this component is called from a windows application, I can retrieve the data.
When this component is called from a web page, I get the following error
The remote server returned an error 403 forbidden.
we have no special setting in machine.config for the section processmodel.
The aspnet process is running under the username aspnet.
if I deploy my component in COM+, it runs successfully.
we feel it is because of permission issue for the user ASPNET .
I have used winhttpcertcfg tool from microsoft to give access to the private key for the user ASPNET.
The certificate is installed under local machine account in the folder
Personals(LOCAL _MACHINE\MY).
I have no success even after utilizing winhttpcertcfg . I feel that the
httpwebrequest is somehow not passing the client certificate.
to the server. I donot want to put this component in COM+ or make any
changes to Processmodel section of machine.config files.
give me some insights into the issue

Nov 19 '05 #2

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

Similar topics

1
3570
by: Curtis Justus | last post by:
Hello, I tried posting this in the aspnet.security group, but it seemed like some posts in this group are closer to what I'm looking for. In any event, I apologize in advance if this isn't the place to post this... I have a winform app that is using HttpWebRequest to connect to a site using SSL (i.e. "https://..."). The vendor requires me to validate some information on the client certificate I get from their server (to make sure...
9
4884
by: Matt Sollars | last post by:
I've exhausted all other avenues with this problem. Any help would be greatly appreciated. I am performing a simple POST via a HttpWebRequest object to an SSL URL (https://). I have attempted this to several different addresses with no luck. I've tried to supply a new ICertificatePolicy to the ServicePointManager as well. The oddity of the error that I'm receiving is it's happening before any data is even sent. Note: This code works...
1
4102
by: Kevin Landymore | last post by:
I have a vb.net service running under a Domain account. I'm trying to call a web service on our Mainframe (IBM CICS via SSL and Client Certificates) and after a while (1 or 2 days.. thousands of transactions) I'm getting the following errors: First, 2 of these: SoapDriver GotRequestStream System.Net.WebException: The underlying connection was closed: Could not establish secure channel for SSL/TLS. --->...
2
13052
by: Josef Brunner | last post by:
Hi everybody, my VB.NET (Framework 2.0) client application has to do a HttpWebRequest (for reading web-pages and downloading files) on a web server. The server uses a self-signed certifiacte and the client application should also use a self-signed certificate (of course, signed by the same self-made CA) so we would have an authentication of both directions: the server to the client and the other way round. Is there a way to...
2
16381
by: steveS | last post by:
Hi all, I'm having trouble connecting to a Java web service using HttpWebRequest. I get the error message "The request was aborted: Could not create SSL/TLS secure channel". The Java service requires a client certificate which they have provided in .cer format. I can connect ok to their test service which uses SSL but doesnt require a client certificate with the code below. I dont have great deal of knowledge about client certificates...
0
1729
by: steveS | last post by:
Hi all, I'm having trouble connecting to a Java web service using HttpWebRequest. I get the error message "The request was aborted: Could not create SSL/TLS secure channel". The Java service requires a client certificate which they have provided in .cer format. I can connect ok to their test service which uses SSL but doesnt require a client certificate with the code below. I dont have great deal of knowledge about client certificates...
1
5914
by: Joe | last post by:
Hello, I'm currently using a C# class library which is also converted quickly to a console app by adding a MAIN and adjusting the building configuration. I'm using this page as a reference to the code. http://support.microsoft.com/kb/895971 . I am using the CryptoAPI calls instead of a *.cer file. The only reason i'm using this method instead is because now a large project of mine no longer will work properly when using an exported...
0
2438
by: nomad | last post by:
Hi, I am using HTTPWebRequest to add a client certificate. I am then using HTTPWebRequest to POST xml to a web service which requires the attached client certificate to authenticate with their server certificate. However, I keep getting an error "Unable to connect to remote server". I know I am able to connect to their server and retrieve an XML response as we were able to do this using our old solution (WinHTTP in Visual Basic 6). ...
1
4364
by: am1974po | last post by:
I have 2 applications: One is simple windows application and the other is web service. They are both on the same machine, windows server 2003 - SP2. exactly the same code in both: X509Certificate Cert = X509Certificate.CreateFromCertFile("...some path\\export.cer"); HttpWebRequest Request = (HttpWebRequest)WebRequest.Create("https://...some URL..."); Request.ClientCertificates.Add(Cert); Request.UserAgent = "Client Cert Sample";...
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
10315
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10147
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10083
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
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
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
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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.