Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been developing and deploying many ASP.Net MVC web applications under Windows Server 2008 R2 & Windows Server 2012 R2, and I used IIS 7 & IIS 8. At the same time I know that I can deploy my ASP.Net MVC under Linux and Unix, without the need to change my code.

Today I created a console application which is being called from my ASP.Net MVC web application. This console application represents a long running process which calls 3rd party systems and generate a report. It can be started from my ASP.Net MVC web application and it runs on timely basis as a task inside Windows tasks scheduler.

Does that mean that my web application can not run on any operating system other than Windows?

share|improve this question
    
minght be possible if you switch to owin and dial back to mono compatible version of .net – Ewan Jan 14 at 16:24

As far as I know, ASP.NET MVC applications can run only on IIS, which is only available on Windows. This will change with the latest ASP.NET 5, which will run in the DNX (.NET Execution Environment). DNX supports running cross-platform console applications, so consider looking here:

http://docs.asp.net/en/latest/dnx/console.html

share|improve this answer
    
thanks for your reply. now I am using asp.net mvc-5 with .net version 4.5 so seems even my asp.net mvc application can only run under windows OS ,, is this correct ? second question I did not work on .net version 5 , so do u suggest using it inside my asp.net mvc-5 ? – John John Jan 13 at 13:36
    
porting your asp.net mvc 5 apps might be a lot of work, but as far as the console application, you could check the link I gave you and give it a try – Mateo Velenik Jan 14 at 9:24

You're right, if you've written a Windows-only console you need to port the code in it to Linux or Mac. How hard that is depends a lot on what you wrote it in, and how you wrote it. Note that it is possible to run the console on Windows and connect to it via a network connection (if you wrote it to have this capability).

As for ASP.NET, this is a Microsoft-only technology that cannot run (at the moment at least) on non-Windows platforms. You can write your web site using different frameworks (eg PHP and Laravel, or Python and Django, etc) to get the same functionality that is cross-platform and will work on all 3 OSes you want.

share|improve this answer
    
ok thanks for your reply. now i am using asp.net mvc-5 with .net version 4.5.. so is it a common practice to have different versions of console applications ,, I mean one version that run under windows OS while the other runs under unix OS ? or who this can be managed ? – John John Jan 13 at 13:34
1  
I think you're going to have to do some research on cross platform web sites, people tend to write for a single OS, or they use a cross-platform language such as PHP. – gbjbaanb Jan 13 at 13:54
    
ok thanks for your reply... but seems if I go with asp.net mvc-6 & .net version 5 then seems I can make my web application cross-platform using DNX is this correct ? – John John Jan 13 at 14:22

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.