我收到以下錯誤:「給定的關鍵是不存在的字典。」WCF錯誤:「給定的關鍵是不存在的字典。」在初始化客戶端代理
的代碼只是想創建一個代理客戶端連接:
FileService.FileServiceClient svc = new CCS.FileService.FileServiceClient();
堆棧跟蹤:
at System.ThrowHelper.ThrowKeyNotFoundException()
at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
at System.ServiceModel.Configuration.ServiceModelSectionGroup.get_Client()
at System.ServiceModel.Description.ConfigLoader.LookupChannel(String configurationName, String contractName, Boolean wildcard)
at System.ServiceModel.Description.ConfigLoader.LoadChannelBehaviors(ServiceEndpoint serviceEndpoint, String configurationName)
at System.ServiceModel.ChannelFactory.ApplyConfiguration(String configurationName)
at System.ServiceModel.ChannelFactory.InitializeEndpoint(String configurationName, EndpointAddress address)
at System.ServiceModel.ChannelFactory`1..ctor(String endpointConfigurationName, EndpointAddress remoteAddress)
at System.ServiceModel.ChannelFactory`1..ctor(String endpointConfigurationName)
at System.ServiceModel.EndpointTrait`1.CreateSimplexFactory()
at System.ServiceModel.EndpointTrait`1.CreateChannelFactory()
at System.ServiceModel.ClientBase`1.CreateChannelFactoryRef(EndpointTrait`1 endpointTrait)
at System.ServiceModel.ClientBase`1.InitializeChannelFactoryRef()
at System.ServiceModel.ClientBase`1..ctor()
at CCS.FileService.FileServiceClient..ctor()
at CCS.MainPage..ctor()
at CCS.App.Application_Startup(Object sender, StartupEventArgs e)
at System.Windows.CoreInvokeHandler.InvokeEventHandler(Int32 typeIndex, Delegate handlerDelegate, Object sender, Object args)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)
我有一個Silverlight 3應用程序,我在網站上添加一個WCF服務,以應用。任何人都知道解決這個問題的方法?它看起來很難嘗試獲取綁定信息。