1

I developed a Windows service which is running without any problem in Windows XP service pack 3. When I deployed this service in Windows Server 2008 it is not working. The service started without any problem.

I enabled the option Windows XP service pack 2 from the compatibility property of the .exe which deployed there.

But no more action after the starting the service.

What could be the problem?

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
gopal
  • 3,681
  • 5
  • 24
  • 25
  • Personally, I have no idea what the problem is, since you didn't tell us what's wrong. What do you mean "it's not working"? – John Saunders Jun 23 '09 at 12:37
  • Why did you change the compatibility level? does it throw any information to the event log? does the process terminate immediately? have you tried attaching a debugger? – Rowland Shaw Jun 23 '09 at 12:39
  • what account are you running it under. I would try an admin account just to make sure it's not something easy like a permissions issue. – kemiller2002 Jun 23 '09 at 12:45
  • the ultimate aim of the application is to generate a PDF report. It is not happening. But in my local machine it is working. – gopal Jun 23 '09 at 13:00
  • I read the statement in service.exe properties that state if the service was running in previous version of windows and not running at now then choose the compatibility mode. So, I did that. – gopal Jun 23 '09 at 13:01
  • The service is running under admin account. – gopal Jun 23 '09 at 13:03

2 Answers2

0

Since the error could hide anywhere I would suggest to first discern what exactly is not working under Windows Server 2008.

Implement some logging functionality into your service (if you didn't do so already, I strongly recommend it) and let the result be printed into a log file. See what's working and when it stops to work. Hopefully this will give you a better understanding of what's going on under the hood.

Also, this way we can help you way better than now.

[EDIT]

Maybe these two can help you?

Community
  • 1
  • 1
Michael Klement
  • 3,376
  • 3
  • 30
  • 34
  • The application does logs information when it executes query against sqlserver database.From that I understand that the service is running. But the ultimate aim of the application is to generate a PDF report. It is not happening. – gopal Jun 23 '09 at 12:56
  • Does the path exist where the PDF shall be created? Does the server need anything installed for the PDF generation? Is the code reached where the PDF generation should start? Is the end of the PDF generation code reached? – Michael Klement Jun 23 '09 at 13:56
  • I am getting this error: Retrieving the COM class factory for component with CLSID {46521B1F-0A5B-4871-A4C2-FD5C9276F4C6} failed due to the following error: 80040154. – gopal Jun 24 '09 at 07:01
  • Edtied the answer... Is the server running in 64 bit? – Michael Klement Jun 24 '09 at 07:35
0

One thing I would check it to see if any of your referenced assemblies are 32bit specific. We ran into a similar problem when using Microsoft SQL Server Reporting Services. The .dll we used to get a list of the web service interfaces, was 32bit/64bit specific, so we had to swap it out depending on which envionment we were running on.

Jay Mooney
  • 2,208
  • 1
  • 19
  • 23
  • I am getting this error: Retrieving the COM class factory for component with CLSID {46521B1F-0A5B-4871-A4C2-FD5C9276F4C6} failed due to the following error: 80040154. – gopal Jun 24 '09 at 07:02
  • I did a quick check on that error code, It indicates the registered COM control doesn't match. My guess is that the control you are referencing is actually a 32bit version. Is your service .Net or COM based? – Jay Mooney Jun 24 '09 at 14:46