How to write simple REST based server in C# on mono? [closed] - c#

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I'm porting a small server from Scala to C# (on Mono) and need to get a very simple REST interface going. Am trying to figure out the easiest (but robust) way to do this.
For reasons I wont go into, NOT using webservers like Apache, Nginx etc would be preferred.
Yes, I could manually code up something listening to sockets, parse HTTP request coming in, handle threading etc... but hoping there are libraries or frameworks that already handle this.
Any suggestions?

I've built a webserver that should work in mono. At least version 1.1 should.
You can find it here: http://webserver.codeplex.com.
It's not a standalone server, you include it in your project and create a webserver in you code. It support all HTTP verbs and got a small MVC framework which makes it easy to create REST services.

Take a look at manos. It's a standalone high performance web application framework which, I think, can be used as a REST based server.

You can use MonoRail or Mono WCF.

I asked a question about C# options similar to Ruby's Sinatra see Is there a .NET framework similar to Ruby's Sinatra?

Check out Nancy - it's a lightweight web framework for .net
http://nancyfx.org/

Related

What to use instead of WCF in .NET Core? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
Windows 10, .Net Core 3.1
How to do the processes communication on the same computer in .NET Core 3.1? I used WCF for these purposes when I used .NET Framwork earlier, but .NET Core hasn't WCF. I would not want to use the file system and FileSystemWatcher or write windows services for these purposes...
Currently gRPC is described as to be a way for wcf migration, you can communicate in half streaming, full streaming. But be careful that half streaming can interrupt to collect information but it will not interrupt all the process on the server side. From what i seen, on asp.net (there is a core version) the context. CancellationToken you will see on examples is called only when the client disconnect (closing by example), the most of time examples show how to interrupt reception from client, but if you launch an object by the grpc server with an infinite loop, it will continue to exist. It's important to make some tests before to really mastering this.
In the other case the double streaming is here to help you, with a simple word you can stop the duplex properly.
You must identify your needs.
What else... the service used on asp.net with grpc launch a new object to each request, you must keep it in memory.
For the while i don't know how to transmit an unknown object, but for known objects you will definite "class" used in the proto files, generate your project, and vs2019 create files for you. Currently to add this service to an existing project you must edit your project, or you will have some problems to add protobuf (*.proto) files "Sdk="Microsoft.NET.Sdk.Web" is required.
I hope it helped you.

Good 3270 Emulator (.NET) [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Can anyone indicate a good 3270 emulator (which can login, scrape screen, find text, send keys etc. in background) for .NET (win and web). Something very similar to http://www.zephyrcorp.com/legacy-integration/index.htm (apparently zephyr costs like $5k per year, which is quite a lot, for one PC).
I also tried http://open3270.codeplex.com/SourceControl/list/changesets but it's way old and buggy.
Attachmate Reflection is really good, it meets all the requirements you mentioned and it has a great .NET API you can use to easily automate it from your .NET code. They don't list prices on their website but I think it is under $300...
For Desktop: I liked the idea of using a stable and well known client and remote control this instance. Therefore I ended up using x3270 (http://x3270.bgp.nu/) as the full featured, mature client in combination with X3270.Rest (https://www.nuget.org/packages/X3270.Rest/) that let's you remote control it from within a .NET application via the exposed REST interface (http://x3270.bgp.nu/rest.html). Reimplementing a complete new .NET client was not really an option because of all the alternatives out there. All those pitfalls on the road that lead to an reinvented wheel... But with an appropriate interface like the one mentioned it was quite easy to automate tasks without using DDE/HLLAPI.
If running in the background means without visible window one could start the x3270 client from .NET via Process.Start with suitable arguments to avoid a window beeing created.

Is there a way to create a "Self-hosted" Web Site in .Net? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Similar to WCF Self Hosting.
Is there a way to create a website that is "self-hosted" within a console application or dll?
Probably the wrong way to ask this question, but what i'd like to do is use this website to split results as web pages without creating the website within IIS.
Thanks.
A very basic HTTP server is implemented by the HttpListener Class in the .NET Framework.
If you need something more powerful, 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.
If you have visual studio, here is an article I read a while back on how to basically snatch the VS built-in web server and use it for your own purposes:
http://www.codeproject.com/KB/aspnet/LightIIS.aspx
You can try Ultidev Cassini: http://ultidev.com/products/cassini/
Take a look at Open Web Interface for .NET (OWIN).

C# Networking API's [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 5 years ago.
Improve this question
Lately I've been looking for a good networking API i could possibly use and/or reference some of the code within, but i have mere luck searching for some on Google/Bing. Hopefully somebody here has seen and/or used a helpful networking API for C#.
Thanks in advance.
I highly suggest you look into the Windows Communication Foundation. It comes with any version of .NET 3.0 or greater, so if you're using VS 2008, you've got all you need.
It abstracts a heck of a lot of the details for networking, providing you with a very simple programming API. Even protocol details are abstracted away, and there are a ton of protocols to chose from already built in.
Hands down the best way to communicate across a network.
Check out the System.Net and System.Net.Sockets namespaces in the .NET framework libraries. Eat your heart out.
Though I may have misunderstood your meaning of 'networking API'.
Networking is a very, very, very broad term. You might have more luck if you put some limits in your query, such as "I am looking for sample code for socket programming under c#". Still broad, but much more answerable.
C# has a lot of networking functionality built into the .NET framework., mostly in the System.Net namespace. I have found very few things that require using an external library or the windows networking api. You might check out the System.Net namespace and see if it has what you needs, otherwise maybe clarify what you are looking for.
If you're looking for something outside of what's already built-in to the framework, I've heard good things about Lidgren.

How can I write a WebDAV server with Delphi? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 4 years ago.
Improve this question
There are some WebDAV clients available for Delphi (for example included in Indy 10). Is there also a simple WebDAV server solution written with Delphi?
If there is none yet, maybe you know an implementation in a different language (C#, Java) which you can recommend as a starting point for a WebDAV server implementation? (It does not have to be a full-featured solution, a rather simple skeleton could be even more helpful.)
Start your search on Google for Delphi WebDAV or Delphi WebDAV Component
That will give you some starting points: there indeed are components that can help you out.
--jeroen
As far as I know, WebDav extends HTTP functionality. You should try extending some HTTP server code. I believe synapse would be good point to start, as the code is very clear (also I personally don't like Indy ;) )
You might look at Jackrabbit, it has a WebDAV interface available (Java solution).
May be Go implementation can be taken as a start point.
Related links:
https://github.com/golang/net/tree/master/webdav
https://github.com/golang/go/issues?q=webdav
Webdav Server in Go

Categories