locked
不能调用wcf RRS feed

  • 问题


  • 我的wcf服务在iis7上,在用silverlight 调用的时候得到     "Communication exception unhandled by usercode" 
    <?xml version="1.0" encoding="utf-8"?>
     <configuration>

       <system.web>
         <compilation debug="true" targetFramework="4.0" />
       </system.web>

       <system.serviceModel>

         <services>
           <service name="WcfServcie.MyServiceType">
             <endpoint  contract="WcfService.IPFService"
                        binding="basicHttpBinding"
                        address="http://pfwebserver.bombaydyeing.local/PFSvc/PFService.svc"
               />
           </service>
         </services>

         <behaviors>
           <serviceBehaviors>
             <behavior name="MyServiceTypeBehaviors">
               <serviceMetadata httpGetEnabled="true" />
               <serviceDebug includeExceptionDetailInFaults="false"/>
             </behavior>

             <behavior>
               <serviceMetadata httpGetEnabled="true" />
             </behavior>

           </serviceBehaviors>
         </behaviors>

         <serviceHostingEnvironment aspNetCompatibilityEnabled="true"
           multipleSiteBindingsEnabled="true" />

       </system.serviceModel>

     </configuration>                                                                                                                  

     ServiceReferences.ClientConfig                                                                 

    <configuration>
         <system.serviceModel>
             <bindings>
                 <basicHttpBinding>
                     <binding name="BasicHttpBinding_IPFService" maxBufferSize="2147483647"
                         maxReceivedMessageSize="2147483647">
                         <security mode="None" />
                     </binding>
                 </basicHttpBinding>
             </bindings>
             <client>
                 <endpoint address="http://localhost/PFSvc/PFService.svc" binding="basicHttpBinding"
                     bindingConfiguration="BasicHttpBinding_IPFService" contract="PFServiceReference.IPFService"
                     name="BasicHttpBinding_IPFService" />
             </client>
         </system.serviceModel>
     </configuration>


    Thanks 

    2015年2月25日 7:59

全部回复

  • Hi,

    Check to verify that both the silverlight.xap file and the wcf endpoint are:

    1. on exactly the same domain

    2. using exactly the same protocol (http/https)

    3.using exactly the same port number .

    If not, you can use the crossdomain.xml file to work around it.
    https://msdn.microsoft.com/en-us/library/cc645032%28v=vs.95%29.aspx?f=255&MSPPError=-2147217396


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.





    • 已编辑 Jonny_D 2015年2月26日 8:36
    • 已标记为答案 Jonny_D 2015年3月9日 7:27
    • 取消答案标记 poete 5nuton 2015年3月11日 8:32
    2015年2月26日 8:36
  • on exactly the same domain
    2015年3月11日 8:32