views:

72

answers:

3

Ok, wierd problem I cant figure out. Hopefully someone where can. I have inherited a site that was developed with a very over architedcted Content Management System. I am having problems now with the redirection functionality built into it.

This is on a dedicated Windows 2003 server running ASP.NET 3.5 sp 1. The redirects are stored in the database, and I have confirmed that the correct redirect is in place in the database. Finally, the file extension .html has been mapped in IIS to the ASP.NET ISAPI. And there is an HttpHandler created to redirect the .html requests. The default documents on the server, in order, are:

default.aspx index.aspx default.asp index.asp default.html index.html

for this example, we have two redirects both pointing to the same content page. /example and /example.html

when requesting /example.html it correctly finds the appropriate redirect in the database and does its magic. Bueno. When requesting /example it gives a 404 page. Its not even the asp.net yellowish 404 generic error page. Its the standrad vanilla IIS 404 response so it appears that asp.net is not intercepting these requests.

Let me know if any other information is requested and I will try to provide what I can. Thanks in advance for all the great recommendation I am sure will come from the community.

A: 

Yes this is correct because /example is not pointing to any file, it is pointing to directory in the web server. Check that Default.aspx/ default.html or any other atleast one of them exists in your app.

If you are using ASP.Net MVC for REST then check your actions are properly written.

Ravia
Well, the point was that the CMS framework previously handled this without requiring a file to exist, and I need to troubleshoot it and determine why it no longer does so. I think I have a game plan for that though. Thanks.
Goblyn27
+2  A: 

Without rewriting the CMS, you can put a physical file in a new directory "/example". This will trigger ASP.NET to intercept the request, and hopefully load your page.

If you want to really hack it up you can change the IIS 404 page to be a .NET page in your application that can handle the original request and redirect to the page you really want.

Matt Connolly
Yeah, I did that as a stop gap measure for their requests last night. But ultimately I need to get it fixed so that their CMS controls this without my adding files and directories manually. I like your idea of just hacking the 404 page but I was weary of doing so as I can see a never ending loop just waiting to happen.
Goblyn27
+2  A: 

You should be able to map a wildcard extension to go through the ASP.Net ISAPI DLL is the solution.

Installing Wildcard Application Mappings (IIS 6.0) may also be useful.

JB King
Yeah, that what I was thinking too. I dont know if that will catch the httphandler. Obviously something on the previous developers server was handling it and making the redirect, so I am going to need to do some code spelunking to find out which module/handler was handling these specific requests.
Goblyn27