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.net:84" />
    </allow-from>
  <grant-to>
    <resource path="/*" include-subpaths="true"/>
  </grant-to>
</policy>

Ideally I want to be able to do something like:

    <?xml version="1.0" encoding="utf-8"?>
    <access-policy>
      <cross-domain-access>
        <policy>
          <allow-from http-request-headers="*">
          <domain uri="http://*.foobar.net:*" />
        </allow-from>
      <grant-to>
        <resource path="/*" include-subpaths="true"/>
      </grant-to>
    </policy>
  </cross-domain-access>
</access-policy>

I suspect if this is not allowed and it is because an address containing a port number is viewed as being another domain and therefore requires a cross domain policy file as well as client access policy file, can anyone confirm or deny this as well?

来源:https://stackoverflow.com/questions/4026171/how-to-specify-all-ports-in-client-access-policy-file-silverlight

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!