Event Log not Logging ??

 Hi All,

 On my dev machine when I log errors to the event log all works great however when I move the web application to the test server the events are not being logged... I am hoping it is some configuration issue with IIS however I am totally lost.

The code writing the events: EventLog.WriteEntry("xxxxx", err, EventLogEntryType.Error);  

Any help will be appreciated.

 Thanks,

Neil 

0
NeilSt_
6/18/2008 9:33:59 AM
asp.net.web-forms 93655 articles. 6 followers. Follow

6 Replies
1212 Views

Similar Articles

[PageSpeed] 59
Get it on Google Play
Get it on Apple App Store

are you getting an error? Sometimes, its a permissions issue, if the log name doesn't exist, it tries to write the new value to the registry. Check the application log to see if its throwing an error.


Please remember to Mark As Answer if helpful

Regards,
Christiandev, MCPD Web & MCTS Windows

0
christiandev
6/18/2008 9:51:52 AM

 The application log contains a Warning: Event message: An unhandled exception has occurred... However this is produced by the exception occurred that I want to log...not from any failure to log..

0
NeilSt_
6/18/2008 9:58:22 AM

What is the text you are logging? does that exist in the error log file you are viewing, as this doesn't sound like it is the case. Can you post the stack trace from the logfile?


Please remember to Mark As Answer if helpful

Regards,
Christiandev, MCPD Web & MCTS Windows

0
christiandev
6/18/2008 10:04:02 AM

The error message that is intended for logging does appear in that warning log.

 This is some of the content: 

Event code: 3005
Event message: An unhandled exception has occurred.
Event time: 6/18/2008 11:16:32 AM
Event time (UTC): 6/18/2008 9:16:32 AM
Event ID: 761f72fd856f49c386c8c47e36eb633c
Event sequence: 26
Event occurrence: 1
Event detail code: 0

Process information:
    Process ID: 2368
    Process name: w3wp.exe
    Account name: NT AUTHORITY\NETWORK SERVICE
 
Exception information:
    Exception type: NullReferenceException
    Exception message: Object reference not set to an instance of an object.

0
NeilSt_
6/18/2008 2:02:14 PM

in your code, before you log the error, are you checking if the log exists...

if (EventLog.Exists())


Please remember to Mark As Answer if helpful

Regards,
Christiandev, MCPD Web & MCTS Windows

0
christiandev
6/18/2008 4:03:41 PM

 I am not checking if it exists.. however in the event log there are no events with the expected source....

0
NeilSt_
6/19/2008 5:26:39 PM
Reply:

Similar Artilces:

ExceptionPolicy logs differently to event log than to text log
I am implementing an exception policy in the business layer and in the presentation layer of my web application as per the block below.  When an exception happens in the business layer, it bubbles on up to the aspx, which in turn throws the error, thus invoking the default error page defined in web.config.  All well and good.  The strangeness is that only one exception is logged to the event log, but both throws are caught in the text log.  Why the discrepancy? Thanks.    Catch ex As Exception Dim rethrow As Boolean re...

Logging log
Hi! I try to accomplish task described in http://forums.novell.com/novell-product-support-forums/zenworks/configuration-management/zcm-server-install/422609-mixed-login.html?pagenumber= and wonder I don't know how to keep log of logging? I mean, does ZCM is capable to keep logging log? As Altiris NS does? More thanks, Alar. -- NovAlf ------------------------------------------------------------------------ You look like you want to log in to your zone as a user from either a eDIR or AD. And yes this is possible, it will search both Directories. http://www.theurbanp...

Logged In As: Not Logged In
I installed ZCF 10.0.1 on a Win 2K3 server and when I install the ZEN client on a workstation the ZENWORKS client login comes up and I cannot log into it. It shows me the realm name of my tree and Zenworks Zone and I have tried both to no avail. When I look at the details of the adaptive agent it says, "Logged In As: Not Logged In" Any ideas? On Fri, 11 Jan 2008 14:55:21 GMT, Jayson E. Hahn wrote: > Any ideas? Debug logs in ZCM http://www.novell.com/support/search.do?cmd=displayKC&docType=kc&externalId=3418069&sliceId=SAL_Public&dialogID=51010132...

To log or not to log
Hello foremen, on a large database, trillions of SELECTs and DELETEs are going to be performed. After that, the database is going to be unloaded. The database uses a transaction log. Should I keep the log there along this process or "unmount" it after some parts of it (or even before the beginning)? In this case, nothing but the speed is important. The database is ASA 7.0.4.3498. Thanks Pavel LOG... ALWAYS LOG. Performance is dependent on the use of the log. Recommendations: 1) Ensure that the file system is not excessively fragmented 2) Host the db f...

Using my.log.writeExcption method to write to event log in a web service
  I’m trying to use the my.log.writeExcption method to write exceptions to the event log on a web server. I’m having a hard time finding  information on how to set up the web config. There are lots of good examples for my.application.log but not much showing up for my.log from ASP.net.   The following is what I have in my web.config:   <system.diagnostics>     <sources>       <source name="DefaultSource" switchName="DefaultSwitch">         <listeners>   &...

Events are being logged to the "Application" log instead of custom log
Hi Pros, I have a weird problem here. I am logging from my .NET app to a custom log, but unfortunately, the events are redirected to the Application log. I am sure that I am specifying the log name and the source name accurately. I am using some code like the following:  1 Hi Pros, 2 3 I have a weird problem here. I am logging from my .NET app to a custom log, but unfortunately, the events are redirected to the Application log. I am sure that I am specifying the log name and the source name accurately. I am using some code like the following: 4 5 6 EventLog e...

