2011-12-05 12 views
1

同じソリューションで以下の設定を行っています。 1つのメインサービスとA WCFサービスライブラリをホストしているDB WCFサービスライブラリの接続ASP.NET WebアプリケーションでのDALへの問題

  • アンASP.NET Webサイトからサッカーの試合についての私の情報を取得し、私のクラスのためのEntityDataModelとA DAL
  • MatchService.cs
  • 呼ば

    • WCFサービスライブラリマッチサービス(上記のWCFサービスのlibracyから)

    私の問題は、この細かい部分はローカルでは実行されますが、運用サーバー上では実行されないということです。ローカルでWCFプロジェクトにはapp.configがあり、そこからDB DALの接続情報を取得しますが、WCF Servicesプロジェクトのコンパイル済み.dllに入れないと思っています。

    "通信オブジェクトSystem.ServiceModel.Channels.ServiceChannelは、フォールト状態にあるため通信に使用できません。"

    だから私は、web.configからDBの詳細を取得しようとしていると思っていましたが、これはどちらの場合もそうではありません。

    誰でも私が間違っていることを教えてもらえますか?

    編集:私は今、サービスがホスト環境にある場合、WCFテストクライアントを介してサービスにアクセスすることはできませんDAL、まだイムにアクセスするすべての試みを削除した

    。 WCFテストクライアントがローカルマシンにあります。私はそれらのいずれかを起動しようとすると、しかし、私は次のエラーを取得する方法は、WCFテストクライアントで表示されるように取得することができます:それはあなたの問題のように見える

    The caller was not authenticated by the service. 
    
    Server stack trace: 
        at System.ServiceModel.Security.IssuanceTokenProviderBase`1.DoNegotiation(TimeSpan timeout) 
        at System.ServiceModel.Security.SspiNegotiationTokenProvider.OnOpen(TimeSpan timeout) 
        at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout) 
        at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) 
        at System.ServiceModel.Security.CommunicationObjectSecurityTokenProvider.Open(TimeSpan timeout) 
        at System.ServiceModel.Security.SymmetricSecurityProtocol.OnOpen(TimeSpan timeout) 
        at System.ServiceModel.Security.WrapperSecurityCommunicationObject.OnOpen(TimeSpan timeout) 
        at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) 
        at System.ServiceModel.Channels.SecurityChannelFactory`1.ClientSecurityChannel`1.OnOpen(TimeSpan timeout) 
        at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) 
        at System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.DoOperation(SecuritySessionOperation operation, EndpointAddress target, Uri via, SecurityToken currentToken, TimeSpan timeout) 
        at System.ServiceModel.Security.SecuritySessionSecurityTokenProvider.GetTokenCore(TimeSpan timeout) 
        at System.IdentityModel.Selectors.SecurityTokenProvider.GetToken(TimeSpan timeout) 
        at System.ServiceModel.Security.SecuritySessionClientSettings`1.ClientSecuritySessionChannel.OnOpen(TimeSpan timeout) 
        at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) 
        at System.ServiceModel.Channels.ServiceChannel.OnOpen(TimeSpan timeout) 
        at System.ServiceModel.Channels.CommunicationObject.Open(TimeSpan timeout) 
        at System.ServiceModel.Channels.ServiceChannel.CallOpenOnce.System.ServiceModel.Channels.ServiceChannel.ICallOnce.Call(ServiceChannel channel, TimeSpan timeout) 
        at System.ServiceModel.Channels.ServiceChannel.CallOnceManager.CallOnce(TimeSpan timeout, CallOnceManager cascade) 
        at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) 
        at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) 
        at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) 
    
    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 IMatchService.GetMatches() 
        at MatchServiceClient.GetMatches() 
    
    Inner Exception: 
    The request for security token could not be satisfied because authentication failed. 
        at System.ServiceModel.Security.SecurityUtils.ThrowIfNegotiationFault(Message message, EndpointAddress target) 
        at System.ServiceModel.Security.SspiNegotiationTokenProvider.GetNextOutgoingMessageBody(Message incomingMessage, SspiNegotiationTokenProviderState sspiState) 
    
    +0

    ブラウザ経由でWCFサービスに移動できますか?エンドポイントアドレスを取得し、ブラウザに表示されるかどうかを確認します。 –

    +0

    はいブラウザでサービスに移動できますが、ブラウザのメソッドにアクセスできません。私はここにアドレスを置くことはできませんが、私は必要な情報を中継することができます。 – Kevin

    +0

    servicemodelの設定ビットは、ホスティングプロジェクトのweb.configにある必要があります。彼らは? –

    答えて

    -1

    チェックthisを、。

    +0

    これはありがたいですが、私は既に使用している文をすべて削除してしまいました。 – Kevin

    +0

    これは理論的に質問に答えるかもしれませんが、答えにリンクされた記事の重要な部分を含めることが望ましいです(http://meta.stackexchange.com/q/8259)。参照。そうしないと、リンク腐敗の危険があります。 –

    関連する問題