Loading...

All project content is available for reading, but you need to be a member of the project for Subversion checkout of source code, or to create/modify any information.
Login if you are a member. Apply here to request membership (open to all).

Ticket #128 (closed defect: fixed)

Opened 9 years ago

Last modified 8 years ago

Redirects does not work on IIS 6

Reported by: magnus.unger@… Owned by: steve@…
Priority: major Component: 404Handler
Keywords: Cc: dag.norstein@…

Description

I installed the module on EPiServer CMS 5 R2 SP1 on a Windows 2003 machine with IIS 6.0.

Only redirects that ends with .aspx works, all others returns a 404 error, maybe I missed something or does it only work on IIS 5.1?

Attachments

aspx.png (4.6 KB) - added by steve@… 8 years ago.
aspx extension configuration for IIS 6

Change History

comment:1 Changed 9 years ago by magnus.unger@…

I also tried to set the 404 page inside IIS, but that does not work completely. Then IIS returns the sourcecode of the .aspx file instead of running it (tried both File and Url type).

comment:2 Changed 9 years ago by lars.flagan@…

We are experiencing the same issue. Did you ever find the solution to the problem?

comment:3 Changed 9 years ago by steve@…

  • Status changed from new to accepted

I'm sorry, but I have not had the time to look into this before the vacation. I will get back to you in the end of July. If anyone have more information, please append to the ticket.

comment:4 Changed 9 years ago by dag.norstein@…

  • Cc dag.norstein@… added

comment:5 Changed 9 years ago by lars.flagan@…

The problem seems to be that the HttpApplication.Error event is never raised when running the code on IIS6. On IIS7 and Casini a HttpException is thrown when a "friendly" url does not exist but on IIS6 it does not, hence the error event is never raised.

This probably has to do with the differences in the processing pipelines in hosting containers…

comment:6 Changed 9 years ago by steve@…

What about forcing the 404 status in IIS to redirect all 404 errors to the 404 page? Just like we had to do in CMS 4 (before the wildcard extension).

comment:7 Changed 9 years ago by lars.flagan@…

Jupp, that works. However it is very strange that the implementation works in such a different way. Hopefully it might be a smoother way to handle this than setting the 404 page in the IIS settings

comment:8 Changed 8 years ago by karl.alesbury@…

Trouble is, you can accomplish this with customerrors and IIS6 redirects to HTML pages, and the 404 module is no longer required. I'm experiencing the same issue with EPiServer 5.2.375.236, IIS 6, and the latest version of the EPiCode module.

comment:9 Changed 8 years ago by steve@…

Someone said that the wildcard extension on IIS 6 was messing things up, and that if you explicitly added the .aspx extension (for the .net isapi) in addition to the wildcard handler, then asp.net would in fact get notified about the not found error (for other resources than .aspx's - go figure), and things should work as expected. Haven't tested it myself yet though.

comment:10 follow-up: ↓ 11 Changed 8 years ago by karl.alesbury@…

I tried adding it as an explicit extension in IIS 6 in the pane just above the wildcard mapping, and I still get the generic 404 message for http://siteurl/thisurl/

http://siteurl/thisurl.aspx works, but still nothing on the extensionless URLs. :-(

comment:11 in reply to: ↑ 10 Changed 8 years ago by karl.alesbury@…

Changed 8 years ago by steve@…

aspx extension configuration for IIS 6

comment:12 Changed 8 years ago by steve@…

I have this working on an IIS 6 site (Windows Server 2003 Standard Edition Service Pack 2).

  • I have configured the 404 custom error in IIS to be an url and points to: /404notfound.aspx
  • Wildcard extension points to the correct isapi dll
  • .aspx extension looking like this:
    aspx extension configuration for IIS 6
  • Actually, it seem like all the .NET extensions had been added to this site, but I do not think it should matter.

I then removed the .aspx extension, did an IISReset and the 404 handler stopped working (I got an "The request is not supported." error message, not the standard 404 message for some reason.) Adding the .aspx extension again, and it works.

I wonder what makes this work in my setup, but not yours.

comment:13 Changed 8 years ago by steve@…

Could it be that IIS sees the wild card extension, and disregards your additional .aspx handler? Try adding this handler too:

  • .asa
  • Executable: C:\WINDOWS\system32\inetsrv\asp.dll
  • Limit to: GET,HEAD,POST,TRACE
  • Script engine
  • Verify that file exists

comment:14 Changed 8 years ago by karl.alesbury@…

IT WORKS!

I removed my aspx extension mapping and swapped it for your screenshot above. The difference was that you were limiting the verbs, and you have verify file exists unchecked.

I then went in and added IIS' 404 redirect to the default bvn 404 page.

The rest was in place, and we are now displaying the correct thing! That's worth publicising, I reckon! :-D

comment:15 Changed 8 years ago by steve@…

  • Status changed from accepted to closed
  • Resolution set to fixed

Nice! Good thing we finally nailed it! I tried it with "All verbs" too, and that works. I guess the only requirement is to keep the "Verify that file exists" unchecked. I'll put this on the configuration wiki too.

Note: See HelpUser/Tickets for help on using tickets.