views:

148

answers:

0

Hi,

I am trying to use URL rewriting to convert a URL like http://localhost/Pine/Default/ABCD/ to http://localhost/Pine/Default.aspx?Code=ABCD

I am using Intelligencia.UrlRewriter and it is working fine. But since I have a Silverlight application, when the .xap file is loaded it tries to load from .../Default/ABCD instead of /Pine/ I fixed this by using the following filters in web.config

  <rewriter>
     <rewrite url="~/Default/Silverlight.js" to="~/Silverlight.js" />
     <rewrite url="~/Default/ClientBin/(.+)" to="~/ClientBin/$1" />
     <rewrite url="~/Default/(.+)" to="~/Default.aspx?Code=$1" />
  </rewriter>

This works perfectly when I launch my application from VS2008 SP1. But when I create a website for the same on IIS 7, and try running the application, the XAP file doesn't get loaded, and all I see is a blank screen, which shows "Silverlight" on right-clicking. This means that the Page got loaded fine, but the Silverlight portion didn't get loaded.

If anyone has used this mix of things, please help me out.

Please do not respond if you want to with one of the below points:

  1. URL Rewriting for pure aspx pages (non-silverlight)
  2. Manual URL Rewriting using Global.asax - Tried that and landed up with the same problem.

Thanks