I have folder in my asp.net website ..namely admin
i have following pages inside admin folder … login.aspx, home.aspx, welcome.aspx …
i want if user directly open page … welcome.aspx or anyother page inside admin folder then it automatically redirect to login.aspx till they login using admin id and pass …
how to do this setting in web.config…using authorization vb.net
You can use the
<location>tag in your web.config:http://msdn.microsoft.com/en-us/library/b6x6shw7.aspx
This allows you to specify which folders can only be accessed by which users. For example to only allow a user named “Admin” and no one else: