Click here to Skip to main content
15,891,943 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

Could any one give me a solution on this,how to provide security in windows services using C#.net with TLS via socket communicaiton, instead of SSL.

If anyone knows about MLLP via socket in windows services and share the details with examples.


Thanks in advance

Guru
Posted

Check SslProtocols on MSDN[^]. There is an example at the end of the document.
 
Share this answer
 
Comments
gurusha 20-Nov-13 0:41am    
Thank you for response,

The sample files tested in Console application and working fine. We required Windows Services with C#.Net via socket. Could you please share the Windows Services Sample Code file or link.


thanks in advance.
guru
Hi All

Thank you for support, resolved my self by using TLS1.2.

First Register the Certificate in MMC.

var fileName = ConfigurationSettings.AppSettings[certificate];
var password = ConfigurationSettings.AppSettings[password];
certificate = new X509Certificate2(strCertificateFile, password);

sslStream = new SslStream(client.GetStream(), false);
try
{
sslStream.AuthenticateAsServer(certificate, false, SslProtocols.Tls12, true);
}
catch (AuthenticationException e)
{
}

if (sslStream.IsAuthenticated)
{}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900