473,395 Members | 1,468 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Question about using pre-signed certificates

I am hoping someone can help with a strange problem - I am not very
savvy with certificates, so bear with my ignorance in that area. I
have an ASP.NET (1.1) application that calls a web service (non .net)
over SSL. The owner of the web service asked for a certificate request
that he would sign and return back (I used OpenSSL to create the CR).
He provided the certificate and I imported it into my Local
Machine\Personal certs.

Things weren't working, so to ease troubleshooting, I moved to my local
laptop (imported the cert there) and created a quick Windows app with
VB.NET. After fixing the issue (was proxy server related), everything
was working perfectly. When I went back to the web server to implement
the working code, I received an error (see below). I copied my working
VB application directly onto the web server and also received the error
message.

System.Net.WebException: The underlying connection was closed: Could
not establish secure channel for SSL/TLS. --->
System.ComponentModel.Win32Exception: The message received was
unexpected or badly formatted

The owner of the web service is telling me that he doesn't even see the
request coming to his server (at least at the point of SSL
handshaking... his log shows handshake errors if the server is
reached). I would guess a problem with the cert, but it works great
from my laptop. Weird thing is that the server where the CR was
created does not work, but fine from my laptop. I also tried copying
the application/importing cert to a 3rd computer... doesn't work. With
such little information reported in the error message, is there a way I
can tell more specifically what the problem is (and don't say to write
a SOAP extension :-) unless that's my only hope).

Thanks!!

Nov 23 '05 #1
5 2122
Are you absolutely sure you installed the certificate in the right container
? You have to install it in the container for the aspnet user (iis 5) or
apppool user (iis 6) ...

-- Henkk

"RobbieK" wrote:
I am hoping someone can help with a strange problem - I am not very
savvy with certificates, so bear with my ignorance in that area. I
have an ASP.NET (1.1) application that calls a web service (non .net)
over SSL. The owner of the web service asked for a certificate request
that he would sign and return back (I used OpenSSL to create the CR).
He provided the certificate and I imported it into my Local
Machine\Personal certs.

Things weren't working, so to ease troubleshooting, I moved to my local
laptop (imported the cert there) and created a quick Windows app with
VB.NET. After fixing the issue (was proxy server related), everything
was working perfectly. When I went back to the web server to implement
the working code, I received an error (see below). I copied my working
VB application directly onto the web server and also received the error
message.

System.Net.WebException: The underlying connection was closed: Could
not establish secure channel for SSL/TLS. --->
System.ComponentModel.Win32Exception: The message received was
unexpected or badly formatted

The owner of the web service is telling me that he doesn't even see the
request coming to his server (at least at the point of SSL
handshaking... his log shows handshake errors if the server is
reached). I would guess a problem with the cert, but it works great
from my laptop. Weird thing is that the server where the CR was
created does not work, but fine from my laptop. I also tried copying
the application/importing cert to a 3rd computer... doesn't work. With
such little information reported in the error message, is there a way I
can tell more specifically what the problem is (and don't say to write
a SOAP extension :-) unless that's my only hope).

Thanks!!

Nov 23 '05 #2
Hello RobbieK,

Try this [0], this [1] and that [2]

[0] - http://support.microsoft.com/kb/819450
[1] - http://weblogs.asp.net/jan/archive/2.../28/63771.aspx
[2] - http://weblogs.asp.net/jan/archive/2...08/128394.aspx

HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
I am hoping someone can help with a strange problem - I am not very
savvy with certificates, so bear with my ignorance in that area. I
have an ASP.NET (1.1) application that calls a web service (non .net)
over SSL. The owner of the web service asked for a certificate
request that he would sign and return back (I used OpenSSL to create
the CR). He provided the certificate and I imported it into my Local
Machine\Personal certs.

Things weren't working, so to ease troubleshooting, I moved to my
local laptop (imported the cert there) and created a quick Windows app
with VB.NET. After fixing the issue (was proxy server related),
everything was working perfectly. When I went back to the web server
to implement the working code, I received an error (see below). I
copied my working VB application directly onto the web server and also
received the error message.

System.Net.WebException: The underlying connection was closed: Could
not establish secure channel for SSL/TLS. --->
System.ComponentModel.Win32Exception: The message received was
unexpected or badly formatted

The owner of the web service is telling me that he doesn't even see
the request coming to his server (at least at the point of SSL
handshaking... his log shows handshake errors if the server is
reached). I would guess a problem with the cert, but it works great
from my laptop. Weird thing is that the server where the CR was
created does not work, but fine from my laptop. I also tried copying
the application/importing cert to a 3rd computer... doesn't work.
With such little information reported in the error message, is there a
way I can tell more specifically what the problem is (and don't say to
write a SOAP extension :-) unless that's my only hope).

Thanks!!

