I need to be able to cause my vb.net windows service to crash and terminate 'illegally'. I have my service set to restart 3 time if it stops. This hasn't been happening. I have a theory about why it isn't starting again (I get a timeout error, I am connecting to a clients web-service for db access). I can't test to see if I have fixed the problem unless I can cause the service to stop 'illegally'. If I just stop it of course the server won't try to re-start it. I need to be able to crash it so that it will re-start and I can prove it worked. I figured if there is some code that will make it past the compiler that will not just cause an error, but an actual stopping of the service I could then prove I was right (or not). Anyone know of some code that could cause the service to stop, but which the compiler would let past? Thanks.
Have a function which just keeps on calling itself until you blow the stack? Barry -- Barry Flynn Complete Solutions DG "Roger" wrote in message news:eGD8bsoCIHA.1204@TK2MSFTNGP03.phx.gbl... >I need to be able to cause my vb.net windows service to crash and terminate >'illegally'. > > I have my service set to restart 3 time if it stops. This hasn't been > happening. I have a theory about why it isn't starting again (I get a > timeout error, I am connecting to a clients web-service for db access). > > I can't test to see if I have fixed the problem unless I can cause the > service to stop 'illegally'. If I just stop it of course the server won't > try to re-start it. I need to be able to crash it so that it will re-start > and I can prove it worked. I figured if there is some code that will make > it past the compiler that will not just cause an error, but an actual > stopping of the service I could then prove I was right (or not). > > Anyone know of some code that could cause the service to stop, but which > the compiler would let past? > > Thanks. > >
Thanks. I will give that a try. "Barry Flynn" <Anonymouse> wrote in message news:uuXhA55CIHA.5360@TK2MSFTNGP03.phx.gbl... > Have a function which just keeps on calling itself until you blow the > stack? > > Barry > > -- > Barry Flynn > Complete Solutions DG > > > "Roger" wrote in message > news:eGD8bsoCIHA.1204@TK2MSFTNGP03.phx.gbl... >>I need to be able to cause my vb.net windows service to crash and >>terminate 'illegally'. >> >> I have my service set to restart 3 time if it stops. This hasn't been >> happening. I have a theory about why it isn't starting again (I get a >> timeout error, I am connecting to a clients web-service for db access). >> >> I can't test to see if I have fixed the problem unless I can cause the >> service to stop 'illegally'. If I just stop it of course the server won't >> try to re-start it. I need to be able to crash it so that it will >> re-start and I can prove it worked. I figured if there is some code that >> will make it past the compiler that will not just cause an error, but an >> actual stopping of the service I could then prove I was right (or not). >> >> Anyone know of some code that could cause the service to stop, but which >> the compiler would let past? >> >> Thanks. >> >> > >