locked
UI + Web Service + DAL to authenticate a login page of a website RRS feed

  • Question

  • User335057359 posted

    Can anyone give me a solution, i'm trying to create a Login page which allows entering LOGINID and PASSWORD, i have created a table with some 5 loginid, passwords and username. now on clicking SUBMIT button of the login page, the button_click event should call a webservice methods, which in return should call Data Access Layer's Class Library methods and this should look into the database for validation of id password entered and should display the message "Welcome + "username" " on the login page. How do i do this can anyone explain???

    Sunday, August 4, 2013 3:10 AM

Answers

  • User220959680 posted

    Data Access Layer's Class Library

    Implement DAL (Class library) with an operation that takes two parameters LoginId and Password, and returns True or False by checking into Table.

    webservice

    Note that it is feasible to implement SOAP or REST based service, REST is widely adotped.  

    Web Service method with parameters (LoginId and Password) calls the method from DAL and returns bool (True or False).

    public bool Authenticate(LoginId, Password)
    {
          //call the DAL method by passing the credentails      
          return DAL.Authenticate(LoginId, Password);
    }

    button_click event should call a webservice methods

    //Button click event handler
    //Invoke the service by passing credentials.
    
    if("http://serviceuri//Authenticate/username/password")
    {
        //authenticated
    }
    else
    {
       //redirect to login page
    }
    

    Sample WCF service


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, August 6, 2013 5:43 AM

All replies

  • User-760709272 posted

    http://www.asp.net/web-forms

    Sunday, August 4, 2013 10:08 AM
  • User220959680 posted

    Data Access Layer's Class Library

    Implement DAL (Class library) with an operation that takes two parameters LoginId and Password, and returns True or False by checking into Table.

    webservice

    Note that it is feasible to implement SOAP or REST based service, REST is widely adotped.  

    Web Service method with parameters (LoginId and Password) calls the method from DAL and returns bool (True or False).

    public bool Authenticate(LoginId, Password)
    {
          //call the DAL method by passing the credentails      
          return DAL.Authenticate(LoginId, Password);
    }

    button_click event should call a webservice methods

    //Button click event handler
    //Invoke the service by passing credentials.
    
    if("http://serviceuri//Authenticate/username/password")
    {
        //authenticated
    }
    else
    {
       //redirect to login page
    }
    

    Sample WCF service


    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, August 6, 2013 5:43 AM