hello sir,
i read your article on URL rewriting in asp.net on msdn.i have also used the same in my
project.URL rewriting is working fine in our LAN and on our configured IP but problem is
that when we host our site to some ISP its not working and giving error like this "THE PAGE
CAN NOT BE FOUND" its really emberrasing because i am not able to find out the proble any
where
i am seding the code which i am using
Sample code
==================
Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
' Fires at the beginning of each request
Dim context As HttpContext
context = HttpContext.Current()
Dim strOldPath As String
strOldPath = Trim(context.Request.Path.ToLower())
Dim strToken As String
strToken = "accomodationdetail"
Dim intI As Integer
intI = strOldPath.IndexOf(strToken)
Dim intLen As Integer
intLen = strToken.Length
Dim intJ As Integer
If intI <> -1 Then
intJ = strOldPath.IndexOf(".aspx")
If intJ <> -1 Then
Dim strDetail As String
strDetail = strOldPath.Substring(intI + intLen, intJ - (intI + intLen))
Dim strNewPath As String
strNewPath = strOldPath.Replace(strToken + strDetail + ".aspx",
"AccomodationDetail.aspx?intID=" & strDetail)
context.RewritePath(strNewPath)
End If
End If
end sub
============================
but when i called some page like this
original request=/accomodation/accomodationdetail22.aspx
after rewrite=/accomodation/accomodationdetail.aspx?id=22
above request is doing fine in our lan and on our configured IP
but not working on ISP where we host our site
and giving error "THE PAGE CAN NOT BE FOUND"
i think you got my problem
please help me as soon as possible
thanks
regards
sandeep
MY MAIL id IS sp*****@rsbsystems.com
--------------------------------
From: sandeep pandit
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>1Znp8aXvqEKwPYvUPxX+sg==</Id>