[Solved] How do I email the stringbuilder class output using C# [closed]

Thanks Vladimir Arustamian for the research pointer…this is my solution… StringBuilder errMsg = new StringBuilder(); errMsg.AppendLine(); errMsg.AppendLine(“*************************”); errMsg.AppendLine(“TimeStamp: ” + System.DateTime.Now.ToString()); errMsg.AppendLine(errorMessage); errMsg.AppendLine(“*************************”); sw.WriteLine(errMsg.ToString()); System.Net.Mail.MailMessage message = new System.Net.Mail.MailMessage(); message.To.Add(System.Configuration.ConfigurationManager.AppSettings[“siteAdmin”]); message.Subject = “Failure”; message.From = new System.Net.Mail.MailAddress(“[email protected]”); message.Body = errMsg.ToString(); System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient(“smtp.support.com”); smtp.Send(message); solved How do I email the stringbuilder class output … Read more

[Solved] methods that give error [closed]

I missed that this method start with get_ Here is right answer. Just find “this HttpConfiguration” on entire solution. You can find extension method named start with “get_” If this solution not work.. find “this IDisposable” on entire solution. because HttpConfiguration class is implement of IDisposable 2 solved methods that give error [closed]

[Solved] why web.config has predefined tags? [closed]

Web.Config itself is written in XML format right? Yes, but in addition to that it has an XML schema associated and the Configuration class which is responsible to read values from this XML file verifies that the schema is being respected. You should make the distinction between well formed XML and valid XML according to … Read more

[Solved] Asp.net dynamic User and activity based authorisation mixed with hide show site master html

You should switch from role based authentication to claims based authentication. Here’s an article describing the basics of claims based authentication: http://dotnetcodr.com/2013/02/11/introduction-to-claims-based-security-in-net4-5-with-c-part-1/ Claims will give you fine grained control over the rights for each individual user. ClaimsPrincipal can also be used in webforms: https://visualstudiomagazine.com/articles/2013/09/01/going-beyond-usernames-and-roles.aspx An attribute can be applied to pages and methods in an … Read more