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

by Rahul 7/18/2008 7:26: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 10:32: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 10:29: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 10:25: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 10:17: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 3:32:21 PM
...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 1:04:01 PM
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 7:57: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


Firefox 3 - Here comes the reason number #11

by rahul 7/1/2008 3:26:54 AM
Well here are the top 10 reasons, and today for the first time, I noticed that in Firefox 3 they have made the location bar even more robust. A little bit of story before I show the screen-shot… my 2 year old really likes some web pages, specially this one… Abracadabra. Today, she asked me to play this song, and unfortunately I didn’t have it bookmarked. Now… if you have dealt with tantrum-throwing 2 year olds, you would realize how time could be of importance. She was on the verge of getting... [More]


Rahul Soni

Rahul Soni  Twitter

 LinkedIn

 Facebook

 Email me



Vivek Kumbhar

Vivek Kumbhar  Twitter

 LinkedIn

 Facebook

 Email me


Stack Exchange

profile for Vivek at Server Fault, Q&A for system administrators and IT professionals

profile for Rahul Soni at Stack Overflow, Q&A for professional and enthusiast programmers

Calendar

<<  February 2012  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
2728291234
567891011

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 2012, Rahul Soni

Powered by BlogEngine.NET 1.4.5.0