I am looking for an embedded Web Server with out of the box SSL support, preferably configured from a command line or some easy config, without the need to change system wide config (like Registry). It should also work on mono.
Have you tried my old server http://webserver.codeplex.com? It supports SSL and at least used to run on MONO.
I'm also (slowly) building a new one, it got no SSL support yet (but's not that hard to implement by yourself): http://github.com/jgauffin/griffin.webserver
Edit
The HttpListener in Griffin.Framework have SSL support now
I recently came across two such packages.
ceenhttpd - https://github.com/kenkendk/ceenhttpd
and
uHttpSharp - https://github.com/Code-Sharp/uHttpSharp
The part i like about these is that both of them let you load a certificate file from disk. If you use the raw HtttpListener, that is a pain.
If you are open to use .NET Core, you can also self-host Kesterel. I plan to use this as soon as I convert my projects to .NET 5. here is a small sample code for that.
Related
I'm using CefSharp as a webbrowser framework in a Visual Studio C# Form application project.
I read in the CefSharp documentation that I can communicate from the .NET to my website using CefSharp Javascript Injection.
chromeBrowser.ExecuteScriptAsync("document.body.style.background = 'red';");
This line of code will change the background of my document to red.
I'm pretty sure this is not a proper way to establish a communication from the .NET to the website. (I would want for example to send data that the .NET project has to the website so the website can update the MySql database and this seems like a very fragile way to do it)
So I continued to google and I stumbled upon this. It says it
allows for communication between JavaScript and .Net.
Fair enough. I tried to read and understand what's going on but it's quite complex.
My question is: Is this the proper way to establish a communication from my website to the .NET project and from the .NET project to my website? Is there a simpler way?
The thing you've shown is just a communication between JavaScript and .NET
To actually communicate with the website you should use:
Web Sockets: Real-time communication between your server and client.
HTTP: You can use usual HTTP requests in C# to send requests and receive responses.
JavaScript: Run the JavaScript code that will request stuff with CefSharp tools.
I have a mixed technology stack and have an existing spring cloud config server set up. I also have dotnet/c# clients and I need them to work with the config server.
I was unable to find example dotnet code which understands the format and bootstraps at runtime. What I can do, worst case, is translate the server http response.
I see a lot of references to a steeltoe library but seems to be focussed on the server/provider.
Any ideas/example code?
This answer is a couple months late, but the Steeltoe Configuration library is a client for Spring Cloud Config Server, I think it is what you're looking for: https://steeltoe.io/docs/steeltoe-configuration/#2-0-config-server-provider
There are samples for ASP.NET 4.x and ASP.NET Core here: https://github.com/SteeltoeOSS/Samples/tree/master/Configuration/src
I'm surprised by the lack of products out there for running your own FTP server in managed code. I'm looking for either a product or thorough source code for building an FTP server in C# that supports SSL. I need complete control over the directory/file handling, not just serving files from a local directory.
Clever Internet .NET Suite looks to be exactly what I'm looking for. However, when I tried it out I got errors connecting to the FtpServerSSL sample from FileZilla when SSL was enabled. It worked perfectly without SSL, so I wrote to their support, but I haven't heard a response from them yet.
Never done it myself, but you could try one of these:
http://www.c-sharpcorner.com/UploadFile/psingh/FTPServerinCSharp11162005015958AM/FTPServerinCSharp.aspx
http://www.codeguru.com/csharp/csharp/cs_network/sockets/article.php/c7409/
You secure the port using httpcfg or netsh in windows, not in the app.
We plan to release FTP / FTPS server components within a month as part of our SecureBlackbox product. The components are currently being internally tested. As SecureBlackbox is a security suite, SSL part will work there :).
I'm researching the feasiblity of building the ability to browse a subversion repository from my web app. I'm developing in asp.net. I've read some mentions of WebDAV, but nothing that seems particularly concrete. Does anyone know anything about the protocol that is used to communicate with SVN? Or even better, a .net library that can do so.
I think I may have answered my own question...
Edit: There is a new url:
http://sharpsvn.open.collab.net/
Subversion can serve repositories using 2 different protocols. The svn:// protocol is used by svnserve, the custom Subversion server. The http:// protocol is used by the Apache version of Subversion. Apache provides the webDAV functionality that you see with HTTP.
I created a library to work on the server part. It will do stuff like
Add and delete users
Change user's passwords
Create and delete repositories
Create and delete directories
It's called SVNManagerLib and I'm hosting it at CodePlex.
http://svnmanagerlib.codeplex.com
I've used it for a couple Winform apps, but I've also used it with WCF. It only works with svnserve configurations. I haven't had time to add Apache related functionality.
I would like to embed a light weight web server in a Windows application developed in .NET. The web server has to support PHP.
I have looked at Cassini, but it seems it is ASP.NET only.
The .net class HttpListener exposes the underlying http.sys upon which IIS is built. All machines since Windows XP2 have http.sys installed by default.
Here are some links to get you started.
XML-RPC SERVER USING HTTPLISTENER
HttpListener For Dummies
As for the PHP support, I don't know how you would enable this, but there is no technical reason you couldn't build it in.
I would look at the likes of XAMPP Lite which you could easily start up and shutdown with your application.
There is also AppWeb which claims to be exactly what you are looking for.
You can always use PHP as a CGI application. CGI is well documented, and AFAIK pretty easy to implement. Use Darrel Millers suggestion, and couple it with some CGI magick, and you should be cooking with gas.
Mongoose embedded webserver
https://code.google.com/p/mongoose/
You can build it with VS2012/10/08 as EXE and you can use PHP and also websockets to push data to the client app. Also you can build a DLL you can do this with make or bring the code into a VS DLL project and build out a _DLLMain, DEF file, etc. Then use it direct from C# - see the mongoose.cs and example.cs files.