The code works fine on my local machine. I am using a httpmodule to do this. The problem is , once I update the site on the server, the module code is not getting executed when there is no file as given in the url. Redirection occurs if the url specified points to a valid file on the server
That can indeed be difficult to diagnose. Helps to make use of the Control Panel app recycle tool for that too. Has saved me a few times. Note: You have probably seenmany of these but there are lots of related articles at Msft: http://search.microsoft.com/results.aspx?mkt=en-US&setlang=en-US&q=asp.net+URL+redirection Post Edited (wisemx) : 11/3/2007 4:09:48 PM GMT
If a url does not exist, need to redirect to a specific page based on the entered url. If i add the redirection code in Appliocation BeginRequest , the browser automatically goes to file not found page, but i need to call the redirection routine. How can this be done?
There are multiple methods you can use for this in ASP.NET. Click this Google CoOp line and look at some of the articles it pulls up: http://www.google.com/cse?cx=009244845836111659857%3Albvxsjj8mho&q=asp.net+page+redirect&cof=FORID%3A0
did you have wildcard mapping setup in your local environment? We may need to set this up for you. Bruce DiscountASP.NET www.DiscountASP.NET
Assuming you are testing from within Visual Studio, the mini-webserver instance (Cassini) thatit uses actually does wildcard mapping by default. This causes a lot of "works in local machine but not on server" issues, as many ASP.NET 2.0 features depend on this wildcard mapping. Aristotle DiscountASP.NET www.DiscountASP.NET