Click here to Skip to main content
15,883,883 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I'm facing a strange problem after installing the Windows service.

This Windows service will call a method to send mail every 5 minutes.

I have developed the windows service using C# visual Studio 2010.

After the development I have taken the release build version and Installed in my system (that is windows 7 OS) and it works without any problem.

Once the same thing is done in the Windows server 2012 then the service will be installed but the nothing happens there after.

I have used System.Threading.Timer at present. Even I tried using System.Timers.Timer. Both of these will work in my system but wont work in the Server.

I can post the code if required.

Regards, Nuthan A R
Posted

I guess you've checked the obvious things like Framework version ?

.Net Framework didn't support this on Windows 2012 server until Framework Version 4.5
 
Share this answer
 
Comments
Nuthan Gowda 14-Nov-14 5:37am    
I have worked on Framework v4.0
What I need to check in the server ?
We have already a running Web application which is developed in v4.0
Garth J Lancaster 14-Nov-14 5:43am    
from http://msdn.microsoft.com/en-us/library/system.threading.timer(v=vs.110).aspx

"
Platforms

--------------------------------------------------------------------------------



Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)"

but the same for Framework Version 4.0 doesn't show Windows Server 2012 - so you need to ensure you have Dot Net Framework 4.5 running on your server (obviously I'd deploy it to a test server first)

(you might need to upgrade your web app to 4.5, I don't know)
Nuthan Gowda 14-Nov-14 5:46am    
But we have already a web application running in the same server and this application uses 4.0
and Framework v4.5 in installed in the server.
Please check event viewer.It may provide you more details about the issue.
 
Share this answer
 
Comments
Nuthan Gowda 14-Nov-14 5:36am    
There is no error events. After installation only info has been logged has "Windows Service Installed Successfully".

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