Tuesday, 13 August 2013

Prevent access to aspx files and allow access only via routing?

Prevent access to aspx files and allow access only via routing?

I have a url route which I declare at global.asax file :
routes.MapPageRoute("RouteAdmin", "Admin/{Url}", "~/pages/MyPage.aspx",
false);
But if the user tries to access mysite.com/pages/MyPage.aspx he can still
see the page
Question :
Can I configure routing so that only routed paths are acceptable ?

No comments:

Post a Comment