My final solution:
- Use com+ as discussed in the following msdn article (
http://msdn.microsoft.com/library/de...l/secmod27.asp )
- Use the library provided by mentalis
(
http://www.mentalis.org/soft/projects/seclib/)
Both these solutions are working fine for me on Windows XP and 2003.
Make sure you give aspnet and network service accounts permission to the
keys of the certificate. (C:\Documents and Settings\All Users\Application
Data\Microsoft\Crypto\RSA\MachineKeys)
Its amazing how poorly documented this particular problem is. Its taken me a
whole week to finally get it working smoothly.
--
Siddharth Aggarwal
"Siddharth" wrote:
Its already disabled. Yesterday I was able to access the web service using a
Windows application but still no luck with the web app. Also, if I try and
set a web reference to the web service using vs.net, I can see all the web
methods but get the error message "The underlying connection was closed:
Could not establish secure channel for SSL/TLS. The message received was
unexpected or badly formatted"
--
Siddharth Aggarwal
"Brad Roberts" wrote:
I may have had something similar before. It seems that the SSL connection may
not get established if the XP box has the local security/encryption setting
for using "FIPS compliant encryption" set. I am currently on a 2000 box so I
can't recall exactly where it is...
"Siddharth" wrote:
Hi all,
I have been trying to access a web service over HHTPS but have not been
successful. The client has provided us with a pfx file that is password
protected. I successfully exported the certificate to .cer format.
My code is using WSE to access the web service. I basically load the
certificate from the personal store and attach it to the web service proxy
object. However, I keep getting the error: "The underlying connection was
closed. Could not establish secure channel for SSL/TLS." The certificate has
been given the necessary aspnet permissions and I can even access its various
properties from my code.
Any help regarding this matter will be highly appreciated. I am using .Net
Framework 1.1 SP1 on a XP box. The client's WS is written in java and worked
fine before they enabled SSL. I am guessing the problem has to do with the
private key that probably does not get exported to .cer format.
--
Siddharth Aggarwal