473,398 Members | 2,368 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

asp.net errors in iis log

I would like to write a program that finds all asp.net errors in iis logs?
what characteristics should i look for? (a line in the log that has the
error?)
what about sql errors?

Thanks in advance,

Aaron
Jul 21 '05 #1
6 1792
Check out Log Parser 2.2
http://www.microsoft.com/technet/scr...r/default.mspx

A little tweaking of the sample scripts provided should get you what you want.

A sample for a console application is at:
http://samples.gotdotnet.com/quickst...c/LogInfo.aspx

Samples for ASP.NET applications are at :
http://www.aspheute.com/english/20000811.asp
and
http://www.rassoc.com/gregr/weblog/a....aspx?post=570

It shouldn't be too difficult to tweak them to get what you're looking for.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Aaron" <ku*****@yahoo.com> wrote in message news:OX**************@TK2MSFTNGP15.phx.gbl...
I would like to write a program that finds all asp.net errors in iis logs? what
characteristics should i look for? (a line in the log that has the error?)
what about sql errors?

Thanks in advance,

Aaron

Jul 21 '05 #2
what's the difference between IIS log and Events log?

Can I use this method to find ASP errors too?

Note: I want to be able to categorize asp, asp.net and sql errors. Not just
all errors.

Aaron
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:OV**************@TK2MSFTNGP12.phx.gbl...
Check out Log Parser 2.2
http://www.microsoft.com/technet/scr...r/default.mspx

A little tweaking of the sample scripts provided should get you what you
want.

A sample for a console application is at:
http://samples.gotdotnet.com/quickst...c/LogInfo.aspx

Samples for ASP.NET applications are at :
http://www.aspheute.com/english/20000811.asp
and
http://www.rassoc.com/gregr/weblog/a....aspx?post=570

It shouldn't be too difficult to tweak them to get what you're looking
for.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Aaron" <ku*****@yahoo.com> wrote in message
news:OX**************@TK2MSFTNGP15.phx.gbl...
I would like to write a program that finds all asp.net errors in iis logs?
what characteristics should i look for? (a line in the log that has the
error?)
what about sql errors?

Thanks in advance,

Aaron


Jul 21 '05 #3
SQL Server does not write anything into the IIS log.

SQL Server logs either to the Application Log (Event Log), or its own log
located in Program Files\Microsoft SQL Server\Mssql\Log folder (by
default). The name of the file is ErrorLog.
--
Regards,
Kristofer Gafvert (IIS MVP)
www.gafvert.info - My Articles and help
www.ilopia.com
Aaron wrote:
what's the difference between IIS log and Events log?

Can I use this method to find ASP errors too?

Note: I want to be able to categorize asp, asp.net and sql errors. Not just all errors.
Aaron
"Juan T. Llibre" <no***********@nowhere.com> wrote in message

news:OV**************@TK2MSFTNGP12.phx.gbl...
Check out Log Parser 2.2
http://www.microsoft.com/technet/scr...r/default.mspx

A little tweaking of the sample scripts provided should get you what you > want.
A sample for a console application is at:
http://samples.gotdotnet.com/quickst...c/LogInfo.aspx

Samples for ASP.NET applications are at :
http://www.aspheute.com/english/20000811.asp
and
http://www.rassoc.com/gregr/weblog/a....aspx?post=570

It shouldn't be too difficult to tweak them to get what you're looking

for.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Aaron" <ku*****@yahoo.com> wrote in message >

news:OX**************@TK2MSFTNGP15.phx.gbl...
I would like to write a program that finds all asp.net errors in iis logs? >>what characteristics should i look for? (a line in the log that
has the >>error?) what about sql errors?

Thanks in advance,

Aaron


Jul 21 '05 #4
re:
what's the difference between IIS log and Events log?
IIS has its own set of logs, in the directory %windir%\system32\LogFiles.

There, you'll find logs for HttpErr, Shutdown, SMTP services
( if you're running an SMTP service ) and W3C Services ( web logs ).

The Event Logs are stored at %windir%\System32\Config

As Kristofer already posted, SQL Server logs either to the
Application Log (Event Log), or its own log located in
Program Files\Microsoft SQL Server\Mssql\Log folder
(by default). The name of the file is ErrorLog.

Log Parser can read any of those files, and parse and create reports from them.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Aaron" <ku*****@yahoo.com> wrote in message news:uh**************@TK2MSFTNGP12.phx.gbl... what's the difference between IIS log and Events log?

Can I use this method to find ASP errors too?

Note: I want to be able to categorize asp, asp.net and sql errors. Not just all errors.

Aaron
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:OV**************@TK2MSFTNGP12.phx.gbl...
Check out Log Parser 2.2
http://www.microsoft.com/technet/scr...r/default.mspx

A little tweaking of the sample scripts provided should get you what you want.

A sample for a console application is at:
http://samples.gotdotnet.com/quickst...c/LogInfo.aspx

Samples for ASP.NET applications are at :
http://www.aspheute.com/english/20000811.asp
and
http://www.rassoc.com/gregr/weblog/a....aspx?post=570

It shouldn't be too difficult to tweak them to get what you're looking for.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Aaron" <ku*****@yahoo.com> wrote in message
news:OX**************@TK2MSFTNGP15.phx.gbl...
I would like to write a program that finds all asp.net errors in iis logs? what
characteristics should i look for? (a line in the log that has the error?)
what about sql errors?

Thanks in advance,

Aaron



Jul 21 '05 #5
I'm not sure about asp.net as it has its own error handling routine and only
log status code and minor info in IIS.
Unlike ASP engine, which it logs more info in the IIS log file. I wrote this
chapter in the Log Parser 2.2 book.
Chap2 - Monitoring IIS
http://www.iis-resources.com/downloads/LPChap2.zip

from:
----
Under normal circumstances, these type of errors are often caused by coding
error in the server-side query, for example, |12|800a0009|
Subquery_out_of_range:_'arrayA(...)'. This error indicates that the arrayA
defined in in a server-side query is out of range. The format normally
starts with a pipe character followed by a line number, another pipe
separator, the error code, and finally one last pipe separator with an ASP
error message.

----

and here's the query for parsing ASP 500 related error.
---Ch02AspErrors.sql---

SELECT

Uri, Errorcode, ErrorMsg, LineNo, Total

USING STRCAT(cs-uri-stem, REPLACE_IF_NOT_NULL(cs-uri-query, STRCAT('?',
cs-uri-query))) AS QryStr,

TO_LOWERCASE(EXTRACT_TOKEN(QryStr, 0, '|')) AS Uri,

EXTRACT_TOKEN(cs-uri-query, 2, '|') AS ErrorCode,

EXTRACT_TOKEN(cs-uri-query, -1, '|') AS ErrorMsg,

EXTRACT_TOKEN(cs-uri-query, 1, '|') AS LineNo,

COUNT(*) AS Total

FROM %source%

WHERE

(cs-uri-stem LIKE '%.asp')

AND

(sc-status = 500)

GROUP BY Uri, ErrorCode, ErrorMsg, LineNo

ORDER BY Total DESC

---Ch02AspErrors.sql---


--
Regards,
Bernard Cheah
http://www.microsoft.com/iis/
http://www.iiswebcastseries.com/
http://www.msmvps.com/bernard/
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:OV**************@TK2MSFTNGP12.phx.gbl...
Check out Log Parser 2.2
http://www.microsoft.com/technet/scr...r/default.mspx

A little tweaking of the sample scripts provided should get you what you
want.

A sample for a console application is at:
http://samples.gotdotnet.com/quickst...c/LogInfo.aspx

Samples for ASP.NET applications are at :
http://www.aspheute.com/english/20000811.asp
and
http://www.rassoc.com/gregr/weblog/a....aspx?post=570

It shouldn't be too difficult to tweak them to get what you're looking
for.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Aaron" <ku*****@yahoo.com> wrote in message
news:OX**************@TK2MSFTNGP15.phx.gbl...
I would like to write a program that finds all asp.net errors in iis logs?
what characteristics should i look for? (a line in the log that has the
error?)
what about sql errors?

Thanks in advance,

Aaron


Jul 21 '05 #6
Thanks for sharing this material, Bernard!

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Bernard Cheah [MVP]" <qb******@hotmail.com.discuss> wrote in message
news:eZ**************@TK2MSFTNGP14.phx.gbl...
I'm not sure about asp.net as it has its own error handling routine and only log status
code and minor info in IIS.
Unlike ASP engine, which it logs more info in the IIS log file. I wrote this chapter in
the Log Parser 2.2 book.
Chap2 - Monitoring IIS
http://www.iis-resources.com/downloads/LPChap2.zip

from:
----
Under normal circumstances, these type of errors are often caused by coding error in the
server-side query, for example, |12|800a0009| Subquery_out_of_range:_'arrayA(...)'. This
error indicates that the arrayA defined in in a server-side query is out of range. The
format normally starts with a pipe character followed by a line number, another pipe
separator, the error code, and finally one last pipe separator with an ASP error
message.

----

and here's the query for parsing ASP 500 related error.
---Ch02AspErrors.sql---

SELECT

Uri, Errorcode, ErrorMsg, LineNo, Total

USING STRCAT(cs-uri-stem, REPLACE_IF_NOT_NULL(cs-uri-query, STRCAT('?',
cs-uri-query))) AS QryStr,

TO_LOWERCASE(EXTRACT_TOKEN(QryStr, 0, '|')) AS Uri,

EXTRACT_TOKEN(cs-uri-query, 2, '|') AS ErrorCode,

EXTRACT_TOKEN(cs-uri-query, -1, '|') AS ErrorMsg,

EXTRACT_TOKEN(cs-uri-query, 1, '|') AS LineNo,

COUNT(*) AS Total

FROM %source%

WHERE

(cs-uri-stem LIKE '%.asp')

AND

(sc-status = 500)

GROUP BY Uri, ErrorCode, ErrorMsg, LineNo

ORDER BY Total DESC

---Ch02AspErrors.sql---


--
Regards,
Bernard Cheah
http://www.microsoft.com/iis/
http://www.iiswebcastseries.com/
http://www.msmvps.com/bernard/
"Juan T. Llibre" <no***********@nowhere.com> wrote in message
news:OV**************@TK2MSFTNGP12.phx.gbl...
Check out Log Parser 2.2
http://www.microsoft.com/technet/scr...r/default.mspx

A little tweaking of the sample scripts provided should get you what you want.

A sample for a console application is at:
http://samples.gotdotnet.com/quickst...c/LogInfo.aspx

Samples for ASP.NET applications are at :
http://www.aspheute.com/english/20000811.asp
and
http://www.rassoc.com/gregr/weblog/a....aspx?post=570

It shouldn't be too difficult to tweak them to get what you're looking for.

Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"Aaron" <ku*****@yahoo.com> wrote in message
news:OX**************@TK2MSFTNGP15.phx.gbl...
I would like to write a program that finds all asp.net errors in iis logs? what
characteristics should i look for? (a line in the log that has the error?)
what about sql errors?

Thanks in advance,

Aaron



Jul 21 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: mikey_boy | last post by:
Hello! Curious if anyone could give me a hand. I wrote this PHP script with makes a simple connection to a mysql database called firstdb and just pulls back the results and displays on the...
2
by: Trev | last post by:
SQL Server 2000 BE, Access 2002 FE. I want to write a stored procedure, that will among other things log errors to a table, I want to be able to report a summary of work done and errors to the...
10
by: Douglas Buchanan | last post by:
I am using the following code instead of a very lengthly select case statement. (I have a lot of lookup tables in a settings form that are selected from a ListBox. The data adapters are given a...
0
by: doli | last post by:
Hi, I have the following piece of code which iterates through the potential errors: i =0 For Each error_item in myConn.Errors DTSPackageLog.WriteStringToLog myConn.Errors(i).Description...
4
by: johnb41 | last post by:
I have a form with a bunch of textboxes. Each text box gets validated with the ErrorProvider. I want the form to process something ONLY when all the textboxes are valid. I found a solution,...
2
by: Samuel R. Neff | last post by:
Within the past few weeks we've been getting a lot of compiler errors in two classes when no errors actually exist. The error always reports as Name '_stepResizeRelocator' is not declared. ...
24
by: pat | last post by:
Hi everyone, I've got an exam in c++ in two days and one of the past questions is as follows. Identify 6 syntax and 2 possible runtime errors in this code: class demo {
8
by: ImOk | last post by:
I just have a question about trapping and retrying errors especially file locking or database locks or duplicate key errors. Is there a way after you trap an error to retry the same line that...
0
by: clemrock | last post by:
Help w/ errors.add_to_base between controller and model Hello, I'm having trouble in routing some errors between model and controller. The errors produced in the controller...
2
by: =?Utf-8?B?UmFuZHlz?= | last post by:
This just started when I updated to sp 1 working on a APS.net, Visual Studio 2008, c# Project. When I open a project, I get tons of Errors showing in the list 300+ if I double click on them I go...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.