Activity log not logging any events
Hi i have installed the VBSDK kit and it is succesfully running but the activity log does not appear to log any activity, any help in this aspect would be greatly apreciated, Chris The activity log isn't heavily used in the CSK. Mostly it will only log errors related to sending mail or with web services and web service boxes. Generally, if you have no entries in there, it is a good thing.Stephen M. Redd http://www.reddnet.net...

Event Log : Inaccessible logs
 I am getting exception The source was not found, but some or all event logs could not be searched.  Inaccessible logs: Security.at if (!EventLog.SourceExists(eventSource)) at function WriteExceptionToEventLogIf i login as windows administrator no problem.If i login as user there the problem occures.        catch (Exception ex)        {            //ex.StackTrace;            //ex.Message;   ...

Analyze your event logs with Event Log ExplorerT April 20th beta update
"*Analyze your event logs with Event Log ExplorerT* Event Log ExplorerT is an effective software solution for viewing, monitoring and analyzing events recorded in Security, System, Application and another logs of Microsoft Windows NT/2000/XP/2003 operating systems. Event Log Explorer greatly extends standard Windows Event Viewer monitoring functionality and brings many new features." *Main features and benefits of Event Log Explorer at glance:* o Multiple-document or tabbed-document user interface depending on user preferences o Favorites computers and their logs a...

Logging in to form based log in page
------=_NextPart_000_004F_01C2272F.3F915330 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello all. I'm trying to write a script that logs in to a web page that = has the user name and password input boxes as part of the initial web = page. I've tried doing a "POST" with the user name and password = declarations and values in the request to no avail. Here is my code: my $myUserAgent =3D LWP::UserAgent->new; $myUserAgent->agent("Automation/0.1"); my $myRequest =3D HTTP::Request->new(PO...

Fw: Logging in to form based log in page
Thanks for the response. I tried that to no avail. Here is what the "new" code looks like: my $myUserAgent = LWP::UserAgent->new; $myUserAgent->agent("Automation/0.1"); my $myRequest = HTTP::Request->new(POST => $configSettings{"url"}); $myRequest->content_type('application/x-www-form-urlencoded'); $myRequest->content("URI=/documents/database.htm&From=wsjauth&Login=xyz&Pass word=123"); my $myResponse = $myUserAgent->request($myRequest); Thanks, Kenny ----- Original Message ----- From: "WOR...

RE: Logging in to form based log in page
> -----Original Message----- > From: Kenny G. Dubuisson, Jr. [mailto:kdubuisson@kcmria.com] > Sent: Tuesday, July 09, 2002 7:59 AM > To: libwww@perl.org > Subject: Logging in to form based log in page > > > Hello all. I'm trying to write a script that logs in to a > web page that has the user name and password input boxes as > part of the initial web page. I've tried doing a "POST" with > the user name and password declarations and values in the > request to no avail. Here is my code: [snipped] Hi Kenny; Try...

How to fire events in other web form from other web form ?
Suppose that I have A and B web form. I want to trigger B web form's Page_Load event from A web form. How can I do that ? Thanks in advanced WilbertWilbert Bujn Create a public method in B that call the load method : public void Load(object sender, System.EventArgs e) { Page_Load(sender, e) ; } In the page_load of A, instanciate a B object and then call the function B myB = new B() ; myB.Load() ; Quicky Thank you quicky, it works fine. WilbertWilbert Bujn...

XP failed log-on in W2K Event Log
Greetings, I run W2K at work and audit failed log-on attempts. We have several Domains at work and run IPX/SPX (for Netware) and TCP/IP. In the past I have located a couple of users with Trojans on their laptops through the failed log-ons recorded in the Security Logs of several of the machines that I look after. Recently I started getting failed log-ons from machines that I later found to be running XP. The log-on attempts were not of a pattern that suggests a Trojan and at least one of the users is sufficiently experienced to be able to be free of any malware. He states that he ...

Web resources about - Event Log not Logging ?? - asp.net.web-forms

Logging - Wikipedia, the free encyclopedia
or skeleton cars . In forestry , the term logging is sometimes used in a narrow sense concerning the logistics of moving wood from the stump ...

More Japanese Users Logging On To Facebook
For years, Mixi has been the social media site of choice in Japan. But new reports suggest that Facebook could overtake Mixi by the end of the ...

Facebook monetizes users logging out with premium ad placement on logout page
Facebook announced today that premium ads will be displayed on a new “logout experience” page, immediately after Facebook users log out of Facebook ...

My Hoop Champ - Youth Basketball Stats Tracking and Stat Logging on the App Store on iTunes
Get My Hoop Champ - Youth Basketball Stats Tracking and Stat Logging on the App Store. See screenshots and ratings, and read customer reviews. ...

SmartWatch 3 from Sony – The stylish way to handle music, calls and life logging. - YouTube
The time has come to wear Android technology on your wrist. A beautiful stainless steel silver core unit lies within the changeable wrist straps, ...

Halting highlands logging could prove lucrative
A report says halting logging in the central highlands could boost the state's coffers.

Westpac lends to firms tied to illegal logging
Westpac lends to firms tied to illegal logging

Westpac lends to firms tied to illegal logging
Westpac lends to firms tied to illegal logging

Logging out of Facebook
Businesses and employers have infiltrated Facebook ... and not in a good way.

Logging out? Why young people love to hate Facebook
Researchers, journalists writing about research, and young people themselves have been writing about the perceived decline of Facebook for a ...

Resources last updated: 12/5/2015 3:36:23 PM