April 8, 2009

WORKAROUND: Sitefinity 3.6 Search Can't Handle Redirects

Issue:

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.

Workaround:

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

Notes:

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.

Update:

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

1 comment:

Georgi Chokov said...

Hi,
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.