Saturday, April 17, 2010

How to secure your URL from copy and paste

Yesterday i was in a fix. I had created a user login Now the problem was that when user logs in and enters into its welcome page if we copy and paste the url and try to open it get to the user page which is a big hole in my application. So how got it corrected. Well i made some changes in my web.config file for security


authentication mode="Forms"
forms loginUrl="loginPage.aspx"/
/authentication


authorization
deny users="?"/
/authorization




this worked fantastic and i was able to make my user pages secure.