Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Microsoft technology similar to Java EE servlets?

Tags:

.net

servlets

I have a java application which runs under Tomcat. Fairly simple architecture - users invoke a servlet through HTTP which then puts a request onto an in memory queue. A consumer thread which was started as a ServletListener and is running continuously polls the queue and processes the requests which includes calling some stored procs and sending some data over socket connections to backend systems.

I may need to port the code over to C#. What I am trying to figure out is what is the equivalent technology in Microsoft land which will allow me to architect the same system. The porting of the code from Java to C# will be trivial, but what I can't seem to find is an application server technology from MS which will allow me to drop in my code and then declaratively specify that I want a new "servlet" for each HTTP call, and that I need to run a "daemon" thread in the same process, etc...

Any advice? I am not very familiar with the MS landscape...

like image 257
Andy Faibishenko Avatar asked Oct 15 '22 13:10

Andy Faibishenko


2 Answers

See what-are-the-correspondent-of-servlet-and-applet-in-net. The accepted answer says:

In .Net, HTTP handlers (.ashx) are probably the closest thing to a servlet.

like image 180
gimel Avatar answered Oct 21 '22 09:10

gimel


I'm betting it's System.Net.HttpListener:

http://msdn.microsoft.com/en-us/library/system.net.httplistener.aspx

But I'm not a .NET guy yet, either.

like image 25
duffymo Avatar answered Oct 21 '22 08:10

duffymo