WCF service for Sl3

喜欢而已 提交于 2019-12-12 05:37:11

问题


I have written a simple service that uploads & downloads XML files. I want to implement it in a Silverlight 3 project, but on doing so I get following warnings:

**Warning 1 Custom tool warning: Endpoint 'BasicHttpBinding_IxmlLoad' at address 'http://tony-pc/xmlLoadService/Service.svc' is not compatible with Silverlight 3. Skipping...
**

**Warning 2 Custom tool warning: No endpoints compatible with Silverlight 3 were found. The generated client class will not be usable unless endpoint information is provided via the constructor.
**

Although I have the following endpoint config in my web.config file:

      <bindings>
     <basicHttpBinding>
    <binding name="basicHTTP" 
             receiveTimeout="00:10:00" 
             sendTimeout="00:10:00" 
             closeTimeout="00:10:00" 
             openTimeout="00:03:00" 
             messageEncoding="Mtom" 
             maxBufferSize="100000" 
             maxReceivedMessageSize="100000" 
             transferMode="StreamedResponse">
    </binding>
 </basicHttpBinding>
    </bindings>
    <services>
<service behaviorConfiguration="mexBehavior" name="LoadXMLService.XMLOperations">
    <endpoint address="" 
              binding="basicHttpBinding" 
              bindingConfiguration="basicHTTP" 
              contract="LoadXMLService.IxmlLoad" />
        </service>
    </services>

My service is hosted in IIS 7.0.

Can anyone help me as to what is wrong?

Tony


回答1:


I'm not a big expert in Silverlight, but I'm pretty sure one of these two config entries is the culprit:

messageEncoding="Mtom" 

Try: messageEncoding="Text" instead.

or

transferMode="StreamedResponse"

Try: transferMode="Buffered" instead.

Can you try with other values, just to see if that was the trouble maker?

Marc



来源:https://stackoverflow.com/questions/1548190/wcf-service-for-sl3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!