Если в .ClientConfig-файле нет необходимых данных, то попытка обратиться к wcf-сервису из Silverlight 2.0 приводит к ошибке: System.Collections.Generic.KeyNotFoundException was unhandled by user code, Message="The given key was not present in the dictionary."
Пример правильного конфигурационного файла.
[ServiceReferences.ClientConfig]
<configuration> <system.serviceModel> <bindings> <basicHttpBinding> <binding <security </binding> </basicHttpBinding> </bindings> <client> <endpoint bindingConfiguration="WSHttpBinding_IService1" name="WSHttpBinding_IService1" /> </client> </system.serviceModel> </configuration> |