Forum Discussion
Devendra Singh
Jan 18, 2017Copper Contributor
SharePoint 2013 custom access denied page
We have a requriement wherein users who don't have access to our custom SP2013 site should get to see a custom access denied page instead of the default access denied page. Basically as part of this ...
Jan 18, 2017
One of the solutions to meet this requirement is to implement en HTTPModule that check if the user has access to the site and if no, redirect to your custom page...the good thing of the HTTPModule is that you can use it for all the farm
- Devendra SinghJan 18, 2017Copper Contributor
I was wondering if there was any better or alternative approach the HTTPModule approach is quite dated and requires deployment in the server farm . Also, we did NOT want to have a solution for the entire farm, instead just of our site collection or at the max for the web application containing the site collection.
- Jan 18, 2017I know HTTPModule technique is quite dated and covered around the Internet...but think about your requirement: you want to check, no matter the page the user is trying to access, if he can acccess to the site or not...so I don't see how are you going to achive this using client side coding...another alternative to the HTTPModule is a custom hidden control you add to the master page of the site so enabling/disabling the specific feature will add this functionality to your sites or not
- Devendra SinghJan 25, 2017Copper Contributor
I would rather try the following option, looks to be meeting my current requirement.
https://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.administration.spwebapplication.updatemappedpage.aspx
https://blogs.msdn.microsoft.com/fabdulwahab/2012/10/02/how-to-customize-error-page-page-not-found-and-access-denied-in-sharepoint-2010/
Will updated here with the results...