473,387 Members | 1,483 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,387 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 4141
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...

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.