0

I am using Open Rasta 2.0 under IIS 6. I would like to redirect the root of the site to a web page.

The documentation says:

Note that this will disable IIS default page mapping. The work-around is to either expose your default pages using OpenRasta itself....

I cannot work out how to achieve this. I have tried various routes in the configuration but they don't seem to work with IIS. I am also using Cassini server on my DEV pc, it has no issues when no routes are added but under some routes I tried broke it.

John
  • 29,788
  • 18
  • 89
  • 130

1 Answers1

1

Do you mean you want to show a webpage using OpenRasta on the root of the site? In this case you can do something like this when you have wildcard mappings setup.

using (OpenRastaConfiguration.Manual)
{
     ResourceSpace.Has.
     ResourcesOfType<Home>().
     AtUri("/").
     HandledBy<HomeHandler>().
     RenderedByAspx("/views/index.aspx")
}

Also when you say routes are you talking about OpenRasta resource configuration or IIS handler mappings?

Antony Denyer
  • 1,541
  • 1
  • 15
  • 31
  • I am using OpenRasta resource configuration and all sub pages are rendering .aspx fine, it is just the root. I have re-added the route you have shown however it does not work and then stops all aspx pages from showing. I will check the wildcard mapping to see if that was the issue. – John Jan 19 '12 at 08:15
  • It was the wildcard mapping that was not configured correctly - thanks – John Jan 19 '12 at 08:59