Location access in ASP.NET
I have admin area of my site: http://www.mysite.com/webadmin and I want to protect it by role (I'm using ASP.NET forms auth), so that only a user with the role "admin" could access it. 
In web.config I added this entry:

    <location path="WebAdmin">
    	<system.web>
    		<authorization>
    			<deny users="*"/>
    			<allow roles="admin"/>
    		</authorization>
    	</system.web>
    </location>

and it "sort of" works - it redirects you to the login page if you are not in role "admin". But I don't want that, I want to show an error page instead. Any way I could control that behavior? 

Thank you,
Andrey
Location access in ASP.NET
===

I have admin area of my site: http://www.mysite.com/webadmin and I want to protect it by role (I'm using ASP.NET forms auth), so that only a user with the role "admin" could access it. 
In web.config I added this entry:

    <location path="WebAdmin">
    	<system.web>
    		<authorization>
    			<deny users="*"/>
    			<allow roles="admin"/>
    		</authorization>
    	</system.web>
    </location>

and it "sort of" works - it redirects you to the login page if you are not in role "admin". But I don't want that, I want to show an error page instead. Any way I could control that behavior? 

Thank you,
Andrey