首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >使用ASP.Net + FastCGI-Mono-Server4从Nginx 3.5迁移到4.0后出现错误

使用ASP.Net + FastCGI-Mono-Server4从Nginx 3.5迁移到4.0后出现错误
EN

Stack Overflow用户
提问于 2012-05-16 08:01:12
回答 1查看 571关注 0票数 1

我正在使用Nginx + FastCGI-Mono-Server来托管一个小型的asp.net web服务。它在使用FastCGI-Mono-Server2 ( .Net 2.0版本)时运行得很好。我现在需要将asp.net应用程序升级到.net 4.0。这意味着我需要升级到FastCGI-Mono-Server4。我把所有正确的文件都放好了。它起作用了!然而,它总是因为一个神秘的错误而崩溃。

下面是错误:

例外: System.Runtime.FatalException

消息:对象引用未设置为对象的实例。

在System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc&远程过程调用)在System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc&远程过程调用)在System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage3(MessageRpc&远程过程调用)在System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage2(MessageRpc&远程过程调用)在System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage11(MessageRpc&远程过程调用)在System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage1(MessageRpc&远程过程调用)在System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean StackTrace)在System.ServiceModel.Dispatcher.ChannelHandler.DispatchAndReleasePump(RequestContext请求中,Boolean cleanThread,OperationContext currentOperationContext)在System.ServiceModel.Dispatcher.ChannelHandler.HandleRequest(RequestContext请求时,在System.ServiceModel.Dispatcher.ChannelHandler.AsyncMessagePump(IAsyncResult result)在System.ServiceModel.Dispatcher.ChannelHandler.OnAsyncReceiveComplete(IAsyncResult result)在System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)在System.ServiceModel.Channels.FramingDuplexSessionChannel.TryReceiveAsyncResult.OnReceive(IAsyncResult result)在System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)在System.Runtime.AsyncResult.Complete( OperationContext completedSynchronously)在System.ServiceModel)在Boolean result)在System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)在Boolean result)在System.Runtime.Fx.AsyncThunk.UnhandledExceptionFrame(IAsyncResult result)在Boolean result)在System.ServiceModel)在Boolean result)在System.ServiceModel)在Boolean completedSynchronously)在System.ServiceModel。Channels.SynchronizedMessageSource.ReceiveAsyncResult.OnReceiveComplete(Object状态)在System.ServiceModel.Channels.SessionConnectionReader.OnAsyncReadComplete(Object状态)在System.ServiceModel.Channels.SocketConnection.AsyncReadCallback(Boolean haveResult的System.ServiceModel.Channels.SocketConnection.FinishRead(),System.ServiceModel.Channels.OverlappedContext.CompleteCallback(UInt32 error,Int32 bytesRead) at System.ServiceModel.Channels.OverlappedContext.CompleteCallback(UInt32 error,bytesRead numBytes,NativeOverlapped* nativeOverlapped) at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 error,UInt32 bytesRead,NativeOverlapped* nativeOverlapped) at System.Threading._IOCompletionCallback.PerformIOCompletionCallback(UInt32 errorCode,UInt32 numBytes,NativeOverlapped* pOVERLAP)

InnerException: System.NullReferenceException

消息:对象引用未设置为对象的实例。

状态:在System.Web.HttpApplication.ThreadContext.Enter(Boolean回调)在System.Web.HttpApplication.OnThreadEnterPrivate(Boolean状态)在System.Web.AspNetSynchronizationContext.CallCallbackPossiblyUnderLock(SendOrPostCallback回调,对象状态)在System.Web.AspNetSynchronizationContext.CallCallback(SendOrPostCallback回调,对象状态)在System.Web.AspNetSynchronizationContext.Post(SendOrPostCallback回调,对象状态)在System.ServiceModel.Dispatcher.ThreadBehavior.BindCore(MessageRpc& rpc,Boolean startOperation)在System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage4(MessageRpc& rpc)

我在这个项目中确实有一个IHttpAsyncHandler。我想知道这是否与此有关。当我搜索我的错误时,我发现有人(像这样:wcf callback exception after updating to .net 4.0)推荐这个属性:

CallbackBehavior(UseSynchronizationContext=false)

据我所知,这是一个WCF的事情,与我的asp.net网络服务器无关。任何想法都将不胜感激!

EV

EN

回答 1

Stack Overflow用户

发布于 2013-12-11 16:37:14

代码语言:javascript
运行
复制
ln -s /opt/mono-3.2/lib/mono/4.0/fastcgi-mono-server4.exe /opt/mono-3.2/lib/mono/4.5/fastcgi-mono-server4.exe

使用4.5目录中的fastcgi服务器

代码语言:javascript
运行
复制
/opt/mono-3.2/lib/mono/4.5/fastcgi-mono-server4.exe

如果单声道安装在其他地方,请用您的单声道前缀替换/opt/mono-3.2

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/10610423

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档