0

I've a silverlight application, which is running fine.

I'm trying to use "Out of browser" and I encounter several problems. First, I can't get access to my services.

I receive a "Timeout exception", even on a simple return "testString" service call. I'm on localhost.

So I think there is maybe a problem with cross-domain policies.

I tried to put this

    <?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
        <allow-access-from domain="*" />
</cross-domain-policy>

in a crossdomain.xml file

I tried to put this too:

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

But no way, I'm still getting a TimeOut exception, and in server side, my break point hasn't been reached.

So what could I have done wrong?

Where exactly should I put theses files?

Because I've a local IIS server, which has only one "Site", this site has an "application", and my application has a Folder which contains services, so on which level should I put this?

Thank you very much

EDIT: In fact I don't know if this is this cross-policies problem OR if it's that because when it is in Out of Browser mode, it can't use the Windows Authentication mode(NTLM)

J4N
  • 19,480
  • 39
  • 187
  • 340
  • Have you looked at the traffic using Fiddler? That will tell you if you are getting the correct cross domain policy on the client. – Andy May Mar 25 '11 at 12:22
  • In fact, if I run it out of browser, I don't see ANY traffic for this app in fiddler – J4N Mar 25 '11 at 12:36
  • You have Fiddler set to all traffic, right? Not just Web Browser? – Andy May Mar 25 '11 at 12:38
  • There is definitely an issue if you see no traffic. I just tested and setting Fiddler to All Processes lets me see OOB traffic. – Andy May Mar 25 '11 at 12:39
  • Wait. This is localhost? Are you setting your service call to http://ipv4.fiddler: ? – Andy May Mar 25 '11 at 12:41
  • @Andy: Instead of using the ipv4.fiddler weirdness just use "localhost." note the . on the end, this maintains the intranet zone status of localhost yet fiddler picks up the traffic. – AnthonyWJones Mar 25 '11 at 12:52

1 Answers1

0

I finally found what was the problem!

It was a silverlight issue:

In fact I was making the WCF call in the App.xaml.cs "ApplicationLoaded" event, and once I receive the method, I was setting my RootVisual.

And it seems, that when we are in Out-of-Browser mode, you can't make a WCF call before the RootVisual has been setted.

Now I'm setting the RootVisual, and when the RootVisual is "Loaded", I'm doing my request. and it works!

J4N
  • 19,480
  • 39
  • 187
  • 340