A Place for C Sharpers/.Netters

I Will do coding till last moment of life-Kiran Patil

Archive for the ‘IIS’ Category

Debug Your ASP.NET Application that Hosted on IIS

Posted by kiranpatils on January 13, 2011

Challenge:

One of my friend asked me that how we can debug Website which is hosted on IIS? The answer was quite simple and I am using it since so long. But I thought I should document it and that’s why putting the information on this blog. So when you guys need to do this, you can do it!

Solution:

First I thought to write my own article. But suddenly thought some one might have already written on this, and I found following nice article:

http://www.codeproject.com/KB/aspnet/ProcessAttache.aspx#9

Article is so nice — Good Job Blog Author!

Just two things I would like to add to it which is as below:

  1. Shortcut for Attach to process menu is CTRL + ALT + P.
  2. If you are using windows XP then you will not find “w3wp.exe“. You will find “aspnet_wp.exe

If you found this post helpful say thanks to CodeProject article author.

Happy Debugging! :-)

Posted in ASP.NET, IIS | Leave a Comment »

How to calculate bandwidth used by website hosted in IIS?

Posted by kiranpatils on September 17, 2008

Problem With Solution:

I need to calculate total bandwidth consumed by a website daily which is hosted on IIS. I was thinking to use urchin but can’t make it. Then after some googling I found the way and here it is:

  1. IIS Log files. Stored on

IIS 6.0 and later have request logging enabled by default. The default location for these logs is:

IIS 6.0: %windir%\System32\LogFiles\W3SVC<SiteID>

IIS 7.0: %systemDrive%\Inetpub\logfiles

2. Log Parser 2.2 – A versatile tool by micro. For fetching information from log files [I have used its COM component LogParser.dll]

So you want some reference:

Here are the good links which I would like to share:

http://microsoft.apress.com/asptodayarchive/73567/accessing-iis-log-information-to-analyse-site-metricsBasic about configuring Log files.

http://www.microsoft.com/downloads/details.aspx?FamilyID=890cd06b-abf8-4c25-91b2-f8d975cf8c07&displaylang=enLog parser tool for download.

http://www.msexchange.org/tutorials/Using-Logparser-Utility-Analyze-ExchangeIIS-Logs.html good article for Log parser introduction.

http://www.microsoft.com/technet/prodtechnol/WindowsServer2003/Library/IIS/676400bc-8969-4aa7-851a-9319490a9bbb.mspx?mfr=trueW3C Log file format.

http://books.google.co.in/books?id=vnIXo-yUT2gC&pg=PA45&lpg=PA45&dq=bytes+sent%2Bbytes+received/time+taken&source=web&ots=B3-yyUy3Ua&sig=j9VrhIVukqsIZC2KW8kwrX3eZxY&hl=en&sa=X&oi=book_result&resnum=2&ct=result#PPA46,M1Really Great book you must have this [Don’t miss Page # 57]

http://www.codeproject.com/KB/recipes/SimpleLogParse.aspxHow to create program using COM Component. [C#.NET]

http://blogs.iis.net/chrisad/archive/2006/07/13/Chris.aspx More on Log parser

http://www.iis.net/default.aspx?tabid=2&subtabid=26&i=36 — PPT

Try to implement it…if don’t make out of it do write me comment I will post my sample project here…so you can quick start….but don’t write comment without trying…it will be good fun!

What other things you can achieve using it..

  • Top browsers accessing your Websites
  • Hits by Hour
  • Request by URI
  • Top 10 Images by Size
  • Top 10 URLs for a website with some interesting data to support you
  • Top 20 clients using your website
  • Status code
  • And you can also generate Charts.

ALL THE BEST!!

Posted in ASP.NET, IIS | Tagged: | 3 Comments »

 
Follow

Get every new post delivered to your Inbox.

Join 102 other followers