简体   繁体   English

Silverlight应用程序。 尝试使用Web服务时显示“ ConfigFileMissing”消息

[英]Silverlight app. displays “ConfigFileMissing” message when trying to use a web service

The silverlight class library throws System.InvalidOperationException exception with "ConfigFileMissing" message when trying to access a very simple SOAP web service. 当尝试访问非常简单的SOAP Web服务时,silverlight类库将引发System.InvalidOperationException异常,并带有“ ConfigFileMissing”消息。

As you can see there's only one line of code that initializes the client. 如您所见,只有一行代码可以初始化客户端。 This is the line where exception happens. 这是发生异常的行。

public void GetDataFromWebService()
{
   ServiceReference.WebServiceSoapClient client = new ServiceReference.WebServiceSoapClient();
}

Any idea? 任何想法?

检查并确保您在silverlight项目的根目录中有ServiceReferences.ClientConfig文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM