IIS 7 URL Rewriting

I was working on a MVC3 project using jQuery to populate a text input in an iframe element from the parent.

The catch is that the iframe source is on a different domain.

When I first tried to do it, the javascript gave me the Permission Denied error for trying to access the iframe document in a different domain.

If the domain of the parent and iframe child are the same this Permission Denied error will not be encountered.  To get the iframe domain the same as the parent I needed to use a proxy to fetch the page from the remote site, change the domain and display it in the iframe.  Also the interactions in the iframe need to go back to the remote site.

To get this to work I downloaded the IIS URL Rewrite Module http://www.iis.net/download/URLRewrite

I had to create some rewriting rules to do the proxy.  This blog post
has a good description of how to create the rules.

Print | posted on Friday, July 22, 2011 2:47 PM