2011-03-08 6 views
0

WCF를 사용하여 SQL 데이터베이스를 SQL 데이터베이스와 동기화하려고합니다. KnowledgeSyncProvider에서 상속 한 프록시가 있습니다. 내가 (다른 사람의 사이에서) 아래의 메소드를 오버라이드 (override)SyncKnowledge 개체가 WCF 서비스에 전달되지 않음

public override ChangeBatch GetChangeBatch(uint batchSize, SyncKnowledge destinationKnowledge, out object changeDataRetriever) 
{ 

GetChangesParameters changesWrapper = proxy.GetChanges(batchSize, destinationKnowledge); 

... 

} 

GetChangesParameters changesWrapper = proxy.GetChanges(batchSize, destinationKnowledge); 코드가 실행되면, 나는 다음과 같은 오류를

Retrieving the COM class factory for component with CLSID {EC413D66-6221-4EBB-AC55-4900FB321011} failed due to the following error: 80040154. 

스택 추적을 얻을 : 오류가이 같은

Server stack trace: 
    at System.ServiceModel.Channels.ServiceChannel.ThrowIfFaultUnderstood(Message reply, MessageFault fault, String action, MessageVersion version, FaultConverter faultConverter) 
    at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc) 
    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 WCF_Sync_Common.IRelationalSyncContract.GetChanges(UInt32 batchSize, SyncKnowledge destinationKnowledge) 
    at ConsoleApplication10.RelationalProviderProxy.GetChangeBatch(UInt32 batchSize, SyncKnowledge destinationKnowledge, Object& changeDataRetriever) in C:\Users\amitesh.AKL\Documents\Visual Studio 2010\Projects\ConsoleApplication10\RelationalProviderProxy.cs:line 81 
    at Microsoft.Synchronization.KnowledgeProviderProxy.GetChangeBatch(UInt32 dwBatchSize, ISyncKnowledge pSyncKnowledge, ISyncChangeBatch& ppChangeBatch, Object& ppUnkDataRetriever) 

보인다 와이어를 통해 전달할 때 SyncKnowledge 객체와 관련이 있습니다. SyncKnowledge 개체없이 프록시 메서드를 호출하려고 시도하고 메서드를 호출 할 수있었습니다. 그러나 객체를 포함 시키 자마자 위의 오류가 발생합니다. 아무도 내가 실종 된 것에 대해 올바른 방향으로 나를 가르키도록 설명 할 수 있습니까?

답변

0

WCF 서비스 응용 프로그램 프로젝트를 만들고 모든 WCF 코드를 해당 프로젝트로 옮겨서 문제를 해결할 수있었습니다. 초기 WCF 프로젝트는 일반적인 콘솔 응용 프로그램이었습니다.

관련 문제