windows service written in c# .NET 4 vs2010 will not install on Server 2008 R2 Enterprise
Asked Answered
C

2

10

I've written many versions of windows services and installed them on a 64-Bit system with 32 GB running Server 2008 R2 Enterprise.

I create the services using this recipe:
http://msdn.microsoft.com/en-us/zt39148a.aspx
"Walkthrough: Creating a Windows Service Application in the Component Designer"

I create the .msi and corresponding setup.exe on my Win 7 laptop (c#, vs2010 SP1, .NET 4).

NORMAL BEHAVIOUR

after testing a Windows service on my laptop, I copy the .msi and setup.exe to a folder on the win2008 R2 Enterprise server (using copy and paste via remote desktop); I use the server's Control Panel to uninstall, right click the .msi and choose Install, then walk through the Setup Wizard. No problem. Works most of the time.

ABNORMAL BEHAVIOUR

The install runs for perhaps 15 minutes or longer; it never finishes; eventually a dialog states
"(?) Installer is no longer responding."
with options to [Retry] or [Cancel].

At this point, the progress bar is a short as it could possibly be and at the far left, beneath the "P" of "Please wait...".

Clicking Retry does not help. It's been over 30 minutes and counting since I clicked Retry and the progress bar has not advanced even a pixel.

MORE INFORMATION

(a) the service installs without any problem on another server, a Win 2008 R2 web edition.
(b) as mentioned above, the Windows service both installs and works properly on my Win 7 development and testing environment.

HISTORY / SPECULATION

a couple of weeks ago, I was unable to install a service from the win 2008 R2 Enterprise server. I could not find it in Control Panel/Uninstall even though the .msi claimed it to be installed and the service also continued to appear in the services.msc console. Even disabling the service did not help. For that reason, I cloned the code, changed the service name slightly, and successfully installed that service which has been running for while without issues.

Today, a similar event happened, the only difference being that I can see that service in Control Panel Uninstall. Because it would not uninstall, I tried my same cloning trick but this time it failed.

Next step: using the above walkthrough, I created a do nothing Windows service and made it useful by importing my client classes into it from the original c# project file.

The re-built from the ground up Windows service works as designed on my laptop but refuses to install on the R2 Enterprise server.

Any ideas?

Please and thank you.

P.S.: i posted this at so because imho it's more likely something that a developer is likely to encounter prior to handing off her/his code to a sysadmin.

BTW, I could not find anything related at so; ditto via Google.

Chamber answered 21/3, 2011 at 23:10 Comment(2)
Any more info from install logs or event viewer that you can add? Did you change guid's on the install in addition to changing the service name? Tried any tools to clean up botched installs? Potentially tough to diagnose, I feel your pain.Interpretive
@qes "pain" describes it well; fortunately I've found the problem in this case. I hope eventually to find the underlying cause(s) although it may simply end up being one more unsolved mystery. The installs themselves were not botched AFAIK (because it appears they never got that far) but the uninstalls have left some fragments that fortunately are able to be ignored (at least for now). Thank you for your much appreciated imput.Chamber
C
3

in this particular case, it is some very weird server rights condition

MORE INFORMATION

although my server account is not Administrator, I'm a member of both local and domain Administrators for this 2008 R2 box.

I had tried many ideas, including creating the example in the walkthrough and trying it. No luck.

The boxe's Administrator was able to install my service using installutil.exe so I tried installutil.exe but it would only work for me using the Administrator's credentials.

For that reason, I suspected it might be a rights issue, so I tried with my credentials installing the walkthrough example on the H:\ drive. Success. Next, I tried installing the troublesome Windows service on C: in a different location. Again, success.

What is strangest about this issue is that many times I had no problem then suddenly a problem arose to block my development efforts.

A sign that a Windows service will install is when a dialog asking permission to continue appears almost immediately after starting the install. Another clue that success is possible is being able to successfully uninstall any previous version via Control Panel.

I appreciate everyone's efforts to help me with this. Thank you.

Chamber answered 24/3, 2011 at 11:5 Comment(0)
S
2

I've had similar experiences with my own MSI's (not just for services), as well as third party MSI's on Win2k3 and Win2k8. I never (ever) got to the bottom of it without a 'fresh' re-install of the operating system.

Just like you, I too speculate that there's something lost in (a combination or all of) the internals of the OS (registry, file-system, system restore).

I know this is not what you want to hear but (if at all possible) a clean install of the OS might do the trick for you.

Salivate answered 21/3, 2011 at 23:34 Comment(1)
thank you; fortunately in this case that was not necessary because the particular 2008 R2 server is a production server that as of yet has no clone to fill the gap that would occur during a period of re-installation.Chamber

© 2022 - 2024 — McMap. All rights reserved.