Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Interview : Is it possible to host ASP.NET Web Service in Tomcat?

Tags:

asp.net

tomcat

Interviewer asked to me, whether we use Tomcat for ASP.NET or not?? Since, I never tried or I would say, I never think about it. So, anyone please tell me, whether it is possible ?? If yes, then how??

like image 587
Ravi Avatar asked Nov 11 '12 17:11

Ravi


2 Answers

You can't really host ASP.NET files in Tomcat. Well... you could probably theoretically write tons of plugins, but I doubt anyone ever explored that beyond theoretical exercises.

What you can do is forward the requests for ASPX files from Tomcat to IIS. So if the browser requests index.jsp, that request is handled by Tomcat. And if a browser requests default.aspx that if forwarded by Tomat to IIS and server by an ASP.NET web site there. This is typically known as hosting an ASP.NET web site behind Tomcat.

But the inverse (hosting a JSP web site behind IIS) is a lot more common, since that way you can let IIS handle the authentication parts - which it is quite good at. The official page for that connection is here, but there are many other sites dedicated to the topic.

like image 126
Frank van Puffelen Avatar answered Oct 01 '22 21:10

Frank van Puffelen


Well, never say never :) There is an open source effort "Mono" that aims to provide support for running .NET apps on machines that don't have IIS capabilities on them. Please refer this article for more details http://www.mono-project.com/Main_Page

like image 39
Gorodeckij Dimitrij Avatar answered Oct 01 '22 19:10

Gorodeckij Dimitrij