Locke
Locke

Reputation: 1165

Silverlight not searching for ClientAccessPolicy.xml

I'm working with Silverlight and WebSocket4Net and get an error when attempting to connect. The problem is with the underlying socket:

{System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions.}

There is no InnerException or StackTrace below this.

It does not try to find the ClientAccessPolicy.xml -- at all.

I'm trying to connect to another computer, say 10.0.0.102, and that I'm from 10.0.0.101. I can access 10.0.0.102/ClientAccessPolicy.xml just fine. However, in Fiddler, it doesn't even attempt to load 10.0.0.102/ClientAccessPolicy -- no call is made to find it.

Because of this, my attempt to call and connect to the WebSocket via TCP doesn't work at all (i.e. ws://10.0.0.102:4530/WebSockOutput/). I've manually set the Socket's ClientAccessPolicyProtocol to Http... When I check at the lower layers, it's still setting the CAPP correctly.

Any thoughts?

I'd also like to add that I've rebooted and cleared the Temp directory on both machines several times.

Upvotes: 0

Views: 473

Answers (1)

Locke
Locke

Reputation: 1165

OK, so the problem is REALLY REALLY REALLY sad, on my part.

Apparently it already cached the ClientAccessPolicy.xml (which I'd changed to support the TCP Ports), and though I thought I was killing the temporary internet files, I wasn't. I deleted my history/downloaded data from IE's Options, and that fixed everything.

One would think that Silverlight would attempt to re-download the ClientAccessPolicy a bit more frequently...

Upvotes: 0

Related Questions