How to stop a user to see restricted page in asp.net application -


i new in asp.net , don't have knowledge it. have 1 query.

my dotnet application url http://www.example.com

for website's internal behavior, send request on http://www.example.com/net/afk/xyz , response displays on web page. , path not shows on web browser url. shows http://www.example.com/page

but problem is, when if enters directly http://www.example.com/net/afk/xyz web browser after login in application, gets open , user can see information dont want show.

i want - url http://www.example.com/net/afk/xyz should work internally not launch via web browser url.

i tried enter denied rule 'net\afk in iis those, url http://www.example.com/net/afk/xyz stops respond internally.

please me can this. type of requirement possible?

as understand question, if want page should not open directly url can way

uri u = httpcontext.current.request.urlreferrer;         if (u != null)             return true;         else         {             //here user try hit page url directly             //then can redirect user default page or home page             return false;         } 

Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -