473,396 Members | 1,846 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.

Uncaught system.invalidoperationexception

Hello i'm becoming mad at trapping this exception:

EventType clr20r3, P1 execwinservice.exe, P2 1.0.0.0, P3 45eec745, P4
system.data, P5 2.0.0.0, P6 4333aea2, P7 2323, P8 11, P9
system.invalidoperationexception, P10 NIL

it's windows service made in vb.net 2005, every thing it's in try
catch blocks but this exception is uncaught.
Machine is win2003, .Net 2.0.

Protected Overrides Sub OnStart(ByVal args() As String)
' Add code here to start your service. This method should set
things
' in motion so your service can do its work.
Dim currentDomain As AppDomain = AppDomain.CurrentDomain
'AddHandler currentDomain.UnhandledException, AddressOf
MyHandler
AddHandler Thread.GetDomain.UnhandledException, AddressOf
MyHandler

Try

Dim t As New System.Timers.Timer(2000)

'Abilitazione del timer
t.Enabled = True
'aggiunta di un Handler per controllare l'evento
TimerFired
AddHandler t.Elapsed, AddressOf TimerFired
.......
.......
End Sub
Sub MyHandler(ByVal sender As Object, ByVal args As
UnhandledExceptionEventArgs)
Dim Ex As Exception = DirectCast(args.ExceptionObject,
Exception)
'Console.WriteLine("MyHandler caught : " + e.Message)

Dim InnerEx As Exception = Ex.InnerException
Dim Message As String = Ex.Message

Do While Not (InnerEx Is Nothing)
Message += InnerEx.Message + "|"
InnerEx = InnerEx.InnerException
Loop

Message = Message & "|" & Ex.StackTrace

MsgBox(Message)

FileOpen(1, System.Windows.Forms.Application.StartupPath &
"\Executor.log", OpenMode.Append, OpenAccess.Default,
OpenShare.Shared)
WriteLine(1, Date.Now.ToLocalTime & ": **CRASH **: " &
Message)
FileClose(1)

End Sub

Mar 7 '07 #1
0 2065

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

Similar topics

5
by: David Conorozzo | last post by:
I am able to create new sources using CreateEventSource. I can call GetEventLogs, I can delete sources, I can see if sources exist BUT, as soon as I try a "WriteEntry", I get an exception: ...
1
by: Trygve Lorentzen | last post by:
Hi, my webservice is running on Win2000 SP4, IIS 5.0 fully patched, connecting to a MySQL database and mainly returning Typed DataSet's from webmethods. After running for a while, generally a...
5
by: Stacey Levine | last post by:
I have a webservice that I wanted to return an ArrayList..Well the service compiles and runs when I have the output defined as ArrayList, but the WSDL defines the output as an Object so I was...
0
by: banduraj | last post by:
I get an System.InvalidOperationException when trying to Serialize a struct that has a type refrenced from another library. The exception is: System.InvalidOperationException was unhandled...
0
by: nicomp | last post by:
I created a Web Service: I imported System.Data.SqlClient so I could access SQL server tables programmatically. The web service builds and deploys with no problems. When I try to add the...
3
by: Joseph Geretz | last post by:
System.InvalidOperationException: WebServiceBindingAttribute is required on proxy classes. My environment: Visual Studio 2005, targeting FX 2.0; I've developed a Web Service which uses DIME to...
6
by: Michael | last post by:
I need to copy a huge file (around 300Mb) from a mapped network drive to another. I have created a console application and used System.IO.File.Copy function. But I want to know the process of...
4
by: QC | last post by:
Hi, this morning found that my Service had crashed, and the error was "Exception Details: System.InvalidOperationException: The ConnectionString property has not been initialized". I have no...
3
by: George2 | last post by:
Hello everyone, Just want to check whether my understanding is correct, Both (1) and (2) only covers Windows C++ platform. 1. If there is uncaught exception, destructor is not ensured to...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
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.