Thursday, May 24, 2007

Problem with News Redirector in MOSS

The redirector function within MOSS 2007 works fine if you are redirecting to a web page (for both normal read-only users and administrators), but when the redirect is pointing to a document (e.g. .doc or .pdf), then normal read-only users get the following:


Looking at the MOSS logs, we see the following:

04/29/2007 08:20:25.27 w3wp.exe (0x013C) 0x09F8 CMS Publishing 7fov Medium Caught a thread abort exception in TemplateRedirectionPage.ProcessRequest, the exception may be expected. stack trace= at Microsoft.SharePoint.Utilities.SPUtility.Redirect(String url, SPRedirectFlags flags, HttpContext context, String queryString) at Microsoft.SharePoint.Utilities.SPUtility.Redirect(String url, SPRedirectFlags flags, HttpContext context) at Microsoft.SharePoint.Publishing.WebControls.RedirectControl.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at Sys...
04/29/2007 08:20:25.27* w3wp.exe (0x013C) 0x09F8 CMS Publishing 7fov Medium ...tem.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.REDIRECTPAGELAYOUT_ASPX__855614915.ProcessRequest(HttpContext context) at Microsoft.SharePoint.Publishing.TemplateRedirectionPage.ProcessRequest(HttpContext context)



When an administrator tries the same page, they see the page:


Then they are redirected to (in this case) a Word document.

NOTE: This is not a permissions issue to the document (i.e. the user can open the document directly).

Work Around
The only work-around is to change the 'Pages' library security settings (where the redirect page resides). For this, you will need to break the security inheritance from the parent News site. You must set all readers to have contributor access. To prevent malicious updates to the news articles, you simply configure the Pages library to require content approval, then setup an approval workflow to notify the administrator of the news area.

1 comment:

Unknown said...

That's terrible; I can't believe that redirects inside of sharepoint would work like that.