views:

354

answers:

2

Dear All,

I have the following binding configuration in my WCF service that I'm trying to use with Silverlight.

<bindings>
  <basicHttpBinding>
   <binding name="basicHTTP" 
             receiveTimeout="00:10:00" 
             sendTimeout="00:10:00" 
             closeTimeout="00:10:00" 
             openTimeout="00:03:00" 

             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>

When trying to use the service with the ASP.NET Development server, I get the following response in Fiddler trying to access either crossdomain.xml or clientaccesspolicy.xml:

HTTP 502: Connection to localhost failed. Exception Text: No connection could be made because the target machine actively refused it ::1:51547

I do have crossdomain and clientaccesspolicy.xml in my project at web.config level.

VS2008 tells me its a security error, so I'm thinking something is blocking access to this port?

I'm not sure how to fix this problem?

My clientaccesspolicy looks like this:

    <?xml version="1.0" encoding="utf-8"?>
<access-policy>
    <cross-domain-access>
        <policy>
                <allow-from http-request-headers="SOAPAction">
                        <domain uri="*"/>
                </allow-from>
                <grant-to>
                        <resource path="*" include-subpaths="true"/>
                </grant-to>
        </policy>
    </cross-domain-access>
</access-policy>

Can someone help me debug this?

Tony

+1  A: 

If I'm reading your error messgae right it looks like Silverlight is trying to access your IIS server with an IPv6 address.

HTTP 502: Connection to localhost failed. Exception Text: No connection could be made because the target machine actively refused it ::1:51547

That could be what you want but given the problem you're having I suspect not. You may need to manually change the IP address in your Silverlight proxy classes svcinfo file or if you're configuring it programatically whereevre you are setting the endpoint address.

sipwiz
From what I can see the endpoint is set in the web.config. So how do I tell it to use an IPv4 address?
Tony
A: 

This is pretty much an exact duplicate of http://stackoverflow.com/questions/1549083/refused-connection

...which also appears to have been asked by you. (?!?)

EricLaw -MSFT-