tgraupmann648 said:tgraupmann648 said:*snip*Somehow the newlines in the access policy matter. I used the following hardcoded string and it seems to work.
string hardcodePolicy = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n<access-policy>\r\n <cross-domain-access>\r\n <policy>\r\n <allow-from>\r\n <domain uri=\"*\" />\r\n </allow-from>\r\n <grant-to>\r\n <socket-resource port=\"4502-4506\" protocol=\"tcp\"/>\n </grant-to>\r\n </policy>\r\n </cross-domain-access>\r\n</access-policy>";
This is working reliably now. It must have been the lack of whitespace after the XML declaration element.