473,396 Members | 2,111 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,396 software developers and data experts.

How to log error info in asp.net app?

Hello, friends,

I deployed my asp.net app to our server. As I did in our client/sever C#.net
app, I wrote errors into a log file in catch{} block of try/catch statements,
espeically for those DB access errors.

However, in asp.net, it did not work. It said access denied when
creating/writing a log file.

I was not allowed to install .net studio in the server it either. Also, this
is a stand alone web server, no development machine connected to it.

This gave me BIG trouble since I really could not figure out what was wrong
without going through source code one line by one line using IDE or reading
detailed error info from a log file.

Any suggestions, reference papers? Help please. Thanks a lot.
Nov 19 '05 #1
3 1172
One quick solution would be to display your errors with Trace.Warn
statements.

Then just enable tracing in your web.config. Access your website with
http://mysite/trace.axd to see the trace info.

Myself, I record errors in the Application eventlog.

Greg
"Andrew" <An****@discussions.microsoft.com> wrote in message
news:28**********************************@microsof t.com...
Hello, friends,

I deployed my asp.net app to our server. As I did in our client/sever
C#.net
app, I wrote errors into a log file in catch{} block of try/catch
statements,
espeically for those DB access errors.

However, in asp.net, it did not work. It said access denied when
creating/writing a log file.

I was not allowed to install .net studio in the server it either. Also,
this
is a stand alone web server, no development machine connected to it.

This gave me BIG trouble since I really could not figure out what was
wrong
without going through source code one line by one line using IDE or
reading
detailed error info from a log file.

Any suggestions, reference papers? Help please. Thanks a lot.

Nov 19 '05 #2
you need a directory you are allowed to write to. if you did not specify the
path of the log file, the default dir is the system32 dir, where you cannot
write to. you might want to put it in your vdir.

-- bruce (sqlwork.com)
"Andrew" <An****@discussions.microsoft.com> wrote in message
news:28**********************************@microsof t.com...
Hello, friends,

I deployed my asp.net app to our server. As I did in our client/sever
C#.net
app, I wrote errors into a log file in catch{} block of try/catch
statements,
espeically for those DB access errors.

However, in asp.net, it did not work. It said access denied when
creating/writing a log file.

I was not allowed to install .net studio in the server it either. Also,
this
is a stand alone web server, no development machine connected to it.

This gave me BIG trouble since I really could not figure out what was
wrong
without going through source code one line by one line using IDE or
reading
detailed error info from a log file.

Any suggestions, reference papers? Help please. Thanks a lot.

Nov 19 '05 #3
re:
However, in asp.net, it did not work. It said access denied when
creating/writing a log file.
The account ASP.NET is running as must have write permission
to the event log.

You could also try logging to a text file.

re: I was not allowed to install .net studio in the server it either.
You must install while logged in as an account with administrative privileges.


Juan T. Llibre, ASP.NET MVP
ASP.NET FAQ : http://asp.net.do/faq/
Foros de ASP.NET en Español : http://asp.net.do/foros/
======================================
"Andrew" <An****@discussions.microsoft.com> wrote in message
news:28**********************************@microsof t.com... Hello, friends,

I deployed my asp.net app to our server. As I did in our client/sever C#.net
app, I wrote errors into a log file in catch{} block of try/catch statements,
espeically for those DB access errors.

However, in asp.net, it did not work. It said access denied when
creating/writing a log file.

I was not allowed to install .net studio in the server it either. Also, this
is a stand alone web server, no development machine connected to it.

This gave me BIG trouble since I really could not figure out what was wrong
without going through source code one line by one line using IDE or reading
detailed error info from a log file.

Any suggestions, reference papers? Help please. Thanks a lot.

Nov 19 '05 #4

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

Similar topics

13
by: deko | last post by:
I use this convention frequently: Exit_Here: Exit Sub HandleErr: Select Case Err.Number Case 3163 Resume Next Case 3376 Resume Next
4
by: Larry Tate | last post by:
I am wanting to get those cool html error pages that ms produces when I hit an error in asp.net. For instance, when I get a compilation error I get an html error page that shows me the ...
7
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying....
1
by: whitehorse | last post by:
When the warehousecontroller service is invoked, the following error message is sent to the application log: Event Type: Error Event Source: TFS Warehouse Event Category: None Event ID: 3000...
1
by: maz01 | last post by:
Hello All, I am developing an application in visual basic 2005 that will run continuously in the background on a users workstation. This application will automatically transfer files from the...
3
by: Gary Wessle | last post by:
Hi I tried so long, so many ways to find out why this code is not compiling, I appreciate any help with it, thank you ****************************************************************...
2
by: akhilesh.noida | last post by:
I am trying to compile glibc-2.5 for ARM based board. But I am getting errors while configuring it. Please check and give your inputs for resolving this. configure command : $...
10
by: happyse27 | last post by:
Hi All, I got this apache errors(see section A1 and A2 below) when I used a html(see section b below) to activate acctman.pl(see section c below). Section D below is part of the configuration...
0
by: jadeite100 | last post by:
Hi All: I am new to displaytag and Maven. I download the displaytag-examples from the url "http://sourceforge.net/projects/displaytag/files/" it is part of the "displaytag-1.2-src.zip" I am using...
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
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
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...
0
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...
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
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,...

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.