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 page, we want to provide them a screen/page using which they can enter a few more details and request for acecss (triggering a workflow process).


So, what would be the best approach this? I have already seen the following technet article wherein it discusses around this topic. However, believe this will affect the entire farm of SP2013 i.e. the custom access denied page implemented using this method will be shown for all other sites? While we just want to have a custom access denied page for our own Site Collection (we can consider a web app as well - if it meets the requirement i.e. limited to the web app), it should not affect other sites.


Thanks !!


6 Replies
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

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.

I 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 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
i.e. using SPWebApplication.UpdateMappedPage method
Much better approach...I didn't remember this solution...I'm getting old :-(. The only downside here is that it still requires to deploy stuff in the server side.