Open Source .NET embedded web/http server - c#

I am working on a project where I need to embed a web server into my C# application so the application could display it's status via HTTP. I suppose I'll want to configure it through the http also.
I am looking for an open-source library written in C# and with a licensing scheme that will allow me to link it into my existing closed source code (LGPL). Any suggestions of specific products or where to look first?
It would be great if that product could have some kind of scripting, at least templates. All html output would go from the application, only resources would be stored on the disk (images, icons, ...)
EDIT:
I would like it to run under .NET 2.0, however.

Have a look at Microsoft Cassini, a simple HTTP server written in C# licensed under Ms-PL. It's basically a demo how to host the ASP.NET runtime.

Related

View "dat://" Websites in a GeckoFx Web Browser

I'm building a blockchain-themed web browser in a C# .NET Windows Form Application and want to allow users to view sites using the dat:// protocol. I have found several repositories online but none of them seem to be for C# or close to what I want.
I've already tried using the Dat P2P Protocol Firefox addon but the setup was too difficult and I'd have to figure out how to add extensions to the browser in the first place.
Currently there's only one implementation of Dat, which is built for NodeJS. There's a rust implementation being developed as well.

Is there a way to use Metatrader4 C++ version dll with C# to connect to live server

My application is based on asp.net mvc , c# and my client want to connect this application with MT4 server.There is server api https://support.metaquotes.net/ru/docs/mt4/api/server_api
which is in c++.This api help to login at MT4.My application is in Asp.net mvc c# and i want to call these c++ methods in c#.
Is it possible to work with c#.
tAHNKS
Server API is tend to be used to write server plugins, which will be loaded into server memory at runtime. You can use .NET code there, however it's not the best idea.
There is Manager API, I think, it's functionality is sufficient for web application. However officially it has only C++ API. But you can use my wrapper to access it from ASP.NET: https://github.com/Uriil/MetaTrader4.Manager.Wrapper
But both options requires manager credentials

Building a remote command for Elpis in C# through HTTP API

I am helping to build Elpis, which is an open source pandora music player, built with C# and WPF.
Now what i want is to add an HTTP API so that the user may control the program through a browser, like play/pause, like/dislike the current song.
The point afterwards is to control the program through a mobile device accessing the HTTP API.
How exactly should i build the HTTP API so that it can control it?
Github for the project: https://github.com/adammhaile/Elpis
Without knowing why exactly you want the user to control a GUI application via the browser, it's hard to give you good advise.
Assuming you are running your GUI on Windows, take a look at OWIN and the project Katana. They allow you to easily host HTTP interfaces in your own application.
It may be overkill for your project but I would suggest using ASP.NET Web API so that you can build backend web services.
The easiest way to do what you want, assuming you really want to "control the GUI remotely" is to just install TeamViewer on your PC and on your mobile device. Then you could remote in and completely control your GUI.
But I what I think you're after is something more like Google Music. Where you can stream your music through the Internet and onto your mobile devices. If this is the case, I recommend you look at the ASP.NET Web API.
It's not hard to build a web server in C#. You can embed it into your application, and expose parts of your application to HTTP endpoints as an API. You can use the HttpListener class which is part of .NET, and do everything from the ground up yourself. Or you could use something like Nancy, which is a lightweight framework that provides a lot of useful scaffolding like URL routing.
Ended up using Kayak(https://github.com/kayak/kayak) for my self-hosted API.
The example of integration can be seen here:
https://github.com/adammhaile/Elpis/blob/master/Elpis/WebInterface.cs

Creating Cloud Document Server in Asp.Net

Are there any free C# Asp.Net API's to host a server that has cloud capabilities.
All I really want is for users to be able to download Word Documents, The server marks it as locked. Then the user can edit and click "SAVE AS" And it saves it back to my server.
I dont want to use a third party server for this it.
The Microsoft .Net Framework is a free API that has cloud capabilities (ASP.Net).
You will have to implement the code to present the documents and lock them. And find a way to expose the server to the web.
Sounds like Sharepoint to me. A foundation version with the functionality you describe comes free with Small Business Server

is asp.net C# server app rendering into a linux web client ok ? (totally newbie question)

I am wondering if aspx generated webpage content can be read on linux platforms. Is it necessary to have the Mono platform installed on the linux web-clients side ?
Mono is only necessary if you want to host your web server on linux. If you want to see a website you only need a browser.
After if you have a moonlight website, you need the moonlight client.
ASP.NET generates HTML markup and JavaScript that can be used on ANY platform.
Only the server-side requires either Microsoft's .NET (Windows) or Mono (Linux).
Not a problem at all, .NET is used to generate standard HTML which is what a web browser understands. There is no need for a .NET implementation on the client.
completely browser dependent. You do not anything else to view a webpage.
Well. It depends. Pages can look like crap if you haven't followed the HTML(/xhtml) standard.
This is the case if you havent looked at the HTML specification but only developed using internet explorer.
The second issue is fonts. Are you using Microsoft specific fonts in your HTML/stylesheets?
Other than that, pages should look quite similar in different operating systems / browsers.

Categories