Click here to Skip to main content
15,906,708 members
Home / Discussions / C#
   

C#

 
AnswerRe: i have problem with end of process Pin
Luc Pattyn9-Nov-09 0:27
sitebuilderLuc Pattyn9-Nov-09 0:27 
QuestionC# with instant messenger Pin
Levisaxos9-Nov-09 0:07
Levisaxos9-Nov-09 0:07 
AnswerRe: C# with instant messenger Pin
Levisaxos9-Nov-09 1:22
Levisaxos9-Nov-09 1:22 
QuestionSpeech Recognition Pin
krinaljariwala8-Nov-09 23:44
krinaljariwala8-Nov-09 23:44 
AnswerMessage Closed Pin
8-Nov-09 23:51
stancrm8-Nov-09 23:51 
GeneralRe: Speech Recognition Pin
krinaljariwala11-Nov-09 19:29
krinaljariwala11-Nov-09 19:29 
QuestionCreate autoplay bots Pin
merger1238-Nov-09 23:34
merger1238-Nov-09 23:34 
AnswerRe: Create autoplay bots Pin
LimitedAtonement9-Nov-09 7:31
LimitedAtonement9-Nov-09 7:31 
QuestionRe: Create autoplay bots Pin
merger1239-Nov-09 21:13
merger1239-Nov-09 21:13 
AnswerRe: Create autoplay bots Pin
LimitedAtonement10-Nov-09 4:19
LimitedAtonement10-Nov-09 4:19 
GeneralRe: Create autoplay bots Pin
merger12310-Nov-09 21:27
merger12310-Nov-09 21:27 
QuestionGetting the cells data when clicked on it in gridview asp.net Pin
sure_suresh8-Nov-09 23:27
sure_suresh8-Nov-09 23:27 
Questionabout treeview, Pin
miss YY8-Nov-09 22:35
miss YY8-Nov-09 22:35 
AnswerRe: about treeview, Pin
Luc Pattyn8-Nov-09 23:16
sitebuilderLuc Pattyn8-Nov-09 23:16 
AnswerRe: about treeview, Pin
Shameel8-Nov-09 23:41
professionalShameel8-Nov-09 23:41 
GeneralRe: about treeview, Pin
miss YY9-Nov-09 0:13
miss YY9-Nov-09 0:13 
QuestionWeird problem in C#.NET [Solved ^_^] Pin
Bilg218-Nov-09 22:35
Bilg218-Nov-09 22:35 
AnswerRe: Weird problem in C#.NET Pin
Jorg DD8-Nov-09 23:43
Jorg DD8-Nov-09 23:43 
GeneralRe: Weird problem in C#.NET Pin
Bilg218-Nov-09 23:53
Bilg218-Nov-09 23:53 
QuestionVisual Studio Dataset Designer Shows Only Markup Pin
anderslundsgard8-Nov-09 22:20
anderslundsgard8-Nov-09 22:20 
QuestionImplement Output PlugIn in C#.net Pin
codeproject_Tarun8-Nov-09 22:16
codeproject_Tarun8-Nov-09 22:16 
AnswerRe: Implement Output PlugIn in C#.net Pin
Richard MacCutchan8-Nov-09 23:39
mveRichard MacCutchan8-Nov-09 23:39 
GeneralRe: Implement Output PlugIn in C#.net Pin
codeproject_Tarun9-Nov-09 22:08
codeproject_Tarun9-Nov-09 22:08 
GeneralRe: Implement Output PlugIn in C#.net Pin
Richard MacCutchan10-Nov-09 2:27
mveRichard MacCutchan10-Nov-09 2:27 
QuestionHttpWebRequest with certificate Pin
am1974po8-Nov-09 21:58
am1974po8-Nov-09 21:58 
Hi.

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";
Request.ProtocolVersion = HttpVersion.Version11;
Request.KeepAlive = true;
Request.Method = WebRequestMethods.Http.Post;
..
byte[] postBytes = Encoding.ASCII.GetBytes(strRequest);
System.IO.Stream requestStream = Request.GetRequestStream();
requestStream.Write(postBytes, 0, postBytes.Length);
requestStream.Close();
..
HttpWebResponse Response = (HttpWebResponse)Request.GetResponse();

In the windows application (running under logged in user) - I get response and all OK
In the web service (running under NETWORK SERVICE) - I get errors:
{"The underlying connection was closed: An unexpected error occurred on a send."}
{"Authentication failed because the remote party has closed the transport stream."}

Checking with the other side (who gets my requests) it seems like when I'm sending from the windows application they get the request with the certificate and in the case of web service they get the request without the certificate.

In the machine that sends the both requests, in the certificate store, the certificates are stored in: "Certificates (Local Computer) --> Personal --> Certificates".

Any ideas why is one sending the certificate and the other doesn't?

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.