ASP.NET CORE cross-platform adventures

After I’ve finished developing a pet project with ASP.NET CORE and test it successfully on Windows, I’ve decided to host it on a Raspberry PI with Linux on it.

Having an ARM processor I was forced to use Mono, that means some extra installations, but in the end I’ve managed to install all prerequisites. After all configurations have been finished, with much hope and optimism I’ve tried to access my Linux hosted web site … and of course the result was a Mono exception regarding some cast errors in my database entities. After some digging, I found that the problem is caused by datetime2 type of a table column from my database, apparently Mono can’t handle this type, so I changed column type to datetime and everything went smoothly, at least on server side.

I’m hitting refresh button and see how my main web page is loading, but fate decided it was too easy so, a lot of JavaScript errors popped out because the content of one JavaScript file could not be loaded, strange thing was that exactly the same thing was working perfectly on Windows. Basically the request for loading js file …/product.js on Linux wasn’t working and on Windows was. When trying to figure out what the problem was, I saw that corresponding file for product.js was Product.js (with capital P), but being used with Windows which is a case insensitive OS it didn’t ring a bell right away.

After an hour of investigation, I learned the hard way that Linux is case sensitive OS and Product.js != product.js != product.JS etc. After renaming the file to product.js, at last I had my first .net web site running on Linux.

asp.net core Linux cross-platform
Posted by: Ion Sapoval
Last revised: 02 Mar, 2016 08:35 PM

Comments

Jhon
Jhon
19 Apr, 2016 06:27 AM

Nice post Google it.

Rudenco Victor
Rudenco Victor
17 Mar, 2016 05:20 AM

Congratulations. Really an useful post Mr Sapoval.

Rush
Rush
17 Aug, 2016 06:07 AM

It sounded so complicated. Still it is good to hear that you were able to find what the mistake is, and correct it properly to get the project and host it on a Raspberry PI. Your medical billing consultants experience is really helpful for us to develop the asp.net projects with Raspberry PI.

David
David
23 May, 2017 01:13 PM

ASP.NET CORE is just awesome. I wish it could also work with Linux because Linux is a very complex OS if you need some help you can check this out http://essaywritinglab.co.uk

Your Comments

Used for your gravatar. Not required. Will not be public.
Posting code? Indent it by four spaces to make it look nice. Learn more about Markdown.

Preview