Posts

Showing posts from December, 2015

jQuery UI Modal dialog caching Issue

By default jQuery UI modal dialog cache the html content. There will not be any issue if it is static content but if the html content is dynamic there will be an issue with the html element changes/control values. To avoid this issue we have to stop caching. The following meta tags will do this. <meta http-equiv="cache-control" content="max-age=0" /> <meta http-equiv="cache-control" content="no-cache" /> <meta http-equiv="expires" content="0" /> <meta http-equiv="expires" content="Tue, 01 Jan 1980 1:00:00 GMT" /> <meta http-equiv="pragma" content="no-cache" />

SMTP Timeout Error with C# code in SharePoint

Recently we have come across with SMTP timeout issue in all SharePoint applications. Due to this Workflows became error occurred and Timer jobs got failed. You know workflows are very critical to business and also if background operations does not complete at specific time it may become critical to business. Then we have implemented following quick fix. SmtpClient client=new SmtpClient(); client.Host = smtpserver; client.ServicePoint.MaxIdleTime = 0; client.ServicePoint.ConnectionLimit = 1; client.Timeout = 10000000; client.Send(newEmail); Alternatively we can also use asynchronous option as specified in the below blog. http://www.codeproject.com/Articles/667461/Send-asynchronous-mail-using-asp-net