views:

212

answers:

4

When I copy my URL and paste in other browser, the page opens which should not happen. This shows lack of security. I want the forms authentication. How to do that?

+1  A: 

If you set cookieless="true" (or UseDeviceProfile and browser has cookies disabled) in your web.config file, authentication information is appended to the URL and this url will be valid across other browsers. If you use cookies to identify users, then only the current browser will have the user authenticated.

Darin Dimitrov
+1  A: 

You need to set this up in your web.config file:

<system.web>
  <authentication mode="Forms">
    <forms loginUrl="login.aspx" />
  </authentication>
  <authorization>
    <deny users="?" />
  </authorization>
</system.web>

As described in this MSDN article.

Oded
A: 

can you send me any link where i can get a sort of tutorial for the forms authntication

Sneha Joshi
check http://www.asp.net/%28S%28ywiyuluxr3qb2dfva1z5lgeg%29%29/learn/security/tutorial-02-cs.aspxhttp://www.asp.net/%28S%28pdfrohu0ajmwt445fanvj2r3%29%29/learn/security/tutorial-03-cs.aspx
PRR
A: 

Forms Authentication is not a newly added concept in asp.net 3.5. It is tried and tested technique in existence from asp.net 1.0. There are lot of books and tutorials available to show you how to do this. The simplest way you can achieve this is using membership provider models such as SqlMembershipProvider. Models provide you ready-made infrastructure which you can use for authentication.

Manoj