clientaccesspolicy.xml

Silverlight 5 clientaccesspolicy.xml

こ雲淡風輕ζ 提交于 2021-01-27 21:28:23
问题 I have a Silverlight 5 app that is making requests to a WCF data service over HTTPS on a separate domain (server) hosted via IIS 6 (at say mydomain.com/service.svc). The silverlight app gets a SecurityException, which I assume is related to not finding a proper clientaccesspolicy.xml file. I have a clientaccesspolicy.xml file defined at mydomain.com's wwwroot folder that looks like <?xml version="1.0" encoding="utf-8"?> <access-policy> <cross-domain-access> <policy> <allow-from http-request

how to specify all ports in client access policy file - silverlight

徘徊边缘 提交于 2019-12-24 15:49:36
问题 How do I specify a wildcard '*' for the ports in a client access policy file? If I want to specify multiple ports in the following file is there anyway to do this using a wildcard instead of explicitly listing each server: <?xml version="1.0" encoding="utf-8"?> <access-policy> <cross-domain-access> <policy> <allow-from http-request-headers="*"> <domain uri="http://*.foobar.net:81" /> <domain uri="http://*.foobar.net:82" /> <domain uri="http://*.foobar.net:83" /> <domain uri="http://*.foobar

Silverlight: HTTP DELETE and PUT methods with RestSharp

跟風遠走 提交于 2019-12-20 03:17:54
问题 I wanted to access an internal REST API from Silverlight, but it turns out that I am not allowed to use POST or DELETE as the HTTP method for my request. Doing so always resulted in a SecurityException . What is the recommended way to use REST apis with Silverlight? 回答1: SecurityException probably means the API doesn't have the proper clientaccesspolicy.xml file in place. Here's an example of a very lenient one that allows all HTTP methods and headers. We have used this successfully for our

How can I get my WCF service's client access policy operation to be accessible from the root?

时光毁灭记忆、已成空白 提交于 2019-12-13 02:19:00
问题 I have the following operation for hosting my client access policy in my WCF service: [OperationContract] [WebGet(UriTemplate = "/clientaccesspolicy.xml")] XElement RetrieveClientAccessPolicy(); public XElement RetrieveClientAccessPolicy() { String policy = @"<?xml version=""1.0"" encoding=""utf-8""?> <access-policy> ... </access-policy>"; return XElement.Parse(policy); } When I try to connect to my the service from my silverlight app, I get an error because it can't find the client access

Where to place ClientAccessPolicy.xml for Local WCF Service?

百般思念 提交于 2019-12-02 13:41:44
问题 I'm trying to create a basic WCF Service and Silverlight client. I've followed the following tutorial: http://channel9.msdn.com/shows/Endpoint/Endpoint-Screencasts-Creating-Your-First-WCF-Client/ Since Silverlight 4 was incompatible with the WSHttpBinding, I changed it to BasicHttpBinding. Unfortunately I keep getting this error now: "An error occurred while trying to make a request to URI'**'.This could be due to attempting to access a service in a cross-domain way without a proper cross

Silverlight: HTTP DELETE and PUT methods with RestSharp

一笑奈何 提交于 2019-12-01 23:48:16
I wanted to access an internal REST API from Silverlight, but it turns out that I am not allowed to use POST or DELETE as the HTTP method for my request. Doing so always resulted in a SecurityException . What is the recommended way to use REST apis with Silverlight? SecurityException probably means the API doesn't have the proper clientaccesspolicy.xml file in place. Here's an example of a very lenient one that allows all HTTP methods and headers. We have used this successfully for our API (which is popular, though I don't know how much traffic we get from Silverlight). <?xml version="1.0"