Changing the Access Denied message
Last Post 08/12/2011 6:55 PM by Joseph Craig. 3 Replies.
Author Messages
WinXnet
Nuke Master
Nuke Master
Posts:156


--
08/09/2011 12:26 PM  
Our client would like to change the access denied message that appears when you try to navigate to a page you have no permissions for to something more user friendly and appropriate for their site. Currently it says:

Access Denied You do not have access to view this tab within the portal.

Is there a quick way to change this? I notice it appears in the link, so I am thinking it may be compiled and something we cannot access.

mysite.com/mypagetitle/tabid/300/ctl/Access%20Denied/Default.aspx?message=You+do+not+have+access+to+view+this+tab+within+the+portal.+
http://www.winxnet.com Emerson Bruce - http://chayadigital.wordpress.com
Joseph Craig
DNN MVP
Posts:11667


--
08/09/2011 4:47 PM  
It is a string in \App_GlobalResources\SharedResources.Host.resx.

You can edit it using the Language Editor.

Joe Craig, Patapsco Research Group
Complete DNN Support
Simon Trice
Nuke Newbie
Nuke Newbie
Posts:3


--
08/12/2011 1:29 AM  
Hi,

For all the pages that I have given a start date in future, I need to redirect to a custom page instead.

For example, I have tabid=100 which is set up for future by setting the StartDate, let's say 5 days from now. When the user comes to tabid=100, the message,
'You do not have access to view this tab within the portal'
is displayed.

I want to redirect to a common tab which I created to display which is better styled... let's say tabid = 200.

Whenever the user comes to tabid=100, if the access is denied, should be redirected to tabid=200 otherwise load the same page.

What's the best solution for this? If I write code in Default.aspx.vb, what would be the condition?

Thanks.
Joseph Craig
DNN MVP
Posts:11667


--
08/12/2011 6:55 PM  
IF you set a page to be active in the future, it doesn't exist and attemts to visit the page will result in 404 error (page not found).

You can create a page (actually pages) in DotNetNuke and have them be the redirect target of various errors. This is configured in the web.config file. A very simple example is described at http://www.dnnhero.com/Videos/tabid...-113.aspx.

This is a .NET feature and is not exclusive to DotNetNuke. As the example indicates, you can create customized error pages that are different depending on the error. Google for ".NET Custom Errors" for more information.

Joe Craig, Patapsco Research Group
Complete DNN Support


---