473,626 Members | 3,083 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to change the following code to using x509 certs in a cert store the local machine?


HttpWebRequest req =
(HttpWebRequest )HttpWebRequest .Create(Configu rationManager.A ppSettings["URI"]);

req.Proxy = new
System.Net.WebP roxy(Configurat ionManager.AppS ettings["ProxyStrin g"], true);

req.ContentType = "applicatio n/x-www-form-urlencoded";

req.Method = "POST";

byte[] bytes = System.Text.Enc oding.ASCII.Get Bytes(param);

req.ContentLeng th = bytes.Length;

System.Net.WebR esponse resp = req.GetResponse ();

if (req == null) return null;

System.IO.Strea mReader sr = new
System.IO.Strea mReader(resp.Ge tResponseStream ());

return sr.ReadToEnd(). Trim();

I need to secure the communication with ssl. How can this be done?

I have the certs in the local store?

Many thanks in advance

JJ
Mar 15 '06 #1
2 1620
jens,

You can try this article on the MSDN
http://msdn.microsoft.com/msdnmag/issues/04/08/TestRun/

Regards
Scott Blood
C# Developer
"jens Jensen" <je**@jensen.dk > wrote in message
news:O2******** *****@TK2MSFTNG P10.phx.gbl...

HttpWebRequest req =
(HttpWebRequest )HttpWebRequest .Create(Configu rationManager.A ppSettings["URI"]);

req.Proxy = new
System.Net.WebP roxy(Configurat ionManager.AppS ettings["ProxyStrin g"],
true);

req.ContentType = "applicatio n/x-www-form-urlencoded";

req.Method = "POST";

byte[] bytes = System.Text.Enc oding.ASCII.Get Bytes(param);

req.ContentLeng th = bytes.Length;

System.Net.WebR esponse resp = req.GetResponse ();

if (req == null) return null;

System.IO.Strea mReader sr = new
System.IO.Strea mReader(resp.Ge tResponseStream ());

return sr.ReadToEnd(). Trim();

I need to secure the communication with ssl. How can this be done?

I have the certs in the local store?

Many thanks in advance

JJ

Mar 15 '06 #2
Many thanks Scott
/JJ
Mar 15 '06 #3

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

Similar topics

4
2608
by: Richard Cornford | last post by:
For the last couple of months I have been trying to get the next round of updates to the FAQ underway and been being thwarted by a heavy workload (the project I am working on has to be finished an QA tested for a new year release. I don't think that going to prove practical, but there is no harm in trying :) and some serious family commitments. But it has to be done soon so this is stage one. Mike Winter provided an extensive list of...
1
1241
by: John F | last post by:
Currently I'm working on a C# app for a large organization (700 users nationwide). This App is still under development. I have setup code in my App to pull C# source code from a database and dynamically compile it at runtime. All source code stored in the database will be of Type Form and all forms will load as children of an MDI. Once I compile the code I store it on the local machine as a DLL. I do this so that the next time a user...
2
2872
by: Michael Hager | last post by:
Hello all, I have a client that has a database that produces certificates using an access report. The certificate has a picture of the person on it. The pictures were stored by SSN number, and the report knows to look at the SSN number on the cert, and pull the picture with the same SSN, (file name), and add it to the cert. Since HIPPA, they were no longer allowed to store pictures/files by SSN number. Now they will get pictures with...
1
2694
by: | last post by:
Hi, I'd like to store X509 cetificates in a central location (file server, database, etc), and load them when needed, is it practical ? and in term of implementation, can this be achieved by subclass 'securityTokenManager'? has anyone done something similar and shed some lights on it? thanks, -Jason
0
1350
by: Chris Fink | last post by:
I have a requirement to make a webservice have x509 authentication. I have not done this before and have a few questions: 1. where do I obtain the x509 cert? Can I make my own? 2. assuming i have many webservices running on this box (each having their own virtual directories or site), can i just make one webservice have the x509 authentication? how do I set this up in IIS? 3. can i run SSL and x509 on this one webservice? is this common?...
3
7928
by: W C Hull | last post by:
We have a request from Auditing to modify the password an a local workstation administrative account every 90 days. We are developing two programs - a VB6 GUI program that will allow the administrative support person to enter a new password into an App and have that encrypted password saved in a text file. The second part is a VB6 program that only is a command line program that will open the password text file, read the encrypted...
3
2466
by: Tery | last post by:
I'm trying to implement the Handango.com HTTP POST registration method. The instructions are here: http://www.handango.com/marketing/developerTeam/HTTP_Post_Reg_Model_How2.doc I'm stuck on how to encrypt a value using the public key in the Handango certificate. Does anyone have any suggestions or sample asp.net code on how to implement this?
1
2179
by: bommulurianji2 | last post by:
my problem is... For internal cert lookups, encode the cert issuer and serial number as a PKCS #7 issuerAndSerialNumber, hash it down to a fixed size with SHA-1 (you can either use the full 20 bytes or some convenient truncated form like 64 bits), and use that to identify the cert. This works because the internal structure of the DN is irrelevant anyway, and having a fixed-size unique value makes it very easy to perform a lookup in...
1
1362
by: schneider | last post by:
Hello, I'm looking for info on applying a Autenticode/Cert to my .NET libs. Anyone know of a link. Also any information on purchasing them from sources and what specific type of cert to purchase. Currently I'm deling with www.Comodo.com Currently the only thing I see is the need for a file of type .pfx file.
0
8259
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
8696
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
8637
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...
0
8502
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
7188
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
6119
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
5571
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
4090
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
1805
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.