Skip to main content

Posts

Code to embed an image in e-mail

In this code we will learn how to embed an image in mail using VB.NET. Public Sub SendMail(ByVal message As String)         Dim vars As Variables         Dim myHtmlMessage As MailMessage         Dim mySmtpClient As SmtpClient         Dim retVal As Int32 = -1         myHtmlMessage = New MailMessage()         Dim FromAddress As String         Dts.VariableDispenser.LockOneForWrite("from", vars)         FromAddress = vars("from").Value.ToString().Trim()         vars.Unlock()         Dim ToAddress As String         Dts.VariableDispenser.LockOneForWrite("to", vars)     ...

Sending email in SSIS using script task

Sending mail using script task. We can send email with attachments and also either in text format or in HTML format Public Sub SendMail(ByVal message As String)         Dim vars As Variables         Dim myHtmlMessage As MailMessage         Dim mySmtpClient As SmtpClient            myHtmlMessage = New MailMessage()         Dim FromAddress As String         Dts.VariableDispenser.LockOneForWrite("from", vars)         FromAddress = vars("from").Value.ToString().Trim()         vars.Unlock()         Dim ToAddress As String         Dts.VariableDispenser.LockOneForWrite("to", vars)       ...

ASP.NET Cache dependency example

In this article we will learn how to implement file dependency in caching. In this method the cache["messageDependency"]  loads the file "DependencyFile.txt" in memory(cache) only when its content is changed in the disk. public void displayMessage() {          String message;          String Path = "~/DependencyFile.txt";          if (Cache["messageDependency"] == null)          {                   System.IO.StreamReader sReader = new StreamReader(Server.MapPath(Path));                   message = sReader.ReadToEnd();                   sReader.Close();                   System.Web.Caching.CacheDependency msgDependency = new System.Web.Caching.CacheDependency(Server.MapPath(Pat...

Explore Kaazing Websocket in .Net

Introduction Kaazing WebSocket Gateway provides full duplex web communication. It provides an alternate way of communication from server to client for “polling” or “long-polling”. WebSocket WebSocket is a full-duplex single socket connection over which messages can be sent between a client and a server. The WebSocket standard simplifies much of the complexity around bi-directional web communication and connection management. Kaazing WebSocket Kaazing WebSocket Gateway is an HTML5-compliant WebSocket server with support to today's pre-HTML5 browsers. The Gateway provides a bridge between WebSocket clients and your back-end systems, servers, and applications. This enables you to implement your own custom protocol or run an existing protocol over WebSocket. Installing Kaazing WebSocket 1.         Kaazing WebSocket can be installed in Windows 7, Windows Vista, Windows XP SP3 2.         Down...