2

I am trying to host an ASP.NET Web Forms application using Mono. I have installed Mono 3.0.7 and XSP 2.10.2 from source into the /usr/bin directory. I then started the mono server with the following command:

fastcgi-mono-server4 /applications=www.example.com:/:/var/www/example/ /socket=tcp:127.0.0.1:9000 /verbose=True /printlog=True

However, when I browse to http://www.example.com, I get a 502 Bad Gateway error. I see that the following error was logged:

[2014-11-10 15:30:01Z] Error   Failed to process connection. Reason: Could not load file or assembly 'fastcgi-mono-server4, Version=2.10.2.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756' or one of its dependencies. The system cannot find the file specified.

So why does it fail to find the file?

I tried adding /usr/bin to my MONO_PATH, but that did not help.

Here is my nginx configuration:

server {
    listen       80;
    server_name  www.example.com 172.245.43.220;
    access_log   /var/log/nginx/example.access.log  main;
    root         /var/www/example;
    index        Default.aspx;
    location / {
        try_files $uri $uri/ /Default.aspx;
        fastcgi_index Default.aspx;
        fastcgi_pass 127.0.0.1:9000;
        include /etc/nginx/fastcgi_params;
        fastcgi_param PATH_INFO "";
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    }
}
2
  • Any reason for the downvote? If there's something wrong with my question, I would like to know so I can fix it. Nov 11, 2014 at 4:15
  • I think this is a fine question... Nov 18, 2014 at 9:08

1 Answer 1

2

My solution in the end was to scrap CentOS and install Ubuntu 14.04 instead, then install mono-complete and mono-fastcgi-server4 using apt-get. Not ideal, but it's the only thing that worked for me.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .