c# - how to Login with stored procedure in webservice Window phone 8 -


I'm trying to create a Windows 8 mobile application web service where the user registers, logs in, Uploads images, etc.

I have created my database with a stored procedure The registration code is working but I can not login.

Here is the code:

  ** Webservce ** public string log (string username, string password) {string pwdhash = FormsAuthentication.HashPasswordForStoringInConfigFile (password, "SHA1 "); SqlConnection con = new SqlConnection (stren); SqlCommand CMD = new SQL Commands (); Cmd.Connection = con; Cmd.CommandType = CommandType.StoredProcedure; Cmd.CommandText = "login processor"; SqlParameter param = New SqlParameter ("Username", user name); SqlParameter param2 = New SqlParameter ("password @", pwdhash); Cmd.Parameters.Add (Ultimate); Cmd.Parameters.Add (param2); Con.Open (); SqlDataReader dr = cmd.ExecuteReader (); If (Dr. Reid ()) {return "OK"; } And {return "no"; }} Private Zero Button 1_Click (Object Sender, RoutedEventArgs E) {SnaprintWebserviceReferance.SnaPrintWebServiceSoapClient obj = New SnaprintWebserviceReferance.SnaPrintWebServiceSoapClient (); Obj.LoginCompleted + = new event heredollar & lt; SnapRentWizSrience Login Full EventArgs & gt; (Obj_LoginCompleted); Obj.LoginAsync (textbox1.Text, textbox2.Text); //ServiceReference1.WebService1SoapClient clint = New serviceback 1.WebService1SoapClient (); //clint.phoneAsync (textbox1.Text, textbox2.Text); } Private Zero obj_LoginCompleted (Object Sender, SnaprintWebserviceReferance.LoginCompletedEventArgs e) {label1.Text = e.Result; }  


Comments