Monday, 30 September 2013

How to: Install an Assembly into the Global Assembly Cache

To install a strong-named assembly into the global assembly cache using the Global Assembly Cache tool (Gacutil.exe)

 1. Goto your Visual Studio Command Prompt, right click and Run as Administrator

 2. Now You can see your Command prompt Window will appear., go to your source path of Dll, like bin directory of your Project

3. Now type Gacutil /i <Dll Name>.dll



The following steps installs an assembly into the global assembly cache.


Saturday, 28 September 2013

How to configure mail Settings in asp.net through SMTP

public void sendmail()
    {
        MailMessage msg = new MailMessage();
//From Address
        msg.From = new MailAddress(“abc@abc.com”);
//To Address
        msg.To.Add(“xyz@xyz.com”);
// Your  message Subject
        msg.Subject = “Your Message Subject”;
//Your message Body
        msg.Body = “Your Message Body”;

        msg.IsBodyHtml = true;
        SmtpClient smtpClient = new SmtpClient();
//Please write your DNS name instead of abc.com

        smtpClient.Host = “smtp.abc.com”;
//either you select port 25 or 587 as per your requirement
       smtpClient.Port = 25;
        smtpClient.EnableSsl = false;
        smtpClient.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;

        smtpClient.Credentials = new NetworkCredential(msg.From.ToString(), “your password”);
// For Maximum timeout
        smtpClient.Timeout = 20000;
        smtpClient.Send(msg);
    }