I\'ve seen a lot of links to MSDN and \"works on my machine!\" answers so I\'d like to ask my question with the exact steps to duplicate what I\'m doing. Because we are usin
The problem could be that your development server is not able to serve the xml file, try this - explicitly make it available through WebGet
[ServiceContract]
public interface ICrossDomainService
{
[OperationContract]
[WebGet(UriTemplate = "ClientAccessPolicy.xml")]
Message ProvidePolicyFile();
}
and then the ProvidePolicyFile() can be
public System.ServiceModel.Channels.Message ProvidePolicyFile()
{
FileStream filestream = File.Open(@"ClientAcessPolicy.xml", FileMode.Open);
// Either specify ClientAcessPolicy.xml file path properly
// or put that in \Bin folder of the console application
XmlReader reader = XmlReader.Create(filestream);
System.ServiceModel.Channels.Message result = Message.CreateMessage(MessageVersion.None, "", reader);
return result;
}