Nov 23 '05 #3
Thanks Henkk ad Dilip. Unfortunately, no luck. The certificate is
installed in the Local Machine, not the user stores... this is how I
have it setup on the system where it is working as well. I also step
through the app and look at the properties of the cert that is being
added to the WSE certificates collection - it's the right one (by name
anyway).

I also took a look at the articles. Unfortunately, they are all
related to a similar error message, but slightly different (and
intermittent). If you have any additional ideas, let me know.
Otherwise, I have a call into Microsoft - 72 hour turnaround :-( - and
am working on writing a SOAP extension that will log the contents of
the soap envelope to see if that gives any clues.
Thanks again for trying!

Nov 23 '05 #4
Hello RobbieK,
Hmmm open ssl eh? The problem with openssl is it has myraid options
and hard to get them right? You may need to verify that the certificate supports
client/server auth. Why not try makecert.exe to create a cert?

HTH
Regards,
Dilip Krishnan
MCAD, MCSD.net
dkrishnan at geniant dot com
http://www.geniant.com
I am hoping someone can help with a strange problem - I am not very
savvy with certificates, so bear with my ignorance in that area. I
have an ASP.NET (1.1) application that calls a web service (non .net)
over SSL. The owner of the web service asked for a certificate
request that he would sign and return back (I used OpenSSL to create
the CR). He provided the certificate and I imported it into my Local
Machine\Personal certs.

Things weren't working, so to ease troubleshooting, I moved to my
local laptop (imported the cert there) and created a quick Windows app
with VB.NET. After fixing the issue (was proxy server related),
everything was working perfectly. When I went back to the web server
to implement the working code, I received an error (see below). I
copied my working VB application directly onto the web server and also
received the error message.

System.Net.WebException: The underlying connection was closed: Could
not establish secure channel for SSL/TLS. --->
System.ComponentModel.Win32Exception: The message received was
unexpected or badly formatted

The owner of the web service is telling me that he doesn't even see
the request coming to his server (at least at the point of SSL
handshaking... his log shows handshake errors if the server is
reached). I would guess a problem with the cert, but it works great
from my laptop. Weird thing is that the server where the CR was
created does not work, but fine from my laptop. I also tried copying
the application/importing cert to a 3rd computer... doesn't work.
With such little information reported in the error message, is there a
way I can tell more specifically what the problem is (and don't say to
write a SOAP extension :-) unless that's my only hope).

Thanks!!

Nov 23 '05 #5

Did you solve this problem? I have run into a simliar problem and have
found that the X509 certificate works on a computer with v1.1.4322.573
of the .NET Framework installed, but does not work when the .NET
Framework is upgraded to v1.1.4322.2032.

--
jcarrive
------------------------------------------------------------------------
Posted via http://www.mcse.ms
------------------------------------------------------------------------
View this thread: http://www.mcse.ms/message1337111.html

Nov 23 '05 #6

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

Similar topics

4
by: Bruce W...1 | last post by:
A scripting newbie question... I'm trying to understand some code I found. This script conducts a poll and writes the results to a text file. The following statement is part of the source file. ...
11
by: Dave Rahardja | last post by:
OK, so I've gotten into a philosophical disagreement with my colleague at work. He is a proponent of the Template Method pattern, i.e.: class foo { public: void bar() { do_bar(); } protected:...
43
by: nospam | last post by:
I got three (3) files (1) Untitled.aspx (2) Untitled.aspx.1.cs (3) Untitled.aspx.2.cs These three files must be used together to make file #1, Untitled.aspx, page work via J.I.T. when the...
11
by: Mark Yudkin | last post by:
The documentation is unclear (at least to me) on the permissibility of accessing DB2 (8.1.5) concurrently on and from Windows 2000 / XP / 2003, with separate transactions scope, from separate...
26
by: Method Man | last post by:
Say I have the following: int main(void) { char* p, q; p = (char*) malloc(sizeof(char)*10); q = (p + 100) - 99; /* legal? */ free(q - 1); /* legal? */ .... return 0; }
14
by: Schraalhans Keukenmeester | last post by:
I am building a default sheet for my linux-related pages. Since many linux users still rely on/prefer viewing textmode and unstyled content I try to stick to the correct html tags to pertain good...
10
by: haomiao | last post by:
I want to implement a common list that can cantain any type of data, so I declare the list as (briefly) --------------------------------------- struct list { int data_size; int node_num;...
0
by: michdoh | last post by:
Hi All Hoping someone can give me some advice on the following. We have the following scenario: User have to go to an external site to logon to our system, once authenticated they are...
20
by: Deborah | last post by:
I'm trying to clean up my website, and it's in pretty good shape now, but I've gotten confused reading about Doctypes. My site is http://www.simi-therapy.com and my CSS is...
0
by: ChopStickr | last post by:
I have a custom control that is embedded (using the object tag) in an html document. The control takes a path to a local client ini file. Reads the file. Executes the program specified in...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
0
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...
0
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...

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.