Does fastcgi-mono-serverX work with mono 3.0 and nginx 1.2.4

I have been trying for several days to get mono 3.0 and nginx 1.2.4 and fastcgi-mono-serverX in XSP 2.10 package running on Centos 6.3 ... the XSP4 server is working, but I cannot get the fastcgi method to work.

I built and tested mono 3.0 from the source, it works fine.

I completed the configuration http://www.mono-project.com/FastCGI_Nginx to no avail and many other settings from the nginx site.

... does the current XSP 2.10 module work with mono 3.0?
... Can I downgrade mono to 2.11.4 to work with XSP 2.10? ... eventually I would like to run ASP.Net 4.0 Web Forms

Update: here is the output from the mono-server.log file:

Server stack trace: at Mono.WebServer.FastCgi.ApplicationHost.ProcessRequest (Mono.WebServer.FastCgi.Responder responder) [0x00000] in <filename unknown>:0 at (wrapper remoting-invoke-with-check) Mono.WebServer.FastCgi.ApplicationHost:ProcessRequest (Mono.WebServer.FastCgi.Responder) at (wrapper xdomain-dispatch) Mono.WebServer.FastCgi.ApplicationHost:ProcessRequest (object,byte[]&,byte[]&) Exception rethrown at [0]: ---> System.InvalidCastException: Cannot cast from source type to destination type. at System.Configuration.ConfigurationManager.get_AppSettings () [0x00000] in <filename unknown>:0 at Mono.WebServer.FastCgi.WorkerRequest..cctor () [0x00000] in <filename unknown>:0 --- End of inner exception stack trace --- at (wrapper xdomain-invoke) Mono.WebServer.FastCgi.ApplicationHost:ProcessRequest (Mono.WebServer.FastCgi.Responder) at (wrapper remoting-invoke-with-check) Mono.WebServer.FastCgi.ApplicationHost:ProcessRequest (Mono.WebServer.FastCgi.Responder) at Mono.WebServer.FastCgi.Responder.Process () [0x00000] in <filename unknown>:0 [2012-11-05 12:35:14Z] Error Failed to process connection. Reason: The object was used after being disposed. 
+4
source share
2 answers

I was about to file a bug report using Xamarin ... then I met this submitted bug report from a year ago.

https://bugzilla.xamarin.com/show_bug.cgi?id=2876

TL; DR

You need to update the shell script (find with which mono-fastcgi-server4 ) and move mono-fastcgi-server4.exe from /usr/lib/mono/4.0 to /usr/lib/mono/4.5 .

Longer Explanation

As already mentioned, I use the mono-fastcgi-server4 directly from the main canonical source of Ubuntu , which lists these contents of the file

 /usr/bin/fastcgi-mono-server4 /usr/lib/mono/4.0/fastcgi-mono-server4.exe /usr/lib/mono/gac/fastcgi-mono-server4/2.10.0.0__0738eb9f132ed756/fastcgi-mono-server4.exe /usr/share/doc/mono-fastcgi-server4/AUTHORS /usr/share/doc/mono-fastcgi-server4/NEWS.gz /usr/share/doc/mono-fastcgi-server4/README /usr/share/doc/mono-fastcgi-server4/README.Debian /usr/share/doc/mono-fastcgi-server4/changelog.Debian.gz /usr/share/doc/mono-fastcgi-server4/copyright /usr/share/man/man1/fastcgi-mono-server4.1.gz 

Based on the solution of the error report, I was able to get this working. Essentially, you are editing the shell script used to run fastcgi-mono-server4.exe manually (which should be in /usr/bin ) and moving the .exe file manually ... or ... you can use this small piece of script, which I included in deploy:setup Capistrano script. It uses sed to update the script.

 fastcgi=$(which fastcgi-mono-server4) && sudo sed -i.bak -e 's/4\\.0/4.5/' $fastcgi && fastcgi_src='/usr/lib/mono/4.0/fastcgi-mono-server4.exe' && fastcgi_dest='/usr/lib/mono/4.5/fastcgi-mono-server4.exe' && if [ -f "$fastcgi_src" ]; then sudo mv $fastcgi_src $fastcgi_dest; fi; 

This report also seems related https://bugzilla.xamarin.com/show_bug.cgi?id=3582

+3
source

If you are using Mono 3.0, use the xsp tag, which is also 3.x. The end of the story.

In addition, to avoid errors such as 3582 , use Mono 3.0.3 or later.

+3
source

Source: https://habr.com/ru/post/1444191/


All Articles