ASP.NET Security and Authentication.

Add following in web.config File

               <authentication mode="Forms">
      <forms name="f" defaultUrl="default.aspx" loginUrl = "login.aspx" path="/" protection="All">
        <credentials passwordFormat="Clear" >
          <user name="vin" password="1"/>
          <user name="pinx" password="123"/>
      <allow users="vin"/>
      <deny users="pinx"/>

have 2 page default.aspx and login.aspx
In login.aspt have 2 textbox and 1 button. vb code is:

Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
        If FormsAuthentication.Authenticate(TextBox1.Text, TextBox2.Text) Then
            FormsAuthentication.RedirectFromLoginPage(TextBox1.Text, False)
            Response.Write("Invalid User")
        End If

    End Sub


Most Viewed Post

solution for facebook waiting

Connect Sony XPLOD MEX-BT2500 Bluetooth CD Receiver with ur mobile

Crystal Report : Show data horizontally (Left to right) i.e. columns as rows

Google+ Followers