When you have an application that is not performing as you anticipated and you want to know what is going on that where you may need .Net Profiler.
Profiling gathers information about an executing application, allowing you to determine those improvements that are required in your application. There are many good reason why you should bother profiling your .NET code and some of those are
This post gives a full example of how to build your own custom retry logic for the HttpClient object in the .NET framework. The retry logic covered in this post extends on the Transient Fault Application block, which is a package provided by Microsoft, allowing code to apply retry logic when making a request to an external resource. The application block provides out of the box retry strategies to easily work with a number of Microsoft technologies, such as Microsoft Azure Table Storage, Sql Azure, Azure Service Bus and others.
To use Inline Image in your email, your mail should use HTML format and refer to the images using the collection of Linked Resources, like so. The benefit of this approach over the use of the Attachments collection is that the linked images do not appear in the mail client’s list of attachments for the mail.
static void Main(string args)
MailMessage mail = new MailMessage();
mail.From = new MailAddress("firstname.lastname@example.org");
mail.Subject = "Linked Resource";
mail.Body = "<html><body><table><tr><td>Image goes here: </td></tr><tr><td><img src=\"cid:photo\"></td></tr></table></body></html>";
mail.IsBodyHtml = true;
LinkedResource imageResourceEs = new LinkedResource(@"imagepath\p2.jpg", "image/jpeg");
imageResourceEs.ContentId = "photo";
imageResourceEs.TransferEncoding = System.Net.Mime.TransferEncoding.Base64;
AlternateView htmlview = default(AlternateView);
htmlview = AlternateView.CreateAlternateViewFromString(mail.Body, null, "text/html");
using (SmtpClient mailClient = new SmtpClient("smtpserver"))