471,338 Members | 1,275 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,338 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 1722
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 discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by mikey_boy | last post: by
2 posts views Thread by Trev | last post: by
10 posts views Thread by Douglas Buchanan | last post: by
24 posts views Thread by pat | last post: by
8 posts views Thread by ImOk | last post: by
2 posts views Thread by =?Utf-8?B?UmFuZHlz?= | last post: by

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.