windows service
-
i have developed a windows service. This service updates a sql express database. On running the service, the service gets hang and the event viewer shows .sqlexpection. Is there any way i can debug an installed service. I dont have .net ide installed in the system where service is isntalled. More over the sql express database is in another system. Can you tell me what should be the connection string, if the server name is dev-sqlx and db name is report thanks and regards hari
-
i have developed a windows service. This service updates a sql express database. On running the service, the service gets hang and the event viewer shows .sqlexpection. Is there any way i can debug an installed service. I dont have .net ide installed in the system where service is isntalled. More over the sql express database is in another system. Can you tell me what should be the connection string, if the server name is dev-sqlx and db name is report thanks and regards hari
You'll likely have to introduce a Thread.Sleep() in the service code to give you enough time to attach your debugger to the process. I've never tried to debug a service remotely. You can google for the connection string.
Cheers, Vikram.
"If a trend is truly global, then that trend ought to be visible across ANY subset of that data" - fat_boy
-
You'll likely have to introduce a Thread.Sleep() in the service code to give you enough time to attach your debugger to the process. I've never tried to debug a service remotely. You can google for the connection string.
Cheers, Vikram.
"If a trend is truly global, then that trend ought to be visible across ANY subset of that data" - fat_boy
-
i just want to activate the debugger before the service crashes.. is there any specific way in windows to activate this?
Put a System.Diagnostics.Debugger.Launch() call in your code where you want the debugger to start.
----- You seem eager to impose your preference of preventing others from imposing their preferences on others. -- Red Stateler, Master of Circular Reasoning and other fallacies If atheism is a religion, then not collecting stamps is a hobby. -- Unknown God is the only being who, to rule, does not need to exist. -- Charles Baudelaire
-
Put a System.Diagnostics.Debugger.Launch() call in your code where you want the debugger to start.
----- You seem eager to impose your preference of preventing others from imposing their preferences on others. -- Red Stateler, Master of Circular Reasoning and other fallacies If atheism is a religion, then not collecting stamps is a hobby. -- Unknown God is the only being who, to rule, does not need to exist. -- Charles Baudelaire
I didn't know about this - will have to give it a try next time. Thanks :)
Cheers, Vikram.
"If a trend is truly global, then that trend ought to be visible across ANY subset of that data" - fat_boy