Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / Web Services / June 2005

Tip: Looking for answers? Try searching our database.

Problem Accessing web service over SSL

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Siddharth - 27 May 2005 06:06 GMT
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.
Signature

Siddharth Aggarwal

Brad Roberts - 27 May 2005 21:57 GMT
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...

> Hi all,
>
[quoted text clipped - 13 lines]
> 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 - 28 May 2005 06:42 GMT
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"

Signature

Siddharth Aggarwal

> 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
[quoted text clipped - 18 lines]
> > 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 - 02 Jun 2005 11:29 GMT
My final solution:

- Use com+ as discussed in the following msdn article (
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secmod/html/sec
mod27.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.

Signature

Siddharth Aggarwal

> 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
[quoted text clipped - 25 lines]
> > > 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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.