【发布时间】:2012-08-15 00:59:27
【问题描述】:
您好,所以我一直在尝试让我的网站在单声道(在 ubuntu 服务器上)上运行,并且我几乎一直关注 these tutorials:
但是,当我的目录不是空白时,fastcgi 日志会显示:
Notice Beginning to receive records on connection.
Error Failed to process connection. Reason: Exception has been thrown by the target of an invocation.
我不太确定这意味着什么,根据我的操作,我可能会遇到另一个错误,告诉我找不到资源:
找不到资源。
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.
请求的 URL:/Default.aspx/ 版本信息:Mono 运行时版本:2.10.8(tarball Thu Aug 16 23:46:03 UTC 2012)ASP.NET 版本:4.0.30319.1
如果我应该提供更多信息,请告诉我。
编辑:
我现在收到一个 nginx 网关错误。
我的 nginx 配置文件是这样的:
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 绑定器,System.Object[] 参数,
System.Globalization.CultureInfo 文化)[0x00000] in :0 在 System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] 参数) [0x00000] in :0
在 System.Runtime.Serialization.ObjectRecord.LoadData (System.Runtime.Serialization.ObjectManager 管理器, ISurrogateSelector 选择器,StreamingContext 上下文)[0x00000] in :0 在 System.Runtime.Serialization.ObjectManager.DoFixups () [0x00000] 在 :0 在 System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadNextObject (System.IO.BinaryReader 阅读器) [0x00000] in :0
在 System.Runtime.Serialization.Formatters.Binary.ObjectReader.ReadObjectGraph (BinaryElement elem, System.IO.BinaryReader reader, Boolean 读取标头,System.Object& 结果, System.Runtime.Remoting.Messaging.Header[]& 标头)[0x00000] 在 :0 在 System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.NoCheckDeserialize (System.IO.Stream 序列化流, System.Runtime.Remoting.Messaging.HeaderHandler 处理程序)[0x00000] 在 :0 在 System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize (System.IO.Stream serializationStream) [0x00000] in :0 at System.Runtime.Remoting.RemotingServices.DeserializeCallData (System.Byte[] 数组) [0x00000] in :0 at (wrapper xdomain-dispatch) System.AppDomain:DoCallBack (object,byte[]&,byte[]&)在 [0] 处重新抛出异常:---> System.ArgumentException:无法 绑定到方法“SetHostingEnvironment”。在 System.Delegate.GetCandidateMethod(System.Type 类型,System.Type 目标,System.String 方法,BindingFlags bflags,布尔忽略大小写, Boolean throwOnBindFailure) [0x00000] in :0 at System.Delegate.CreateDelegate(System.Type 类型,System.Type 目标, System.String 方法,布尔型 ignoreCase,布尔型 throwOnBindFailure) [0x00000] in :0 在 System.Delegate.CreateDelegate (System.Type 类型,System.Type 目标,System.String 方法)[0x00000] 在 :0 在 System.DelegateSerializationHolder+DelegateEntry.DeserializeDelegate (System.Runtime.Serialization.SerializationInfo 信息)[0x00000] 在 :0 在 System.DelegateSerializationHolder..ctor (System.Runtime.Serialization.SerializationInfo 信息,StreamingContext ctx) [0x00000] in :0 at (wrapper 托管到本机) System.Reflection.MonoCMethod:InternalInvoke (System.Reflection.MonoCMethod,object,object[],System.Exception&) 在 System.Reflection.MonoCMethod.Invoke (System.Object obj, BindingFlags invokeAttr,System.Reflection.Binder 绑定器,System.Object[] 参数,System.Globalization.CultureInfo 文化)[0x00000] 在 :0 --- 内部异常堆栈跟踪结束 ---
在(包装器 xdomain-invoke)System.AppDomain:DoCallBack (System.CrossAppDomainDelegate) 在 (wrapper) 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] in :0 at Mono.WebServer.XSP.Server.RealMain (System.String[] args, Boolean root, IApplicationHost ext_apphost, Boolean quiet) [0x00000] in :0 在 Mono.WebServer.XSP.Server.Main (System.String[] args) [0x00000] in :0
【问题讨论】:
标签: asp.net razor mono nginx fastcgi