473,320 Members | 2,097 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,320 software developers and data experts.

C#.NET Application - Could not establish secure channel for SSL/TL

I'm running a C#.Net application that is using the HttpWebRequest to upload
an xml file to a https site with FIPS complicancy turned on. On the
"GetRequestStream()" method I get:

"The underlying connection was closed: Could not establish secure channel
for SSL/TLS."

With FIPS turned on the secure website, only a FIPS compliant protocol can
be used. Since SSL is not FIPS compliant then only TLS can be used.
Unfortunately, this protocol is not supported in .Net Framework 1.1.
I then tried recompileing my C#.Net program in Visual Studio 2005. It
mentioned that the .NET Framework 2.0 supprted the TLS protocol. When running
the application, I encountered the same problem. Has anyone found a solution
to this problem?

--
Bill Larson
Nov 19 '05 #1
3 4137
Hi Bill,

Welcome to ASPNET newsgroup.
Regarding on the SSL/TLS connection establishing problem, it is really an
existing problem in the .NET framework implementation of the WEBRequest
component. Actually the problem is quite hard to say who has done the
thing wrong. The .net framework's webrequest component address the https
connection and for which currently SSL is widely used though TLS is the
latest standard. Anyway, I've found the following workaround form some
former cases on this problem:

In our code add the below statement before creating and using the
webrequest components....
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls;
Namespace: System.Net

It will force TLS 1.0 instead of SSL V3.

Hope helps. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| Thread-Topic: C#.NET Application - Could not establish secure channel for
SSL/TL
| thread-index: AcXf/si25gClDMRqTjaAVogbgA8GCA==
| X-WBNR-Posting-Host: 158.15.248.140
| From: "=?Utf-8?B?QmlsbA==?=" <Ke**@community.nospam>
| Subject: C#.NET Application - Could not establish secure channel for
SSL/TL
| Date: Wed, 2 Nov 2005 14:43:03 -0800
| Lines: 17
| Message-ID: <2A**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:135659
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| I'm running a C#.Net application that is using the HttpWebRequest to
upload
| an xml file to a https site with FIPS complicancy turned on. On the
| "GetRequestStream()" method I get:
|
| "The underlying connection was closed: Could not establish secure channel
| for SSL/TLS."
|
| With FIPS turned on the secure website, only a FIPS compliant protocol
can
| be used. Since SSL is not FIPS compliant then only TLS can be used.
| Unfortunately, this protocol is not supported in .Net Framework 1.1.
| I then tried recompileing my C#.Net program in Visual Studio 2005. It
| mentioned that the .NET Framework 2.0 supprted the TLS protocol. When
running
| the application, I encountered the same problem. Has anyone found a
solution
| to this problem?
|
| --
| Bill Larson
|

Nov 19 '05 #2
It worked. Thanks!
--
Bill Larson
"Steven Cheng[MSFT]" wrote:
Hi Bill,

Welcome to ASPNET newsgroup.
Regarding on the SSL/TLS connection establishing problem, it is really an
existing problem in the .NET framework implementation of the WEBRequest
component. Actually the problem is quite hard to say who has done the
thing wrong. The .net framework's webrequest component address the https
connection and for which currently SSL is widely used though TLS is the
latest standard. Anyway, I've found the following workaround form some
former cases on this problem:

In our code add the below statement before creating and using the
webrequest components....
System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls;
Namespace: System.Net

It will force TLS 1.0 instead of SSL V3.

Hope helps. Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


--------------------
| Thread-Topic: C#.NET Application - Could not establish secure channel for
SSL/TL
| thread-index: AcXf/si25gClDMRqTjaAVogbgA8GCA==
| X-WBNR-Posting-Host: 158.15.248.140
| From: "=?Utf-8?B?QmlsbA==?=" <Ke**@community.nospam>
| Subject: C#.NET Application - Could not establish secure channel for
SSL/TL
| Date: Wed, 2 Nov 2005 14:43:03 -0800
| Lines: 17
| Message-ID: <2A**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:135659
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| I'm running a C#.Net application that is using the HttpWebRequest to
upload
| an xml file to a https site with FIPS complicancy turned on. On the
| "GetRequestStream()" method I get:
|
| "The underlying connection was closed: Could not establish secure channel
| for SSL/TLS."
|
| With FIPS turned on the secure website, only a FIPS compliant protocol
can
| be used. Since SSL is not FIPS compliant then only TLS can be used.
| Unfortunately, this protocol is not supported in .Net Framework 1.1.
| I then tried recompileing my C#.Net program in Visual Studio 2005. It
| mentioned that the .NET Framework 2.0 supprted the TLS protocol. When
running
| the application, I encountered the same problem. Has anyone found a
solution
| to this problem?
|
| --
| Bill Larson
|

