Click here to Skip to main content
15,887,683 members
Home / Discussions / C#
   

C#

 
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?
AnswerRe: HttpWebRequest with certificate Pin
Shameel8-Nov-09 23:49
professionalShameel8-Nov-09 23:49 
Questionsql query Pin
sujeet3082@yahoo.com8-Nov-09 21:52
sujeet3082@yahoo.com8-Nov-09 21:52 
AnswerRe: sql query Pin
Christian Graus8-Nov-09 23:32
protectorChristian Graus8-Nov-09 23:32 
AnswerRe: sql query Pin
Shameel8-Nov-09 23:51
professionalShameel8-Nov-09 23:51 
GeneralRe: sql query Pin
ragnaroknrol9-Nov-09 2:53
ragnaroknrol9-Nov-09 2:53 
GeneralRe: sql query Pin
Shameel9-Nov-09 7:29
professionalShameel9-Nov-09 7:29 
AnswerRe: sql query Pin
padmanabhan N9-Nov-09 0:29
padmanabhan N9-Nov-09 0:29 
QuestionLogin failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. How to connect to SQL server on another machine? Pin
Chesnokov Yuriy8-Nov-09 21:41
professionalChesnokov Yuriy8-Nov-09 21:41 
AnswerMessage Closed Pin
8-Nov-09 21:53
stancrm8-Nov-09 21:53 
AnswerRe: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. How to connect to SQL server on another machine? Pin
Chesnokov Yuriy8-Nov-09 22:09
professionalChesnokov Yuriy8-Nov-09 22:09 
AnswerRe: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. How to connect to SQL server on another machine? Pin
sanforjackass8-Nov-09 21:55
sanforjackass8-Nov-09 21:55 
QuestionRe: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. How to connect to SQL server on another machine? Pin
Chesnokov Yuriy8-Nov-09 22:13
professionalChesnokov Yuriy8-Nov-09 22:13 
AnswerRe: Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'. How to connect to SQL server on another machine? Pin
Dave Kreskowiak9-Nov-09 10:30
mveDave Kreskowiak9-Nov-09 10:30 
QuestionCrystal report not displayed in Windows 2008 server with C# .NET 1.1 Pin
Murtuza Husain Miyan Patel8-Nov-09 20:42
professionalMurtuza Husain Miyan Patel8-Nov-09 20:42 
AnswerRe: Crystal report not displayed in Windows 2008 server with C# .NET 1.1 Pin
Abhishek Sur8-Nov-09 21:26
professionalAbhishek Sur8-Nov-09 21:26 
AnswerRe: Crystal report not displayed in Windows 2008 server with C# .NET 1.1 Pin
Srinivasan Raju11-Nov-09 6:49
Srinivasan Raju11-Nov-09 6:49 
Questiontransparent colors in windows applications in c# Pin
hosseinghazanfary8-Nov-09 20:22
hosseinghazanfary8-Nov-09 20:22 

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.