I needed to decrypt ASP.Net membership provider user password. These password are stored in [dbo].[aspnet_Membership] database. I wrote below code to do the decryption for me . using System; using System.Text; using System.Web.Security; namespace RetreivePassword { public class NetFourMembershipProvider : SqlMembershipProvider { public string GetClearTextPassword(string encryptedPwd) { byte[] encodedPassword = Convert.FromBase64String(encryptedPwd); byte[] bytes = this.DecryptPassword(encodedPassword); […]

Read More →

// POST api/<controller> public void Post(Mail value) { var msg = new MailMessage { From = new MailAddress(value.FromAddress), Subject = value.Subject, Body = value.Body }; msg.To.Add(“emailaddress@domain.com”); try { SendMail(msg); } catch (Exception ex) { var r = ex.Message; } } public static void SendMail(MailMessage Message) { SmtpClient client = new SmtpClient(); client.Host = “smtp.googlemail.com”; client.Port […]

Read More →