我试图将silverlight 4应用程序与asmx webservice连接起来,但我得到了一个" InvalidOperationException"当试图这样做时。
问题发生在此功能的第一行
private void AskWebService() {
WSCalledSoapClient client = new WSCalledSoapClient();
client.AskThisCompleted += new EventHandler<AskThisCompletedEventArgs>(client_AskThisCompleted);
client.AskThisAsync("the answer to life, universe and everything");
}
异常的错误应该翻译成这样的东西(没有找到它的英文版本)
元素&#39;消息&#39;在服务引用配置中无法识别。请注意,Silverlight中只提供Windows Communication Foundation配置功能的一部分。
网络服务的详情:
Silverlight应用程序的详细信息
更新
这是ServiceReferences.ClientConfig
<configuration>
<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="WSCalledSoap" maxBufferSize="2147483647" maxReceivedMessageSize="2147483647">
<security mode="None" />
</binding>
</basicHttpBinding>
</bindings>
<client>
<endpoint address="http://myip:someport/WSCalled.asmx"
binding="basicHttpBinding" bindingConfiguration="WSCalledSoap"
contract="SrvWSCalled.WSCalledSoap" name="WSCalledSoap" />
</client>
</system.serviceModel>
</configuration>
任何帮助将不胜感激。
感谢。