0

The following works fine on my local host, but not on the server. I keep getting a page not found error. Any ideas? I also have a custom mime type setup in the web.config but that should not matter.

'--------------------------------------------------------
'Sub Application_BeginRequest()
'--------------------------------------------------------
'.
'.
'.
Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)

    '----------------------------------------------------
    'Redirect
    '----------------------------------------------------
    '.
    '.
    '.
    If Request.RawUrl.Contains(".page") Then

        Context.RewritePath("/Default.aspx") ' TEST

    End If

End Sub
Isabelle Harms
  • 375
  • 3
  • 9

1 Answers1

0

Replace "/"

   Context.RewritePath("Default.aspx") ' TEST
Anant Dabhi
  • 10,864
  • 3
  • 31
  • 49
  • See http://stackoverflow.com/questions/282805/asp-net-development-server-simulates-iis6-or-iis7 – Isabelle Harms Aug 17 '12 at 16:03
  • This solution does not work. There is a CheckIfFile exist setting that is missing in IIS7. Now, I redid this as an HTTP Module, and I can get it to run perfectly on the server but not locally. The reason is you register the module differently in IIS if its version 6 or 7. Is there a way around this. This is becoming ridiculous. See http://stackoverflow.com/questions/282805/asp-net-development-server-simulates-iis6-or-iis7 and http://msdn.microsoft.com/en-us/library/ms227673.aspx – Isabelle Harms Aug 17 '12 at 16:06