2017-07-21 23 views
1

私は、2つのサーバを除く他のすべての場所で動作するアプリケーションを持っています。 WebとApp。 WebはApp RemotingをAppサーバーに使用します。はこのセキュリティレベルで逆シリアル化することはできません

TypeFilterLevel = Fullであり、リモート処理はGlobal.asaxでは動作しますが、.aspxページでは動作しません。

以下はエラーです。

Raw url: /welcome.aspx 
System.Security.SecurityException: Type System.Runtime.Remoting.ObjRef and the types derived from it (such as System.Runtime.Remoting.ObjRef) are not permitted to be deserialized at this security level. 

Server stack trace: 
    at System.Runtime.Serialization.FormatterServices.CheckTypeSecurity(Type t, TypeFilterLevel securityLevel) 
    at System.Runtime.Serialization.Formatters.Binary.ObjectReader.CheckSecurity(ParseRecord pr) 
    at System.Runtime.Serialization.Formatters.Binary.ObjectReader.ParseObject(ParseRecord pr) 
    at System.Runtime.Serialization.Formatters.Binary.__BinaryParser.Run() 
    at System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) 
    at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage) 
    at System.Runtime.Remoting.Channels.CoreChannel.DeserializeBinaryRequestMessage(String objectUri, Stream inputStream, Boolean bStrictBinding, TypeFilterLevel securityLevel) 
    at System.Runtime.Remoting.Channels.BinaryServerFormatterSink.ProcessMessage(IServerChannelSinkStack sinkStack, IMessage requestMsg, ITransportHeaders requestHeaders, Stream requestStream, IMessage& responseMsg, ITransportHeaders& responseHeaders, Stream& responseStream) 

Exception rethrown at [0]: 
    at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) 
    at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) 
    at System.Runtime.Remoting.Activation.IActivator.Activate(IConstructionCallMessage msg) 
    at System.Runtime.Remoting.Messaging.ClientContextTerminatorSink.SyncProcessMessage(IMessage reqMsg) 
    at System.Runtime.Remoting.Activation.ActivationServices.Activate(RemotingProxy remProxy, IConstructionCallMessage ctorMsg) 
    at System.Runtime.Remoting.Proxies.RemotingProxy.InternalActivate(IConstructionCallMessage ctorMsg) 
    at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) 
    at OnSIS.Common.Utilities..ctor() 
    at OnSIS.Web.Welcome..ctor() 
    at ASP.welcome_aspx..ctor() 
    at __ASP.FastObjectFactory_app_web_welcome_aspx_cdcab7d2_gkkoykn5.Create_ASP_welcome_aspx() 
    at System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) 
    at System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) 
    at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) 
    at System.Web.HttpApplication.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() 
    at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) 
The Zone of the assembly that failed was: 
MyComputer 2017/07/17 09:43:25 

これも、本番サーバーと12台のテストサーバーで完全に正確に同じコードが動作します。しかし、私たちのプロダクションサポートサーバーは、もうこれ以上働きたくないと判断しました。私は上記のエラーの原因となるWebサーバーまたはアプリケーションサーバーのいずれかで間違っていた可能性があることを確認するために何を探しています。

REMOTECONFIG(Webサーバー)

<?xml version="1.0" encoding="utf-8"?> 
<configuration> 
    <system.runtime.remoting> 
    <application> 
     <channels> 
     <channel ref="http" useDefaultCredentials="true" port="0"> 
      <clientProviders> 
      <formatter ref="binary" typeFilterLevel="Full" /> 
      </clientProviders> 
     </channel> 
     </channels> 
     <client url="http://10.10.10.10/AppServer"> 
     <activated type="MyApp.Common.Utilities,MyApp.Common" /> 
     </client> 
    </application> 
    </system.runtime.remoting> 
</configuration> 

のWebConfig(アプリケーションサーバー)

<?xml version="1.0"?> 
<configuration> 
<system.runtime.remoting> 
    <application> 
     <service> 
     <activated type="MyApp.Common.Utilities,MyApp.Common"/>  
     </service> 
     <channels> 
     <channel ref="http"/> 
     <serverProviders> 
      <formatter ref="binary" typeFilterLevel="Full" /> 
     </serverProviders> 
     </channels> 
    </application> 
</system.runtime.remoting> 
</configuration> 
+0

リモーティングのようですが、エラーの原因となっているセッションがありますか? – EJD

答えて

1

この問題は、New Relic監視エージェントのv6によって発生します。具体的には、非同期コードのトレースをサポートする新しいDLL(以前はNew Relicのエージェントによってサポートされていなかったもの)。

エージェントをアンインストールしたり、以前のバージョンに戻すことができない場合は、非同期ラッパーを削除できます(C:¥Program Files¥New Relic.NET Agent¥Extensions¥NewRelic.Providers.CallStack.AsyncLocal.dll) 。これにより、.NET Remoting機能が復元されますが、New Relicはコード内に非同期メソッドを実装することができません。

1

我々は最終的に問題が何であったかが分かった検索の2週間後。私たちのオペレーションチームは、私がNew Relicと思ったいくつかの監視ソフトウェアをインストールしました。彼らは誰にも知らなかったし、彼らが何をしているのかを追跡したり誰にも伝えなかった。ソフトウェアをアンインストールして、環境が復旧しています。これは、環境を一度にいくつか変更すると起こります。あなたは何をしたのか、何が環境を落とす原因になったのかを見失います。

関連する問題