ASP.NET:How to write error messages into a text file using a simple httpModule

by Rahul 7/18/2008 12:14:11 PM
In one of my previous posts, I mentioned about how to troubleshoot some issues with the use of a module. In this post, I will show you how a similar module could be of use when you want to log all the errors in a text file for troubleshooting purposes. Please ensure that C:\Temp folder has Write access for the account that is running the IIS Worker Process. Here is the code for the module... using System; using System.Collections.Generic; using System.Text; using System.Web; using System.IO;... [More]


Logparser Scenario 8:Find out what is the peak time for your IIS Server

by Rahul 7/16/2008 3:20:22 AM
This post is a continuation of this article. Scenario 8:Find out what is the peak time for your IIS Server How can you find out what is the peak time (peak hour) for your Website using Logparser? Answer: Logparser "SELECT quantize(time,60), count(*) as Frequency from ex080716.log GROUP BY quantize(time,60) order by quantize(time, 60)" -rtp:-1 Here is a brief snapshot of my LogFile... And here is the output... QUANTIZE(time, 60) Frequency ------------------ --------- 02:37:00   &n... [More]


Logparser Scenario 7:Checking the traffic/requests between a specific client and server

by Rahul 7/16/2008 3:17:14 AM
This post is a continuation of this article. Scenario 7: Checking the traffic/requests between a specific client and server Why would you do it in the first place? You may want to troubleshoot an authenticate issue for that specific client for the error that s/he reported to you. May be that's why! Answer: Logparser "select date, time, c-ip, cs-username, s-sitename, s-computername, s-ip, s-port, cs-method, cs-uri-stem, cs-uri-query, sc-status, sc-substatus,sc-win32-status, sc-bytes, cs-bytes, ti... [More]


Logparser Scenario 6:Searching files for culprits when you don't have Visual Studio on the Server

by Rahul 7/16/2008 3:13:12 AM
This post is a continuation of this article. Scenario 6: Searching for any specific text in all the files of a folder. A small background of the problemRecently we saw a very interesting problem. Users of a web-site were seeing other user's data in ASP.NET. There is cool blog entry about it by Jerry Orman where he talks about how to go about troubleshooting these issues. The Step 2 in his entry mentions about use of Caching. The customer didn't have much idea about the code (although it was pres... [More]


Log parser 2.2:How can you use Log Parser for analyzing IIS Log files.

by Rahul 7/16/2008 3:05:49 AM
I have written an article on Log parser a while ago at Log Parser 2.2 and ASP.NET. Please read it before you continue on this post... Here are some of the other scenarios in which you could use it... Scenario 5: Analyzing the IISlogs to see if there is any pattern for errors A small background of the problemYou are using Microsoft Internet Information Services (IIS) 6, have a few Web sites, and you are using COM components in a lot of your webpages. Now, somehow you find that there are quite a ... [More]


Run a batch file as a specific User (or Administrator) from ASP.NET...

by Rahul 7/13/2008 8:20:21 AM
...well first of all, I am NOT recommending it, but sometimes it could be necessary! Now, let's proceed to the code... 1. Create a page called RunBatchFile.vb and paste the following...Imports System.Diagnostics Imports System.IO Partial Class RunBatchFile Inherits System.Web.UI.Page Dim _password As New System.Security.SecureString Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load Dim password As String 'Read from any R... [More]


How to use httpModules to troubleshoot your ASP.NET application

by Rahul 7/13/2008 5:52:01 AM
No matter how many things you keep in mind before developing an application, when once they are put in production... quite often you will see something not behaving the way you expected. Many-a-times, the applications would throw an error which you can troubleshoot depending on the error message you found. In this post, my intention is not to cover those "error" scenarios. I intend to cover something which is more problematic to troubleshoot... like intermittent slowness in some pages, or some e... [More]


Firefox 3 - Is it too slow to open when you boot your PC?

by Rahul 7/13/2008 12:45:01 AM
Of late, I have seen Firefox 3 taking a long time to open when my PC boots up. The subsequent boot-ups are fine. I tried a few suggestions after googling the issue on net. But here is what worked best for me... (I unchecked all these checkboxes below, and things are much better now!!!) Hope that helps someone...RahulQuote of the day: A celebrity is a person who works hard all his life to become well known, then wears dark glasses to avoid being recognized. - Fred Allen


Search


Tags



Categories

Calendar

<<  March 2010  >>
MoTuWeThFrSaSu
22232425262728
1234567
891011121314
15161718192021
22232425262728
2930311234

View posts in large calendar

All Items
Sign in

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
© Copyright 2010, Rahul Soni

Powered by BlogEngine.NET 1.4.5.0