Nov 19 '05 #3
You're welcome Bill,

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| Thread-Topic: C#.NET Application - Could not establish secure channel for
SS
| thread-index: AcXgiM1pEBrK8wPfT8W0AUqywxpjtg==
| X-WBNR-Posting-Host: 158.15.248.140
| From: "=?Utf-8?B?QmlsbA==?=" <Ke**@community.nospam>
| References: <2A**********************************@microsoft.co m>
<iV**************@TK2MSFTNGXA01.phx.gbl>
| Subject: RE: C#.NET Application - Could not establish secure channel for
SS
| Date: Thu, 3 Nov 2005 07:11:01 -0800
| Lines: 90
| Message-ID: <06**********************************@microsoft.co m>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet:135825
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| It worked. Thanks!
| --
| Bill Larson
|
|
| "Steven Cheng[MSFT]" wrote:
|
| > Hi Bill,
| >
| > Welcome to ASPNET newsgroup.
| > Regarding on the SSL/TLS connection establishing problem, it is really
an
| > existing problem in the .NET framework implementation of the WEBRequest
| > component. Actually the problem is quite hard to say who has done the
| > thing wrong. The .net framework's webrequest component address the
https
| > connection and for which currently SSL is widely used though TLS is the
| > latest standard. Anyway, I've found the following workaround form some
| > former cases on this problem:
| >
| > In our code add the below statement before creating and using the
| > webrequest components....
| >
| >
| > System.Net.ServicePointManager.SecurityProtocol =
SecurityProtocolType.Tls;
| > Namespace: System.Net
| >
| > It will force TLS 1.0 instead of SSL V3.
| >
| > Hope helps. Thanks,
| >
| > Steven Cheng
| > Microsoft Online Support
| >
| > Get Secure! www.microsoft.com/security
| > (This posting is provided "AS IS", with no warranties, and confers no
| > rights.)
| >
| >
| >
| >
| > --------------------
| > | Thread-Topic: C#.NET Application - Could not establish secure channel
for
| > SSL/TL
| > | thread-index: AcXf/si25gClDMRqTjaAVogbgA8GCA==
| > | X-WBNR-Posting-Host: 158.15.248.140
| > | From: "=?Utf-8?B?QmlsbA==?=" <Ke**@community.nospam>
| > | Subject: C#.NET Application - Could not establish secure channel for
| > SSL/TL
| > | Date: Wed, 2 Nov 2005 14:43:03 -0800
| > | Lines: 17
| > | Message-ID: <2A**********************************@microsoft.co m>
| > | MIME-Version: 1.0
| > | Content-Type: text/plain;
| > | charset="Utf-8"
| > | Content-Transfer-Encoding: 7bit
| > | X-Newsreader: Microsoft CDO for Windows 2000
| > | Content-Class: urn:content-classes:message
| > | Importance: normal
| > | Priority: normal
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| > | Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA03.phx.gbl
| > | Xref: TK2MSFTNGXA01.phx.gbl
| > microsoft.public.dotnet.framework.aspnet:135659
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > |
| > | I'm running a C#.Net application that is using the HttpWebRequest to
| > upload
| > | an xml file to a https site with FIPS complicancy turned on. On the
| > | "GetRequestStream()" method I get:
| > |
| > | "The underlying connection was closed: Could not establish secure
channel
| > | for SSL/TLS."
| > |
| > | With FIPS turned on the secure website, only a FIPS compliant
protocol
| > can
| > | be used. Since SSL is not FIPS compliant then only TLS can be used.
| > | Unfortunately, this protocol is not supported in .Net Framework 1.1.
| > | I then tried recompileing my C#.Net program in Visual Studio 2005. It
| > | mentioned that the .NET Framework 2.0 supprted the TLS protocol. When
| > running
| > | the application, I encountered the same problem. Has anyone found a
| > solution
| > | to this problem?
| > |
| > | --
| > | Bill Larson
| > |
| >
| >
|

Nov 19 '05 #4

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

Similar topics

11
by: Timothy Shih | last post by:
Hi, I am having a freezing issue with my application. My application serves several remotable objects, all of which must be initialized before their use. Furthermore, some of them depend on each...
1
by: C.W. | last post by:
I am trying to connect to a remote server in order to perform an http post inside my asp.net page. However, I consistently get the following error: System.Net.Sockets.Socket.Receive(Byte...
4
by: konsu | last post by:
hello, my client code communicates with a web service through a https connection. the code has a stub derived from SoapHttpClientProtocol. It also sets a certificate policy handler that allows...
1
by: Mark Richards | last post by:
Hi, I am interfacing with another company using web services (they are a java shop). We've been doing this for over 2 years, but a couple months age we started getting this error randomly. It...
1
by: Rob Thompson | last post by:
Hi, We are using web services that are secured using SSL, everything works fine, but every now and then we get an error: >>START<< System.Net.WebException: The underlying connection was...
0
by: Ryan Michela | last post by:
Hello all, I am trying to access our SOAP web service over an HTTPS connection and am getting the infamous "Could not establish secure channel for SSL/TLS" error. The client program works at all...
0
by: daryl | last post by:
I have a situation where a webservice has worked fine in a development environment, but when placed into production has stopped working (although at one time it was). Using WSE 2.0/DIME, we...
0
by: Nathan Alden | last post by:
This error will appear intermittently and seemingly for no reason when my Web service tries to contact another Web service over the Internet using SSL. I'd say about 80-90% of all the requests work...
7
by: Jim Butler | last post by:
I have this error that is happening on all of our web servers (production included). It basically started occurring once we loaded 2005 sql client tools, asp.net 2.0 (and all related prerequistes)...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.