Monday, February 6, 2012

Replacing Signout.aspx in SharePoint 2010

Yes, this was a common requirement in SharePoint 2007 and there wasn’t an easy and supportable approach to achieve that. Now in SharePoint 2010, it’s as easy as calling a method, specifying the page that you want to replace (for instance: Signout, error, access denied, ..) ,the URL of your new custom page and that's it!
The following feature receiver replaces the default SignOut page with a custom one on activation and resets the SignOut page to the default one on deactivation.

image

You can also replace other pages like AccessDenied.aspx, Confirmation.aspx, Error.aspx, Login.aspx, ReqAcc.aspx, SignOut.aspx or WebDeleted.aspx by specifying a member of SPWebApplication.SPCustomPage enum.

No comments:

Post a Comment