Nginx bad gateway 502 with mono fastcgi

Hello, I am trying to run my site on mono (on the ubuntu server), and I followed these tutorials almost until the letter:

However, when my directory is not empty, fastcgi logs show this:

    Notice  Beginning to receive records on connection.
    Error   Failed to process connection. Reason: Exception has been thrown by the target of an invocation.

I'm not sure what this means, and depending on what I'm doing, I may get another error that tells me that the resource was not found:

Resource is not 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.

Requested URL: /Default.aspx/ Version Information: Mono Runtime Version: 2.10.8 (tarball Thu Aug 16 23:46:03 UTC 2012) ASP.NET Version: 4.0.30319.1

If I need to provide more information, please let me know.

Edit:

Now I get the nginx gateway error.

My nginx configuration file is as follows:

server {
    listen   2194;
    server_name localhost;
    access_log $HOME/WWW/nginx.log;

    location / {
      root $HOME/WWW/dev/;
      index index.html index.html default.aspx Default.aspx Index.cshtml;
      fastcgi_index Views/Home/; 
      fastcgi_pass 127.0.0.1:8000;
      include /etc/nginx/fastcgi_params;
    }
}

xsp4 , " ".

TargetInvocationException . IsTerminating True System.Reflection.TargetInvocationException: .

: System.Reflection.MonoCMethod.Invoke(System.Object obj, BindingFlags invokeAttr,
System.Reflection.Binder binder, System.Object [],
System.Globalization.CultureInfo) [0x00000] : 0 System.Reflection.MethodBase.Invoke(System.Object obj, System.Object []) [0x00000] : 0
System.Runtime.Serialization.ObjectRecord.LoadData( System.Runtime.Serialization.ObjectManager, ISurrogateSelector, StreamingContext) [0x00000] : 0 System.Runtime.Serialization.ObjectManager.DoFixups() [0x00000] : 0 System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadNextObject(System.IO.BinaryReader reader) [0x00000] : 0
System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadObjectGraph(BinaryElement elem, System.IO.BinaryReader reader, Boolean readHeaders, System.Object & , System.Runtime.Remoting.Messaging.Header [] & ) [0x00000] : 0 System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.NoCheckDeserialize(System.IO.Stream serializationStream, System.Runtime.Remoting.Messaging.HeaderHandler) [0x00000] : 0 System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(System.IO.Stream serializationStream) [0x00000] : 0 System.Runtime.Remoting.RemotingServices.DeserializeCallData( System.Byte []) [0x00000] in: 0 at ( xdomain-dispatch) System.AppDomain: DoCallBack (, [] &, byte [] &)

, [0]: --- > System.ArgumentException: "SetHostingEnvironment". System.Delegate.GetCandidateMethod( System.Type, System.Type target, System.String, BindingFlags bflags, Boolean ignoreCase, Boolean throwOnBindFailure) [0x00000] : 0 System.Delegate.CreateDelegate( System.Type, Target System.Type, System.String, Boolean ignoreCase, Boolean throwOnBindFailure) [0x00000] : 0 System.Delegate.CreateDelegate( System.Type, System.Type, System.String) [0x00000] : 0 System.DelegateSerializationHolder + DelegateEntry.DeserializeDelegate(System.Runtime.Serialization.SerializationInfo info) [0x00000] : 0 System.DelegateSerializationHolder..ctor(System.Runtime.Serialization.SerializationInfo info, StreamingContext ctx) [0x00000] : 0 at ( managed-to-native) System.Reflection.MonoCMethod: InternalInvoke (System.Reflection.MonoCMethod, object, object [], System.Exception &) System.Reflection.MonoCMethod.Invoke(System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object [] , System.Globalization.CultureInfo ) [0x00000] : 0 --- ---
at ( xdomain-invoke) System.AppDomain: DoCallBack (System.CrossAppDomainDelegate) ( remoting-invoke-with-check) System.AppDomain: DoCallBack (System.CrossAppDomainDelegate) System.Web.Hosting.ApplicationHost.CreateApplicationHost(System.Type hostType, System.String virtualDir, System.String physicalDir) [0x00000] : 0 Mono.WebServer.VPathToHost.CreateHost( Mono.WebServer.ApplicationServer, Mono.WebServer.WebSource webSource) [0x00000] : 0 Mono.WebServer.XSP.Server.RealMain(System.String [] args, Boolean root, IApplicationHost ext_apphost, Boolean quiet) [0x00000] : 0 Mono.WebServer.XSP.Server.Main(System.String [] args) [0x00000] : 0

+1
2

nginx

fastcgi_index   /;

:

fastcgi_index Default.aspx;

:

fastcgi_index Views/Home/;

, mono fastcgi . mvc3-land Default.aspx, . , :

index index.html index.html default.aspx Default.aspx Index.cshtml;

, , , 2. DLL, , .

, , nhibernate nuget 3.5.dlls. , , , . , csharp.

, , :

System.TypeLoadException: Could not load type
    at (wrapper managed-to-native) System.Type:type_is_assignable_from (System.Type,System.Type)
+3

URL- 404 - "/Default.aspx/"

/ , , , Default.aspx ?

nginx fastcgi?

UPDATE ( ):

http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#fastcgi_index fastcgi_index. , , , Views/Home/ $fastcgi_script_name .

, , fastcgi_index Default.aspx( directory/default.aspx, , , )

_filename, , -, , , ( php/ruby ​​fastcgi).

nginx , , - :

fastcgi_index Default.aspx;
fastcgi_param SCRIPT_FILENAME $HOME/WWW/dev/home/$fastcgi_script_name;
fastcgi_pass 127.0.0.1:8000;
include /etc/nginx/fastcgi_params;

(, SCRIPT_FILENAME $fastcgi_script_name, )

, , , , , .

0

All Articles