Click here to Skip to main content
15,914,943 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
The type initializer for 'Windows Service.Service1' threw an exception at starting of window service.
Posted
Comments
shakil0304003 30-Oct-10 7:47am    
Not clear!
sunny dhiman 30-Oct-10 7:56am    
hello,
in window service by using first thread i start a process and using other thread i want to stop that if in a perticular time duration it will not finish

1 solution

hi, from my point of view,

create a new project "Tasks" and refer it to windows services. and write code to create a n number of thread in class file in the Task project using the onstart event.

and also added some timer control to create the thread based on the time inteval.

for identitfy the above error, try to write a log while staring the windows service and maintain the propery try catch in the windows serivce.

because if you have any runtime error in the windows service, it will stop the windows service itself.

Thanks
Vijay r
 
Share this answer
 
Comments
sunny dhiman 1-Nov-10 9:08am    
thanks vijay for your reply.but i sorted out this problm.thanx again

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900