Is there a way, using intrinsic .NET framework functionality, to open a TCP
connection over an SSL channel I'd rather not get into buying libraries,
etc. Java has the javax.net.ssl.* objects, and I'm not finding an
equivalent in .NET. I looked all over the Internet, but nowhere a pointer/solution can be found. Please note this is a socket connection, not an HTTPS connection. Also, it's about .NET version 1.1.
Any hints/tips/remarks/howto's (if even possible) would be greatly appreciated...

SSL on TCP Socket, how in .NET 1.1?
ShimpiSuhas
If you have a reasonable editor or even notepad you can move to 2.0 without having to spend a penny. Of course you can send me $100 for gicing you the suggestion. You are welcome.
Wedant
In 1.1 there is no way to do SSL over Sockets.
Sorry.
Pleb
I think you will be better off using a 3rd party component for now -
or migrate to .NET 2.0
.NET 2.0 supports full SSL functionality and you can install .ET 2.0 Side by Side
with .NEt 1.1. Is there a reason you want to stay with .NEt 1.1
rexwrx
Okay, that shines some light. The reason I was asking, is that I have to develop an EPP client, which should send XML commands as byte arrays over a TCP socket using SSL.
The EURid (which handles .eu registrations) requires such a (secured) mechanism for automatically registering such domain names. They published some code samples in several programming languages, but not in .NET. Now I know why. I guess I have to conclude .NET 1.1 is no option for building an .eu/EPP client
Allen Cheng
Uziels
sharathkumarmv
Because it's a new project, using 2.0 could an reasonable option. I think I need to your advice whether or not to migrate to .NET 2.0 considering my current skills.
Would there be a lot of learning needed to gain 2.0 skills Consider the following (major) subjects needed by the project:
- user authentication
- user interfaces
- data acces/manipulation (on SQL Server 2000)
- extensive XML use (data, schemes, validation)
- TCP networking using SSL
As a matter of fact, I haven't worked extensively with XML and networking before (in 1.1). Do you think I would need a lot of time to get up and running using 2.0
Robert Flaming
If you could help, that would be great. I've got about six weeks to develop the complete application (networking is just a small, but essential part of it), but within a few work days I need to know whether or not I could even complete this project (by knowing if this SSL issue could be resolved).
The code below is what I tried, but now it should use SSL on top of it. Is there an easy way to make it SSL enabled Unfortunately, I'm not quite a networking expert...
Thanks in advance.
<code>
Private Sub Connect(ByVal server As String, ByVal message As String, ByVal port As Int32)
Dim ep As EndPoint = New IPEndPoint(Dns.Resolve(server).AddressList(0), port)
Dim sock As Socket = New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
sock.Connect(ep)
If sock.Connected Then
Dim ReceivedData As String
Dim amountBytesSent As Int32 = sock.Send(String2bArray(message), String2bArray(message).Length, SocketFlags.None)
Dim NumBytes As Int32 = sock.Available
If NumBytes > 0 Then
Dim buffer(NumBytes - 1) As Byte
Dim Received As Int32 = sock.Receive(buffer)
If Received > 0 Then
ReceivedData = bArray2String(buffer)
End If
End If
Response.Write(ReceivedData)
sock.Shutdown(SocketShutdown.Both)
sock.Close()
End If
End Sub
Private Function String2bArray(ByVal Data As String) As Byte()
Return System.Text.Encoding.ASCII.GetBytes(Data)
End Function
Private Function bArray2String(ByVal bytes() As Byte) As String
Return System.Text.Encoding.ASCII.GetString(bytes)
End Function
</code>
mkruluts
Welll it is not super difficult to do some quick coding to do SSL
on top of Sockets using 1.1. What is the time frame you are looking at
We could, within sometime, whip up some sample
Huybs Kris
here you will find a free library wihch supports SSL on .NET 1.1: www.mentalis.org
weirdbeardmt
see http://blogs.msdn.com/dgorti/default.aspx for an example of the tracing
gradley
Siggy01
notepad kind of a person, you will find 2.0 pleasant to work with.
One thing I would say is that between 1.1 and 2.0 all the core concepts of
the managed code are preserved so your learning and understanding of 1.1 will
easily translate to 2.0. You might have to learn some new classes and methods.
In any case rolling your own SSL on top of sockets is significatly more time
consuming than using the SSLStream classes in 2.0. In fact within about 10 lines of code you have the SSL Sockets working. No kidding.
Billy Feng
.Net Framework SDK > Samples and Quickstarts > Samples > Technology Samples > Networking Samples > Secure Streams Samples
This page will provide you with a sample client and server using the SSLStream class as well as samples for another new stream called Negotiate stream.