Hiding Direct URL access to user
I am developing an online banking system. i have a page userpage.aspx which will be shown in the browser when the user login is successful. My Question user must be prevented to view userpage.aspx directly if he/she types "http://olb/userpage.aspx".
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Biswa Pujarini MohapatraRank #465 · 5.4K reputationPosted Jan 23, 2014, 5:39 PM EST
Use Request.ServerVariables["HTTP_REFERER"] to find request is coming from your site or not
if(Request.ServerVariables["HTTP_REFERER"].ToLower().IndexOf("mysite.com") == -1){
// Not from my site
Response.Redirect("NotAllowed.aspx");
also you can use
asp.net location tag in web.config if you are using authentication
Satyapriya NayakRank #47 · 31.5K reputationPosted Jan 23, 2014, 6:27 PM EST
http://www.dotnetcurry.com/showarticle.aspx?ID=270
http://stackoverflow.com/questions/4026125/how-do-i-prevent-url-entry-and-redirect-the-user-to-login-page
http://stackoverflow.com/questions/4834387/how-to-redirect-users-to-an-asp-net-page-when-not-authorized
http://www.extremeexperts.com/net/articles/implementingpassportauth.aspx