Forum

Mono + Hiawatha

DavidFox
8 November 2016, 16:07
I've posted this on stackoverflow (http://stackoverflow.com/questions/40488879/mono-error-404-but-file-exists) because I feel this is more an mono issue. But will post here just in case others know a workaround.

Current setup is using Hiawatha within a FreeBSD Jail. I've installd mono, confirmed that the mono jail flag is enabled and all is happy. I've configured the server's vhost.

fastcgi-mono-server4 -v /socket=tcp:9000 /address=10.0.0.2/applications=/:. /root=/srv/www/domainuser/domain.tld/www/project2 /logfile=/srv/www/domainuser/domain.tld/logs/mono-server4.log /loglevels=All /printlog=True


FastCGIserver {
FastCGIid = ASP
ConnectTo = 10.0.0.2:9000
Extension = aspx
SessionTimeout = 5
}

VirtualHost {
...
UseFastCGI = ASP
}


As everything goes, this works fine. if I kill mono - I get "Service unavaible" which is expected. However when I try to execute an .aspx file I keep encountering:

Runtime error
The resource cannot be found.

Description: HTTP 404.The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly.

Details: Requested URL: /rawr2/hello.aspx
Powered by Mono


Any one ever encountered this, could I also get clarifcation that the config file is correct?

DavidFox
8 November 2016, 19:33
Sorry for the spam ;p
Fixed. -- Was an issue with my command line. -- In case: I was pointing the webroot as "/www/project2/" so it was then expecting /www/project2/project2/hello.aspx

 fastcgi-mono-server4 /socket=tcp:9000 /address=10.0.0.2 /applications=/:. /root=/srv/www/x.user/y.tld/www/ /logfile=/srv/www/x.user/y.tld/logs/mono-server4.log /loglevels=All /printlog=True


So: FreeBSD + Jail - Hiawatha 10.3 running with Mono 4.2.2 using FastCGI works nicely.

Hugo Leisink
8 November 2016, 22:34
That's good to hear!
This topic has been closed.