Is there any (hopefully free/open source) code available that does native TLS/SSL communication? I do not speak about the HTTPListener/Client and WebRequest classes. I'd like to do raw TLS communication in my C# code.
Thanks in advance,
Max
Here's an article on codeproject, it also includes code for using OpenSSL.
Do you mind if I ask what you're trying to achieve? Just curious really; there's lots of high-level wrapper classes for this kind of thing so you don't normally need to work at this level (not that there's anything wrong with that :-)
http://www.mentalis.org/soft/projects/ssocket/ - been using this in a commercial product for the last 5 years in .net 1.0, 2.0 and now 3.0. Very reliable, simple to use and stable.
Built-in (as at time of writing) SslStream object makes this easy - see https://www.medo64.com/2014/09/client-authenticated-tls-in-c/
Related
I am trying to implement TLS client in a Silverlight XMPP application.
I found a nice documentation about TLS at tools.ietf.org, there are a good explanation of structures, but I can't find an explanations of how to convert these strunctures into a raw message (bytes).
Here is for example a ClientHello message.
Can anyone share some tips or workarounds, or at least an example of how the ClientHello message should look in bytes?
I tried to sniff it out using WireShark, but it does not show the whole picture.
If something is in full .NET Framework, and does not present in Silverlight, the first option for you is to go to Mono code base and find a way to port it,
https://github.com/mono/mono
As most Mono class library code is licensed under MIT/X11, it is safe to reuse them.
Starting from scratch like you did is not recommended if you've never done similar things before.
TLS is not a trivial thing to implement. Unless you have specific reasons to do this, it's wiser to use existing implementation. You can use Mono as suggested above and port its code, or you can use SSL/TLS classes of our SecureBlackbox library, which is available for Silverlight as well, and doesn't require any extra coding from you.
By ikvm or any other tool, is it possible to port OrientDb to .NET(C#) ? I asked this because they said this is so tiny database :)
Or converting low level java library to c# is not safe?
Yes someone can say, there is a REST api and we can use it by C# easily. But integrated usage is more effective. For example I could not install OrientDB server to windows. It stole 4 hours of my life! And no chance for me
Surely i think OrientDb is ok for production (web application)
Thx.
There is already Blueprints.NET and Pipes.NET, so you could use it and just port the OrientDB persistency layer to .NET. Happy forking ;)
Which native server is best, in your opinion, to implement long-polling / Comet? The first target application is chat, but there will be other implementations - we basically need push-to-client capabilities.
I'm limiting the answers to C# or Java because these two technologies are dominant at my workplace. The requirements are as usual: performance, ease of deployment/programming, customization, ...
IIS + WebSync is a very straight-forward, scalable and extensible solution for server push. There is a free Community edition I highly recommend checking out.
Both Java and .NET platforms have enough capabilities to handle your needs. If you choose Java : You may start with DWR otherwise, on the .net side PokeIn library should be the choice.
I just saw this blogpost from Scott Hanselman yesterday. It looks very promising.
http://www.hanselman.com/blog/AsynchronousScalableWebApplicationsWithRealtimePersistentLongrunningConnectionsWithSignalR.aspx
It features an opensource product called SignalR which is available through nuget.
You can find an example chat application in the sources # github
https://github.com/SignalR/SignalR
I don't think there's a significant difference in this regard.
Try netty-socketio project. It's a Java framework with long-pooling and websocket support using famous Socket.IO protocol.
I know that special attention was paid to Comet support in the Grizzly engine used by Glassfish. It wasn't treated as an afterthought.
I need to write an RMI server and client in C# and was sort of confused about what this really is considering most of the posts I have read online on the subject have been Java-related. What exactly is C#'s version of Java RMI? Thanks in advance!
You're looking for .Net Remoting. You may also want to look into WCF.
If you are using .net 3.0 or better, look into WCF (Windows Communication Foundation). If you are using .net 2.0 or older, look at .Net Remoting.
You can use anything except WCF if you want fast and lightweight application without writing tons of xml or hours to configure calculator.
Is it possible to write a user interface in Java for an application written in C#?
I am working on a user interface of a project that is written in C#, but I have no experience with C# and I am an avid Java user. Is it possible to build the user interface in Java using Java's Swing and AWT libraries that operates an application primarily written in C#.
If this sounds like a really stupid question, I apologize in advance.
You might be able to leverage some of the interoperability features that are integrated into Mono 2.0
http://www.mono-project.com/Main_Page
JNBridge is another possible interoperability solution:
http://www.jnbridge.com/
However, a more optimal approach might be to expose your .NET code as Services - and then access them from the Java client (or through a light-weight ESB).
Of course, time, budget, resources are constraints you'll have to consider.
In addition to http://www.jnbridge.com (proprietary)
you can try http://www.janetdev.org, - open source implementation of a Java 5 SE JDK environment for the .NET platform. Currently it supports .Net 3.5 only (not Mono).
We did this recently and went the route of using a low level socket connection, but pushing xml through it. C# was the server side, and we used the Microsoft 'xsd' tool to generate the XSD schema for the objects and then used JAXB on the java side to generate java code to parse and hold the same objects.
As Barry mentions most of the work/problems was around the socket connection - but that depends on how comfortable you are with that.
Also, for a solution that cross-compiles your java to run in the CLR: http://www.ikvm.net/
I am author of jni4net, open source interprocess bridge between JVM and CLR. It's build on top of JNI and PInvoke. No C/C++ code needed. I hope it will help you.