April 8, 2009

WORKAROUND: Sitefinity 3.6 Search Can't Handle Redirects


If you create a control that uses Response.Redirect(), Sitefinity's search engine crawler will not advance past that page. If you are using the Administrator console to force an index, when the crawler hits that page, it will redirect the page and abort further indexing.


Somewhere prior to the Response.Redirect(), abort out if Telerik.CmsContext.IsCrawlerRequest is true.


This is a huge issue. Response.Redirect() is the most common tool used to move around a .NET application. It's bad enough that having a Response.Redirect() occur in any of your controls in design mode redirects you out of the page design surface, but having Response.Redirect() kill the crawler is unacceptable.


As you can see in the comments below, a fix for this is forthcoming.

1 comment:

Георги Чоков said...

you can use the following code:
If (!CmsContext.IsCrawlerRequest)
Do the redirect;
This will be fixed in the release coming in a couple of days.