Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public HttpResponseMessage<lightUserInfo> Post(LogOnModel model)
- {
- if (ModelState.IsValid)
- {
- if (Membership.ValidateUser(model.UserName, model.Password))
- {
- MembershipUser user = Membership.GetUser(model.UserName);
- var userinfo = new lightUserInfo(user);
- return new HttpResponseMessage<lightUserInfo>(userinfo);
- }
- }
- }
- $.ajax
- url: Meshable.rooturl + "/api/authentication"
- data: JSON.stringify authenticationDetails
- dataType: "json"
- type: "POST"
- contentType: 'application/json; charset=utf-8'
- error: (e) ->
- success: (data) ->
- #data comes in as empty {}
- using System.Runtime.Serialization;
- [DataContract]
- public class UserInfo
- {
- [DataMember]
- public string mystr {get; set;}
- }
Add Comment
Please, Sign In to add comment