- Create a Variable of type ResourceContext as below. This stores the last accessed resource URL.
- Create Response with the following two attribute :
WebAgent-OnReject-Redirect = URL where you would like the user to be redirected after Authorization Reject.
WebAgent-OnReject-Text = Configure this to read the value of the Variable created earlier. This will create a SMTEXTcookie response which will have the value of the Resource URL.
- Create OnAccessReject rule for the root resource.
- Associate the OnAccessReject rule with the Response created above.
- Configure the AZ redirect page to read the value from SMTEXT cookie :
(Below sample use class ASP )
> You are not authorized to access resource : <%=Request.Cookies("SMTEXT")%> </
for each x in Request.ServerVariables
response.write(x & " = " & Request.ServerVariables(x) & "<
- Access resource which the user is not authroized for.
- Sample fiddler :
- Sample fiddler + accessdenied.asp :