Reputation: 1739
I know nothing about linux or mono. I have web app that I am building in WebMatrix. I've set up simple service with ServiceStack and a cshtml test page. All runs fine on Windows but when I move the files to linux box my pages work but the RESTful calls to ServiceStack service bringing back 404 no found. Is there something I'm missing here? Does mono on linux read the web.config and global.asax the same?
Thanks
Upvotes: 3
Views: 338
Reputation: 5091
It sounds like casing - you should fix that for performance reasons, but in the meantime you can get Mono to ignore-case by setting the MONO_IOMAP environment variable as follows before starting your mono process e.g. I use the following in my service script:
export MONO_IOMAP=all
${MONOSERVER} /applications=${WEBAPPS} /socket=tcp:127.0.0.1:9000 &
It's documented here:
http://www.mono-project.com/IOMap
Upvotes: 1
Reputation: 82336
Yes, it reads them the same.
But...
Linux uses case-sensitive file-systems.
So if you type:
http://localhost.com/whatever.aspx
and your site is actually called whatever.aspx, then it will work.
However, if you type Whatever.aspx, that will get you a 404.
Also, if your site's codebehind is called Master.cs (with class Master
), and you reference it on a aspx file with master.cs (such as the default visual Studio web application template), you will get a "not found" error.
Additionally, if you run mono on mod-mono with Apache, i think it runs on port 8080 or 8082 by Default, so you have to type http://localhost.com:8080/whatever.aspx.
A better idea might be to run servicestack on nginx via fastcgi-mono-server4.
Upvotes: 1