Use security in tcp connection - c#

I need to connect a remote server using TCP. the connection need to be secure (SSL/TLS).
The question is how can I open a secure connection to the server?
Does .net framework have the ability?
(I am using c#)
Thank you,
Alon,

SslStream class in .NET framework, or our SSL components if you need advanced functionality and complete control.

The most common and probably one of the best libraries is OpenSSL
UPDATE
.NET wrapper for OpenSSL library

Related

Is there any way to force web clients to use a secure SSL cipher (TLS 1.1/TC4) in my C# Web Server, to avoid BEAST attacks

I have a specialist web app written in C# - my C# code acts as a web server, accepts connections from browsers, and presents the app as web pages.
The existing app uses SSL to secure the connection from the browser, but I am concerned about BEAST, which renders many of the older SSL ciphers insecure. I therefore want to ensure that I only accept connections using TLS1.1 or later, and/or secure cyphers like RC4.
I have already accepted that I will have to ditch the SSL library I was using, and probably switch to .NET 4.5 with SslStream.
Although I see how I can check the cypher for a stream using SslProtocol and CipherAlgorithm, I cannot find a way to force a connection to prefer one of the more secure algorithms. Am I missing something?
For the avoidance of doubt, this is nothing to do with ASP - this server is written in raw C#. I need a programatic way of making SslStream prefer particular ciphers. It is unlikely that I will have the necessary permissions to alter ssl registry settings on the host server.

How to use MUMPS with .NET?

I want to know how can i communicate with MUMPS using C# .NET?
There is a requirement where i have to develop the UI in .NET using any of the .NET technology like ASP.NET, WPF or Silverlight etc. But the backend it will be old 60s MUMPS which is non relational database.
Is there any way to communicate to procedure of MUMPS using .NET? how can i use .NET with MUMPS together? I could not find much resource on Internet so thought to ask here
Request you to help and guide me with my above query.
Thanks
Regards
VJ
It depends on which MUMPS solution you will be using.
One possibility is the M/Gateway Services Integrator (MGWSI) developed by M/Gateway and provided free of charge. From their web page (M/Gateway Developments, then click on the MGWSI Gateway tab):
The core MGWSI product is a generic integration engine, but we provide a range of specific integration gateways as part of the overall package, including:
Caché, GT.M or M21 to PHP (the m_php gateway) ;
Caché or GT.M to Java Server Pages (the m_jsp gateway) ;
Caché or GT.M to ASP.Net (the m_aspx gateway) ;
Another possibility is to use KB_SQL, which offer JDBC and ODBC drivers. KB_SQL can be used with most of MUMPS solutions.
Another possibility may be to use EsiObjects, which supports both GT.M and InterSystem Caché. From their FAQ :
EsiObjects supports 4 fundamental gateways:
TCP/IP Gateway: This gateway is used to connect the EsiObjects Client Development VDE with any of the supported M systems. Additionally, The TCP/IP Gateway is also used to connect the runtime environment via an ActiveX Control.
COM Bridge: This is used with Microsoft clients built using VB, C++, C# , etc. It uses the TCP/IP Gateway and implements the ActiveX control for EsiObjects.
Java Gateway: This gateway uses the TCP/IP Gateway. There exists a set of methods in the ESI library that let you generate external Java Proxy classes from any EsiObjects class. All the connectivity is built in. Therefore, you can take the Java file that is created and use it within your Java environment, using the proxies automatically accesses the data on the EsiObjects Server.
CORBA ORB (aka EsiORB): This package is an add-on to EsiObjects. It is an implementation of the Object Management Groups (OMG) Common Object Request Broker Architecture (CORBA). The ORB uses the TCP/IP Gateway.
If the MUMPS solution you use is InterSystem Caché, you could use Caché Managed Provider solution. That said, that solution would work only for InterSystem Caché, not for the other MUMPS solutions.
If the MUMPS solution you use is GT.M, you could use PIP since it offers a JDBC driver. That said, that solution would work only for GT.M, not for the other MUMPS solutions.

SOCKS communication using .net framework 4.0

I want to communicate with server to run my c# application and so I need to connect with server through sock communication. Is it possible using .net framework 4 ?
Socks and Sockets are different ..
Indeed if you wish to use sockets you could use System.Net.Sockets but,
if you wish to use SOCKS (SOCKS client/server that can be used to provide convenient and secure network connectivity) you could use next example http://www.cknotes.com/?p=204
You could use the System.Net.Sockets class to connect to port on a remote server.
If you are looking for SOCKS C# libs you could go for these which works with HTTP, Socks4, Socks4a, and Socks5 proxy servers and comes with integrated help. It also works with Mono.
http://www.starksoft.com/prod_proxy.html
http://sourceforge.net/projects/starksoftproxyc/
Was looking for same thing and ran across this: Socks4/5 proxy in .net
It isn't .net 4.0 but it is a good jumping off point.1

What encryption method does .NET use when setting secure="true" in a remoting channel configuration?

We have been asked by a customer which encryption methods are used for our remoting calls -- we use the secure="true" tokenImpersonationLevel="impersonation" attributes on the channel in the configuration file.
Is this using Kerberos? NTML? CHAPS?
I can't seem to find any documentation on this.
EDIT: We use TCP channels for remoting.
Well, a secure TCP channel (suppoert starting with .NET 2) uses SSPI to encrypt the data.
http://www.codeguru.com/columns/dotnet/article.php/c10253
According to Wikipedia: http://en.wikipedia.org/wiki/Security_Support_Provider_Interface
The "Secure channel" is using differen encrpytions depending on the OS support, but SSL/TLS is part of it.

SQLServer Encryption Of Data Channel From C#

Can anyone give me pointers on how to achieve the above - I am familiar with the C# libraries and database connectivity but have never had to use a secure channel.
What do I need to do in C# and on the database side to force connections to always be encrypted??
See this Microsoft KB for details on how to do this.
A reliable way to secure communication without SSL certs between a web server and SQL Server machine is to use IPSec.
http://msdn.microsoft.com/en-us/library/aa302366.aspx

Categories