url rewriting giving 404 error when host site with windows 2003 server and iis6.0

  • Thread starter sandeep pandit via .NET 247
  • Start date
S

sandeep pandit via .NET 247

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 (e-mail address removed)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top