Phil
Phil

Reputation: 6679

Silverlight SecurityException on internal network, not external

I am hosting a Silverlight application on a server in a datacenter. My client is on an intranet, and he needs the application to allow him to connect to a server on his own intranet.

The client's server is also exposed to the public, and I can get the Silverlight application to talk to his server just fine from my machine (good clientaccesspolicy.xml and all that jazz). However it won't work for him. The Silverlight application throws a vague SecurityException when he tries to access his own server from behind his intranet.

In case you're a visual person, here's a nice diagram of the situation:

Client can't access his own server with my Silverlight app

(The green connections are through the Internet, and the red is the failing intranet connection.)

We are both using the same URI to access the server, and he has both my Silverlight server and his intranet server added to his "Trusted sites" list.

The SecurityException looks like this:

System.Security.SecurityException ---> System.Security.SecurityException: [Arg_SecurityException]
Arguments: 
Debugging resource strings are unavailable. Often the key and arguments provide sufficient information to diagnose the problem. See http://go.microsoft.com/fwlink/?linkid=106663&Version=5.0.61118.00&File=mscorlib.dll&Key=Arg_SecurityException
   at System.Net.Browser.BrowserHttpWebRequest.InternalEndGetResponse(IAsyncResult asyncResult)
   at System.Net.Browser.BrowserHttpWebRequest.<>c__DisplayClassa.<EndGetResponse>b__9(Object sendState)
   at System.Net.Browser.AsyncHelper.<>c__DisplayClass4.<BeginOnUI>b__1(Object sendState)
   --- End of inner exception stack trace ---
   at System.Net.Browser.AsyncHelper.BeginOnUI(SendOrPostCallback beginMethod, Object state)
   at System.Net.Browser.BrowserHttpWebRequest.EndGetResponse(IAsyncResult asyncResult)
   at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)
   at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)

I'm at a dead end. It looks like a cross-zone problem, but again, both sites are in the same "Trusted sites" zone. What am I missing?

EDIT: It's also worth mentioning that he has used Fiddler to diagnose the problem. Interestingly enough, his machine doesn't check for the clientaccesspolicy.xml file and never even attempts to communicate with the server.

Upvotes: 2

Views: 3625

Answers (1)

Phil
Phil

Reputation: 6679

It turns out the client actually had his own server in the local intranet zone, and my server in the trusted zone. He moved my server to the local intranet zone and it started working.

Upvotes: 1

Related Questions