You are developing a Silver light 4 application. You host the application by using a Web application available at http://www.contoso.com. The Web application contains multiple Windows Communication Foundation (WCF) services hosted at http://www.contoso.com/internal and http://www.contoso.com/external. You need to ensure that only your Silverlight application can access the services at http://www.contoso.com/internal. You also need to ensure that other Silverlight applications created by external vendors can access the services at http://www.contoso.com/external.
What should you do?
A.
Publish a clientaccesspolicy.xml file at the root folder of http://www.contoso.com by using th e following XAML fragment.
< xml version=”1.0″ encoding=”utf8″ >
<accesspolicy>
<crossdomainaccess>
<policy>
<allowfrom httprequestheaders=”SOAPAction”>
<domain uri=”http: //www.contoso.com/external”/>
</allowfrom>
<grantto>
<resource path=”/” includesubpaths=”true”/>
</grantto>
</policy>
</crossdomainaccess>
</accesspolicy>
B.
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.contoso.com”/>
</allowfrom>
<grantto>
<resource path=”/external” includesubpaths=”true”/>
</grantto>
</policy>
</crossdomainaccess>
</accesspolicy>
C.
Publish a clientaccesspolicy.xml file at the root folder of http://www.contoso.com/external by using the following XAML fragment.
< xml version=”1.0″ encoding=”utf8″ >
<accesspolicy>
<crossdomainaccess>
<policy>
<allowfrom httprequestheaders=”SOAPAction”>
<domain uri=”*”/>
</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=”/external” includesubpaths=”true”/>
</grantto>
</policy>
</crossdomainaccess>
</accesspolicy>