473,574 Members | 2,687 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1800
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******** ******@TK2MSFTN GP15.phx.gbl...
I would like to write a program that finds all asp.net errors in iis logs? what
characteristic s 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******** ******@TK2MSFTN GP12.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******** ******@TK2MSFTN GP15.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\Lo g 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******** ******@TK2MSFTN GP12.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******** ******@TK2MSFTN GP15.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%\system 32\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%\System 32\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\Lo g 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******** ******@TK2MSFTN GP12.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******** ******@TK2MSFTN GP12.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******** ******@TK2MSFTN GP15.phx.gbl...
I would like to write a program that finds all asp.net errors in iis logs? what
characterist ics 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.s ql---

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(EX TRACT_TOKEN(Qry Str, 0, '|')) AS Uri,

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

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

EXTRACT_TOKEN(c s-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.s ql---


--
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******** ******@TK2MSFTN GP12.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******** ******@TK2MSFTN GP15.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******@hotma il.com.discuss> wrote in message
news:eZ******** ******@TK2MSFTN GP14.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.s ql---

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(EX TRACT_TOKEN(Qry Str, 0, '|')) AS Uri,

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

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

EXTRACT_TOKEN(c s-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.s ql---


--
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******** ******@TK2MSFTN GP12.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******** ******@TK2MSFTN GP15.phx.gbl...
I would like to write a program that finds all asp.net errors in iis logs? what
characterist ics 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
2254
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 webpage. Here is the script. I appreciate any light that could be shed on the script and why I would get the errors. Thank you,
2
2417
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 user and let them decide whether to commit or rollback. I so far foresee a couple of problems. 1. Inside a transaction, I write to the error log...
10
2310
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 similar name to the table. Rather than making a long Select Case that could become obsolete if lookup tables are added and the source table of the...
0
2116
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 DTSPackageLog.WriteStringToLog myConn.Errors(i).NativeError i =i +1 Next
4
9829
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, but it seems like a workaround. I'm not sure if it's the best way: Dim ErrorCounter As Integer Private Sub btnOK_Click(ByVal sender As...
2
1566
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. Where _stepResizeRelocator is an instance (class level) variable. There is no compiler error on the declaration of the variable, only on use. Tthe...
24
5287
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
5570
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 cause the error? In many other languages you have the option of rertying certain errors. In effect, its like a return to the exact same line. You...
0
5049
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 (invite_controller.rb) are collected and spit out nicely in a flash method as such:
2
1971
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 to the page see the errors with the red squigles and after about 10 seconds they go away. If i do this on on all the pages list I can get down to...
0
7747
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
1
7843
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6498
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5643
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5331
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3768
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3785
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2262
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1094
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.