473,725 Members | 2,168 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Debugging a logon process event

Hello.
OK, Thanks to the help I have the remote debugging worked out.

Here is my next hurdle.

I have a service that is supposed to be catching Event Log written
events.

this.eventLog1. EntryWritten += new
System.Diagnost ics.EntryWritte nEventHandler(t his.eventLog1_E ntryWritten);

It catches event log entries just fine when I am logged in and catches
the log off events, but it does not seem to catch the logon events.

I figured I could remote debug this, however since I have to have the
remote debugging monitor running, I can't debug while the user is
logged off.

Any ideas as how to debug this particular problem? That is, debug
before a user has signed on?

Or even better yet, any ideas as to why my
System.Diagnost ics.EntryWritte nEventHandler(t his.eventLog1_E ntryWritten)
is not catching anything until after a user signs in? It's a service,
so it is indeed running before a user signs in.

Thanks as always!
-A

Jan 11 '06 #1
4 2132

"Guy Noir" <ah******@gmail .com> wrote in message
news:11******** **************@ g49g2000cwa.goo glegroups.com.. .
| Hello.
| OK, Thanks to the help I have the remote debugging worked out.
|
| Here is my next hurdle.
|
| I have a service that is supposed to be catching Event Log written
| events.
|
| this.eventLog1. EntryWritten += new
| System.Diagnost ics.EntryWritte nEventHandler(t his.eventLog1_E ntryWritten);
|
| It catches event log entries just fine when I am logged in and catches
| the log off events, but it does not seem to catch the logon events.
|
| I figured I could remote debug this, however since I have to have the
| remote debugging monitor running, I can't debug while the user is
| logged off.
|
| Any ideas as how to debug this particular problem? That is, debug
| before a user has signed on?
|
| Or even better yet, any ideas as to why my
| System.Diagnost ics.EntryWritte nEventHandler(t his.eventLog1_E ntryWritten)
| is not catching anything until after a user signs in? It's a service,
| so it is indeed running before a user signs in.
|
| Thanks as always!
| -A
|

This is not a reliable method to receive specific eventlog notifications,
the system only raises one event per 5 seconds, that means that messages
written within the 5 seconds windows following an eventlog event will not
result in another event getting raised.

Willy.
Jan 11 '06 #2
Interesting!

Is there another way to collect specific event log entries "real time"?
Or could you point me in the right direction?

Thanks so much!
-A

Jan 11 '06 #3
Here is what I am proposing. It seems a bit kludgy but so does the
..EntryWrittenE ventHandler.

Keep collecting events via .EntryWrittenEv entHandler

But every 10 minutes parse the event log using the Date/Time/INDEX
Number as a primary key. The idea is that the EventWrittenEve ntHandler
can catch events, the ones we miss are parsed every 10 minutes.

Worst case: events are missed by the EventWrittenEve ntHandler and the
machine shuts down before the 10 minute cycle has run.

Then again, as long as the machine is shut down gracefully, I could
include the log parse method in the onstop method.

Just seems kind of kludgy to me.

Jan 11 '06 #4

"Guy Noir" <ah******@gmail .com> wrote in message
news:11******** **************@ o13g2000cwo.goo glegroups.com.. .
| Here is what I am proposing. It seems a bit kludgy but so does the
| .EntryWrittenEv entHandler.
|
| Keep collecting events via .EntryWrittenEv entHandler
|
| But every 10 minutes parse the event log using the Date/Time/INDEX
| Number as a primary key. The idea is that the EventWrittenEve ntHandler
| can catch events, the ones we miss are parsed every 10 minutes.
|
| Worst case: events are missed by the EventWrittenEve ntHandler and the
| machine shuts down before the 10 minute cycle has run.
|
| Then again, as long as the machine is shut down gracefully, I could
| include the log parse method in the onstop method.
|
| Just seems kind of kludgy to me.
|

I would parse the eventlog at every event, the minimum interval between
these is 5 seconds, this won't hurt system performance, anyway if that much
events are logged, you need to parse at a higher rate anyway.
When the system shuts-down you parse a last time in your Service OnShutdown
eventhandler.

Willy.


Jan 11 '06 #5

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

Similar topics

7
8191
by: Aarti | last post by:
I have written a windows service that needs to perform certain functions only if a User is logged in. The problem I am running into is that I get an error if the computer is in the process of being shut down or restarted. At all other times, the service runs just fine. I need to either detect a logon/logoff event OR check somehow as to whether there is currently a valid logged on user. The closest I have found is ManagementEventWatcher...
16
4214
by: Serdar Kalaycý | last post by:
Hi everybody, My problem seems a bit clichè but I could not work around. Well I read lots of MSDN papers and discussions, but my problem is a bit different from them. When I tried to run the project in debug mode (by hitting F5) it gives an error message "Error while trying to run project: Unable to start debugging on the web server.
10
8711
by: Shawn | last post by:
JIT Debugging failed with the following error: Access is denied. JIT Debugging was initiated by the following account 'PLISKEN\ASPNET' I get this messag in a dialog window when I try to open an asp.net page. If I press OK then I get a page with this message: Server Application Unavailable The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser...
14
8672
by: | last post by:
I cannot for the life of me get remove debugging to work. I continue to receive "Error while trying to run project: Unable to start debugging on the web server. Access is denied. Verify that you are an administrator or member of the Debugger Users". I have followed (ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/vsdebug/html/vxtbsHTTPServer Errors.htm). I have seen...
6
1817
by: gerry | last post by:
I am almost at the end of my rope - I have to go through this process everytime a new version of studio is released or it is installed on a new machine - what a (^%&$^& pain. I am trying to debug a web app from within vs.net 2005 locally on windows 2003 server I just cannot get debugging to work anywhere other than localhost I completely uninstalled the ie enhanced security I've been through all of the doc's i can google
5
3635
by: snicks | last post by:
I'm trying to exec a program external to my ASP.NET app using the following code. The external app is a VB.NET application. Dim sPPTOut As String sPPTOut = MDEPDirStr + sID + ".ppt" Dim p As New System.Diagnostics.Process 'p.Start(MDEPDirStr & "macrun.exe", sPPTOut) p.Start("C:\WINDOWS\SYSTEM32\CALC.EXE") 'p.Start("C:\WINDOWS\SYSTEM32\macrun.exe", sPPTOut)
2
1712
by: Doug | last post by:
I've installed ASP.NET onto our web server (Win2k/unsure of IIS version) this morning. I created a simple ASPX page in Notepad that writes out an asp:Label control to the page and dynamically populates it with the current date/time. I ran the page and received an error in my browser, "Server Application Unavailable " and to check the application event log on the server. On the server, I see a Warning event, an information event and an...
0
3235
by: robpimentel | last post by:
Hi, I've been using DB2 for about 1 week, so please bear with me. DB2 Connect Enterprise Edition v8.1 FixPack 5 Windows Server 2003 Standard Edition SP1 Here is an error that continues to appear on our domain controllers (Security event log): Event Type: Failure Audit Event Source: Security
1
3967
by: cactuscrust | last post by:
I'm running IIS6 Windows2003, and as you'll see very quickly.. I'm pretty new to this stuff. Lately I've been getting bombarded with login attempts.... sometimes several in the same second, and it can last for hours. The event viewer shows the following information for the failed login: Logon Failure: Reason: Unknown user name or bad password User Name: Admin Domain: AXXXXX Logon Type: 8 ...
0
8888
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8752
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9257
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9176
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9113
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6702
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6011
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
2
2635
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2157
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.