This is how you are going to replace the default error page with yours.
webApp.UpdateMappedPage(SPWebApplication.SPCustomPage.Error, “/_layouts/CustomErrorPage/CustomErrorPage.aspx”);
Make sure - CustomErrorPage.aspx is deployed in _layouts folder
To switch it back to default page
webApp.UpdateMappedPage(SPWebApplication.SPCustomPage.Error, null);
Ads by Google
No comments:
Post a Comment