-1

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?

1
  • minght be possible if you switch to owin and dial back to mono compatible version of .net
    – Ewan
    CommentedJan 14, 2016 at 16:24

2 Answers 2

1

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

2
  • 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
    CommentedJan 13, 2016 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
    – user184861
    CommentedJan 14, 2016 at 9:24
1

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.

3
  • 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
    CommentedJan 13, 2016 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
    CommentedJan 13, 2016 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
    CommentedJan 13, 2016 at 14:22

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.