Disallow user acess to certain web pages unless logged in
-
Hi, In a web site I want to disallow users to give absolute addresses in the address bar for accessing web pages. Let me illustrate with an example. Suppose my website has three webpages login.aspx,a.aspx, and b.aspx I do not want the users to navigate to a.aspx or b.aspx by giving the following url in the address bar http://www.mywebsite.com/a.aspx or http://www.mywebsite.com/b.aspx Login.aspx is the startup page of the website. They should be able to access this web pages only if they have logged in. Regards Vinod
-
Hi, In a web site I want to disallow users to give absolute addresses in the address bar for accessing web pages. Let me illustrate with an example. Suppose my website has three webpages login.aspx,a.aspx, and b.aspx I do not want the users to navigate to a.aspx or b.aspx by giving the following url in the address bar http://www.mywebsite.com/a.aspx or http://www.mywebsite.com/b.aspx Login.aspx is the startup page of the website. They should be able to access this web pages only if they have logged in. Regards Vinod
There are SO many articles online about this. Basically, the way to do it by hand is to derive all pages that require login from a base page that checks a session variable to see if the user is logged in. Set that variable when the user logs in, and clear it when they log out. Done.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
Hi, In a web site I want to disallow users to give absolute addresses in the address bar for accessing web pages. Let me illustrate with an example. Suppose my website has three webpages login.aspx,a.aspx, and b.aspx I do not want the users to navigate to a.aspx or b.aspx by giving the following url in the address bar http://www.mywebsite.com/a.aspx or http://www.mywebsite.com/b.aspx Login.aspx is the startup page of the website. They should be able to access this web pages only if they have logged in. Regards Vinod
-
There are SO many articles online about this. Basically, the way to do it by hand is to derive all pages that require login from a base page that checks a session variable to see if the user is logged in. Set that variable when the user logs in, and clear it when they log out. Done.
Christian Graus - Microsoft MVP - C++ "also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
-
Hi, In a web site I want to disallow users to give absolute addresses in the address bar for accessing web pages. Let me illustrate with an example. Suppose my website has three webpages login.aspx,a.aspx, and b.aspx I do not want the users to navigate to a.aspx or b.aspx by giving the following url in the address bar http://www.mywebsite.com/a.aspx or http://www.mywebsite.com/b.aspx Login.aspx is the startup page of the website. They should be able to access this web pages only if they have logged in. Regards Vinod
<location path="a.aspx">
<system.web>
<authorization>
<deny users="*"/>
</authorization>
</system.web>
</location>
only two letters away from being an asset