Click here to Skip to main content
15,915,163 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I have created an .msi file using the .net2.0 in 32 bit machine. i am using a windows service inside the .msi installer file.when i run this .msi file in 32 bit machine it worked fine. when i run in the 64 bit mahcine windows service is not getting started.

C++
Cannot open LP service on computer '.'. ---> System.ComponentModel.Win32Exception: Access is denied




Please Suggest me for the solution.


Thanks
Jaya
Posted

Try compiling your service specifically for 64 bit systems:

-Right click your service project in the solution explorer
-Choose Properties
-Select the "Build" tab
-Set the "Platform Target" dropdown to "x64"
-Recompile your service, recreate the installer and try installing it again

Please note: When the service is compiled this way, it will not run on 32 bit systems, so you need to compile and deploy two different versions.

Also: If your 64 bit service makes use of 3rd party dll's that are compiled for 32 bit systems, it will throw an exception when it tries to load the dll's

Good luck,
Johnny J.
 
Share this answer
 
There are two options:

Use corflags to set 32 bit capability:
corflags assemblyname /32Bit+

Compile the application as Any CPU.
 
Share this answer
 

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