2
votes

I ran into a weird issue when migrating a site on to a new web server.

I have some custom handlers written and defined in my web.config:

<add name="CalendarHandler" verb="*" path="/api/Calendar" type="CalendarHandler" />

If I do not put a file extension on the path like "/api/Calendar.css" the response that comes back is a redirect loop. If I put any extension on the path it will return the correct response. Removing the extension causes a re-direct error.

The path="/api/Calendar" works just fine the old server. I have moved the site from IIS 7.5 WIN 2008 R2 to IIS 8.5 WIN 2012. I am not sure what setting I am missing in IIS. I have made sure all the handler mappings are the same and I have tried installing URL Rewrite. No luck.

1

1 Answers

1
votes

I changed the path to

<add name="CalendarHandler" verb="*" path="/api/Calendar/" type="CalendarHandler" />

and it worked. For some reason IIS 8.5 did not like 'path="/api/Calendar"' the missing '/' caused the redirect loop.