A
anoop m
Guest
Hello,
I have created a ASP.Net Web forms Website in which forms authentication is done
FormsAuthenticationTicket tkt;
string cookiestr;
HttpCookie ck;
tkt = new FormsAuthenticationTicket(1, txtuserid.Text, DateTime.Now,
DateTime.Now.AddMinutes(30), false, "your custom data");
cookiestr = FormsAuthentication.Encrypt(tkt);
ck = new HttpCookie(FormsAuthentication.FormsCookieName, cookiestr);
//if (chkPersistCookie.Checked)
// ck.Expires = tkt.Expiration;
ck.HttpOnly = true;
ck.Secure = true;
ck.Path = FormsAuthentication.FormsCookiePath;
Response.Cookies.Add(ck);
moreover - Salted MD5 is implemented for hashing the password with md5 and server side random number on ASPX and same process in ASPX.cs and checking the password for any tampering in server side. (every time a different hash of the password is transferred from client to server)
Now I want to create a web api that is to be used by Android App for authentication into the website. How can I do it, Is there a some other way.
Thanks
Anoop Mathur
Continue reading...
I have created a ASP.Net Web forms Website in which forms authentication is done
FormsAuthenticationTicket tkt;
string cookiestr;
HttpCookie ck;
tkt = new FormsAuthenticationTicket(1, txtuserid.Text, DateTime.Now,
DateTime.Now.AddMinutes(30), false, "your custom data");
cookiestr = FormsAuthentication.Encrypt(tkt);
ck = new HttpCookie(FormsAuthentication.FormsCookieName, cookiestr);
//if (chkPersistCookie.Checked)
// ck.Expires = tkt.Expiration;
ck.HttpOnly = true;
ck.Secure = true;
ck.Path = FormsAuthentication.FormsCookiePath;
Response.Cookies.Add(ck);
moreover - Salted MD5 is implemented for hashing the password with md5 and server side random number on ASPX and same process in ASPX.cs and checking the password for any tampering in server side. (every time a different hash of the password is transferred from client to server)
Now I want to create a web api that is to be used by Android App for authentication into the website. How can I do it, Is there a some other way.
Thanks
Anoop Mathur
Continue reading...