Advertisement
Guest User

Untitled

a guest
Sep 6th, 2016
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. [WebInvoke(Method = "POST", ResponseFormat = WebMessageFormat.Json,
  2. RequestFormat = WebMessageFormat.Json, UriTemplate = "login", BodyStyle = WebMessageBodyStyle.WrappedRequest)]
  3. [OperationContract]
  4. string login(string username, string password);
  5.  
  6. public string login(string username, string password)
  7. {
  8. string str = String.Empty;
  9. if (username == "admin" && password == "admin")
  10. str = "Success";
  11. else
  12. str = "Invalid";
  13. return str;
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement