My application can run in the service/application mode on windows 2008, when run in application mode, everything is normal, but when run in service mode, it cann't start service, it will produce a error, following  is the error message:
   "Faulting application MyApp.exe, version 0.0.1.0, time stamp 0x4bc68554, faulting module unknown, version 0.0.0.0, time stamp 0x00000000, exception code 0xc0000005, fault offset 0x00000000, process id 0xe70, application start time 0x01cadc92e4d58f5c."

Finally I found the PocoNet.dll induce the problem, my program use the code:
  
    Poco::Net::MailMessage message
   
This will make application crash.

Why this issue happen? and why the application can run normally in application mode? Is this issue relate to the Widows2008's policy and how set the policy?


Thanks.