4

How do I know what are all the Javascript and CSS files is called by the clients from IIS server? Can this be done via httpmodule?

Basically what I want to know is that when the client is accessing the server i want to know what are the files that are consumed mostly along with their size and time taken to serve the request.

pete the pagan-gerbil
  • 3,136
  • 2
  • 28
  • 49
Kashif Khan
  • 685
  • 2
  • 11
  • 30

1 Answers1

2

I think the quickest way to do this is like this: In IIS Management console, make sure logging is enabled, and set it to the place you want. After a short delay, the log files will appear, import them to a database and start analyzing. You can choose which fields you want to save.

Alternatively if you want to have more control and do this in real time, you could create a handler or module, but you will also have to make sure all requests, including static content, go through the asp processor, which will create quite some overhead. Very much not recommended for dev time and performance, but it will work.

Leo Muller
  • 1,421
  • 1
  • 12
  • 20
  • Can you please elaborate on how to import the iis logs into database? – Kashif Khan Oct 18 '15 at 04:12
  • 1
    Locate where the files are stored, and from you database management software do a data import. I believe the log files are tab delimited. If you are using MSSQL, then in SQL Server Management Studio right click your database, tasks > import data. which will start the import wizard. Choose 'Flat file source' under data source, and go through the rest of the options. In my experience there are a few stumbleblocks, the main one being the default text size of 50 which you should change to 255 in order to avoid an error message of data being too large. – Leo Muller Oct 19 '15 at 05:07