Posted by: jwalin on: March 6, 2008
In web.config file put the following code to send an email
<healthMonitoring>
<providers>
<add name=“ApplicationMailEventProvider“ type=“System.Web.Management.SimpleMailWebEventProvider,System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a“ from=noreply@company.com to=jkhatri@company.com” bodyHeader=“Error raised to ApplicationCriticalMailEventProvider“ subjectPrefix=“ERROR:“ buffer=“true“ bufferMode=“Critical Notification“ maxEventLength=“4096“ maxMessagesPerNotification=“1“/> </providers><rules>
<add name=“Application Request Processing Errors“ eventName=“Request Processing Errors“ provider=“ApplicationMailEventProvider“ profile=“Default“/>
<add name=“Application Infrastructure Errors“ eventName=“Infrastructure Errors“ provider=“ApplicationMailEventProvider“ profile=“Critical“/>
</rules>
</healthMonitoring>
</system.web>
Posted by: jwalin on: December 13, 2007
you can get the IIS Version programically by using following way. If you are using Windows 2003 or Windows Vista then you can get by using
DirectoryEntry dirRoot = new DirectoryEntry(IISRoot);
DirectoryEntry child = dirRoot.Children.Find(“Info”, “IIsWebInfo”);
foreach (PropertyValueCollection c in child.Properties)
{
if (string.Compare(c.PropertyName, “MajorIIsVersionNumber”, StringComparison.CurrentCultureIgnoreCase) == 0)
{
return Convert.ToInt16(c.Value, CultureInfo.InvariantCulture);
}
}
But if you are using windows XP then It is difficult [...]
Posted by: jwalin on: December 13, 2007
ASP.NET 2.0 Tips, Tricks, Recipes and Gotchas By ScottGu
http://weblogs.asp.net/scottgu/pages/ASP.NET-2.0-Tips_2C00_-Tricks_2C00_-Recipes-and-Gotchas.aspx
Posted by: jwalin on: December 13, 2007
Creating Packaged ASP.NET Setup Programs with VS 2005
http://weblogs.asp.net/scottgu/archive/2007/06/15/tip-trick-creating-packaged-asp-net-setup-programs-with-vs-2005.aspx
Posted by: jwalin on: December 13, 2007
Tip/Trick: How to upload a .SQL file to a Hoster and Execute it to Deploy a SQL Database
http://weblogs.asp.net/scottgu/archive/2007/01/11/tip-trick-how-to-upload-a-sql-file-to-a-hoster-and-execute-it-to-deploy-a-sql-database.aspx