Browsed by
Category: .Net

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

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 = new clsScheduleMail(); objScheduleMail.SendScheduleMail(); } https://www.codeproject.com/Articles/49996/Schedule-Email-Through-ASP-NET-or-Schedule-Tasks-U

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

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 = “high”, content_available = true, notification = new { body = msg, title = title }, }; var serializer = new JavaScriptSerializer();…

Read More Read More

Social media & sharing icons powered by UltimatelySocial