Crossdomain Files in IIS [Resolved]

Posted by Vuyiswamb under WCF on 7/12/2011 | Points: 10 | Views : 3483 | Status : [Member] [MVP] [Administrator] | Replies : 2
Good Day All

i have placed a CrossDomain and the ClientPolicy Files in the Root of the IIS directory wwwroot.

We are currently having a problem on our side, our Network administrator says he has opened port 80 , but those policy files are not accessible from outside.

i change the port of my site to 8081 and the site is fine, but it needs to policy files that are accessible through port 80.

i goolged a bit and i see some people trying to programatically change the address location of the policy file.

You see the policy files that i can access , i can access them if i entered the port, and IIS looks for the policy Files in the Root Directory and those are accessible with port 80.

There are two things that i can settle for.

1) Its either the port 80 issue is resolved

2) The Policy files should be accessible via the new port.

I used Fidler to inspect this and i have the results in the attachment

I need advice.


Thank you for posting at Dotnetfunda


Posted by: Vuyiswamb on: 7/15/2011 [Member] [MVP] [Administrator] NotApplicable | Points: 25


My Policy file is in the root directory and it can be accessed via port 80, i dont want to tweak my application because of wrong security settings. I have a new server and now its working. Some service was blocking port 80.


Thank you for posting at Dotnetfunda

Vuyiswamb, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Nandhini on: 7/15/2011 [Member] Starter | Points: 25

Hi ,

You can read Cross domain file inside the crossdomain service method , no need to place your crossdomain xml file in root directory.

sample code is
public Stream GetClientAccessPolicyFile()

const string result = @"<?xml version=""1.0"" encoding=""utf-8""?>
<allow-from http-request-headers=""*"">
<domain uri=""*""/>
<resource path=""/"" include-subpaths=""true""/>
if (WebOperationContext.Current != null) WebOperationContext.Current.OutgoingResponse.ContentType = "application/xml";
return new MemoryStream(Encoding.UTF8.GetBytes(result));

Thanks & Regards,

Vuyiswamb, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response