You are developing a Silverlight 4 application that will be hosted on a page at http://www.contoso.com/MainPage.aspx. You also create a Windows Communication Foundation (WCF) service hosted at http://www.fabrikam.com/BusinessService.svc. You need to ensure that the Silverlight application can access the WCF service. You also need to ensure that no other Silverlight applications can access the WCF service.
What should you do?
A.
Publish a clientaccesspolicy.xml file at the root folder of http://www.fabrikam.com by using the following XAML fragment.
< xml version=”1.0″ encoding=”utf8″ >
<accesspolicy>
<crossdomainaccess>
<policy>
<allowfrom httprequestheaders=”SOAPAction”>
<domain uri=”*”/>
</allowfrom>
<grantto>
<resource path=”/BusinessService.svc” includesubpaths=”true”/>
</grantto>
</policy>
</crossdomainaccess>
</accesspolicy>
B.
Publish a clientaccesspolicy.xml file at the root folder of http: //www.fabrikam.com by using the following XAML fragment.
< xml version=”1.0″ encoding=”utf8″ >
<accesspolicy>
<crossdomainaccess>
<policy>
<allowfrom httprequestheaders=”SOAPAction”>
<domain uri=”http: //contoso.com”/>
</allowfrom>
<grantto>
<resource path=”/” includesubpaths=”true”/>
</grantto>
</policy>
</crossdomainaccess>
</accesspolicy>
C.
Publish a clientaccesspolicy.xml file at the root folder of http://www.contoso.com by using the following XAML fragment.
< xml version=”1.0″ encoding=”utf8″ >
<accesspolicy>
<crossdomainaccess>
<policy>
<allowfrom httprequestheaders=”SOAPAction”>
<domain uri=”http: //www.fabrikam.com”/>
</allowfrom>
<grantto>
<resource path=”/” includesubpaths=”true”/>
</grantto>
</policy>
</crossdomainaccess>
</accesspolicy>
D.
Publish a clientaccesspolicy.xml file at the root folder of http://www.contoso.com by using the following XAML fragment.
< xml version=”1.0″ encoding=”utf8″ >
<accesspolicy>
<crossdomainaccess>
<policy>
<allowfrom httprequestheaders=”SOAPAction”>
<domain uri=”*”/>
</allowfrom>
<grantto>
<resource path=”/BusinessService.svc” includesubpaths=”true”/>
</grantto>
</policy>
</crossdomainaccess>
</accesspolicy>