AWG Blogs

Sunday, January 13, 2013

Dev on Alternate Machine

This is for when you want to work on a different SharePoint 2007 dev machine but not have to change host name configuration entries in your Silverlight code.

- edit the Windows hosts file adding
127.0.0.1 yourPrimaryServerName

- add yourPrimaryServerName as a public url for the intranet zone of your web app in the alternate access mappings

- add a host header value of "yourPrimaryServerName" to the site's IIS 6 configuration

- set DisableLoopbackCheck see http://support.microsoft.com/kb/896861
- add the following files to c:\inetpub\wwwroot (or a subdir, check IIS for the actual root dir the 80 site)

clientaccesspolicy.xml

<?xml version="1.0" encoding="utf-8" ?>
<access-policy>
<cross-domain-access>
<policy>
<allow-from http-request-headers="*">
<domain uri="*"/>
</allow-from>

<grant-to>
<resource include-subpaths="true" path="/"></resource>
</grant-to>
</policy>
</cross-domain-access>

</access-policy>

crossdomain.xml

<?xml version="1.0" encoding="utf-8"?>
<!-- The file must be configured to allow access to the service from any other domain,
or it is not recognized by Silverlight 4.
Save the crossdomain.xml file to the root of the domain where the service is hosted.
If, for example, the service is hosted in http://fabrikam.com,
then the file must be located at http://fabrikam.com/crossdomain.xml.
-->
<!DOCTYPE cross-domain-policy SYSTEM
"http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-http-request-headers-from domain="*" headers="*"/>

</cross-domain-policy>
ref