Schedule Email Through ASP.NET or Schedule Tasks Using ASP.NET

// Inside Global.ascx void Application_Start(object sender, EventArgs e) { // Code that runs on application startup System.Timers.Timer myTimer = new System.Timers.Timer(); // Set the Interval to 5 seconds (5000 milliseconds). myTimer.Interval = 5000; myTimer.AutoReset = true; myTimer.Elapsed += new ElapsedEventHandler(myTimer_Elapsed); myTimer.Enabled = true; } public void myTimer_Elapsed(object source, System.Timers.ElapsedEventArgs e) { // use your mailer code clsScheduleMail objScheduleMail […]

FCM (Firebase Cloud Messaging) Push Notification with Asp.Net

public class Notification { private string serverKey = “kkkkk”; private string senderId = “iiddddd”; private string webAddr = “https://fcm.googleapis.com/fcm/send”; public string SendNotification(string DeviceToken, string title ,string msg ) { var result = “-1”; var httpWebRequest = (HttpWebRequest)WebRequest.Create(webAddr); httpWebRequest.ContentType = “application/json”; httpWebRequest.Headers.Add(string.Format(“Authorization: key={0}”, serverKey)); httpWebRequest.Headers.Add(string.Format(“Sender: id={0}”, senderId)); httpWebRequest.Method = “POST”; var payload = new { to = DeviceToken, priority […]

1 6 7 8