私は WCF サービスに取り組んでおり、Cassini でテストしています。コンソール アプリもあり、Web 参照もあります。cassini でホストされている svc に。これは正常に機能し、サービス メソッドを呼び出すことができます。しかし、svc を IIS にデプロイし、コンソール アプリを実行しようとすると、このエラーが発生します。
System.ServiceModel.FaultException`1 は処理
されませんでした Message=メッセージ NotifRQRequest のヘッダーの 1 つをデシリアライズ中にエラーが発生しました。詳細については、InnerException を参照してください。
ソース= mscorlibサーバー スタック トレース:
System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood (メッセージ応答、MessageFault フォールト、文字列アクション、MessageVersion バージョン、FaultConverter faultConverter)
で System.ServiceModel.Channels.ServiceChannel.HandleReply (ProxyOperationRuntime 操作、ProxyRpc& rpc)
で System.
System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage メソッド呼び出し、ProxyOperationRuntime 操作) で System.ServiceModel.Channels.ServiceChannel.Call (文字列アクション、ブール一方向、ProxyOperationRuntime 操作、Object[] ins、Object[] outs、TimeSpan タイムアウト)
。 ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage メッセージ)
[0] で例外が再スローされました:
System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg、IMessage retMsg)
で System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData、Int32 タイプ)
で TestConsole.ServiceReference1.IPush.RQ(NotifRQRequest リクエスト)
TestConsole.ServiceReference1.PushClient.TestConsole.ServiceReference1.IPush.NotifRQ (NotifRQRequest 要求) で ServiceReference1\Reference.cs: 37165 行 TestConsole.ServiceReference1.Client.RQ
で (セキュリティ セキュリティ、アクション アクション、MessageID MessageID、ReplyTo ReplyTo、To To 、NotifRQ notifRQ1) ServiceReference1\Reference.cs: System.AppDomain._nExecuteAssembly(RuntimeAssembly アセンブリ、String[] args)
で TestConsole.Program.Main(String[] args)の行 37176
System.AppDomain.ExecuteAssembly (String assemblyFile, Evidence assemblySecurity, String[] args)
で Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
で System.Threading.ThreadHelper.ThreadStart_Context(オブジェクト状態)
で System.Threading.ExecutionContext.Run で(ExecutionContext executionContext、ContextCallback コールバック、オブジェクト状態、ブール値の ignoreSyncCtx)
System.Threading.ExecutionContext.Run (ExecutionContext executionContext、ContextCallback コールバック、オブジェクト状態)
で System.Threading.ThreadHelper.ThreadStart()
InnerException:
x64 環境を実行しています。さらに、別のアプリ プールに変更しようとしました。
どんな提案やヒンズーも大歓迎です。
ありがとう、
編集 1: 1 つのことに気付きました。サービスは、wsdl にリストされている約 5 つの xml 名前空間を使用します。cassini では、ブラウズできます。つまり、localhost/Notification/NotificationService.svc?xsd=xsd0 にアクセスできますが、IIS では同じことができません!!!
<xsd:schema targetNamespace="http://www.opentravel.org/OTA/2003/05/Imports">
<xsd:import schemaLocation="http://localhost/Notification/NotificationService.svc?xsd=xsd0" namespace="http://www.opentravel.org/OTA/2003/05"/>
<xsd:import schemaLocation="http://localhost/Notification/NotificationService.svc?xsd=xsd1" namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"/>
<xsd:import schemaLocation="http://localhost/Notification/NotificationService.svc?xsd=xsd3" namespace="http://schemas.xmlsoap.org/ws/2004/03/addressing"/>
<xsd:import schemaLocation="http://localhost/Notification/NotificationService.svc?xsd=xsd2" namespace="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"/>
<xsd:import schemaLocation="http://p/Notification/NotificationService.svc?xsd=xsd4" namespace="http://htng.org/2011A"/>
</xsd:schema>
編集 2: これは 64 ビット マシンでのみ発生しているようで、32 ビットでは正常に動作するようです。