Windows Service must run as local user to access port 443 (ssl) data?

D

DC

Hi,

a new third-party dll was added to my windows service project, and
this dll accesses data via https - which fails, unless the service is
being run with a local account (I only tried an admin account so far
- it is not enough to allow interaction for the service). Port 80, on
the other hand, is no problem.

I really have two questions:

1) Can I avoid this requirement? I cannot change the code of the third-
party dll but is there a way to configure my service project somehow
and get rid of the account requirement?

2) If (as I fear) this is not possible, then how can I prepare a setup
or at least a batch file which will set the service to run under a
specified account (i.e. without having to click through the management
console)? I did not find a way in the VS 2008 setup project to adjust
values in the ServiceControl + ServiceInstall tables. I found
references to the "Wix" project and an example of an msi config file
(proivded below) but using Wix looks to complicated to me for this
simple problem but maybe I can just inject this kind of xml config in
my setup project?

TIA for any hints.

Regards
DC

<Component Id='c_WSService' Guid='62ed8518-b644-4943-
be63-9eaf665941d2'> <File Id='f_WSService' Name='WSService.exe'
Vital='yes' Source='..\wssvr\release\wsservice.exe' />
<ServiceInstall Id='WSService.exe' Name='WSService'
DisplayName='[product name]'
Type='ownProcess' Interactive='no'
Start='auto' Vital='yes'
ErrorControl='normal'
Description='Provides local and remote access to [product name] search
facilities.' /> <ServiceControl Id='WSService.exe' Name='WSService'
Start='install' Stop='both' Remove='uninstall' Wait='yes' /></
Component>
 
D

DC

Hi,

a new third-party dll was added to my windows service project, and
this dll accesses data via https - which fails, unless the service is
being run with a local account (I only tried an admin account so far
-  it is not enough to allow interaction for the service). Port 80, on
the other hand, is no problem.

I really have two questions:

1) Can I avoid this requirement? I cannot change the code of the third-
party dll but is there a way to configure my service project somehow
and get rid of the account requirement?

2) If (as I fear) this is not possible, then how can I prepare a setup
or at least a batch file which will set the service to run under a
specified account (i.e. without having to click through the management
console)? I did not find a way in the VS 2008 setup project to adjust
values in the ServiceControl + ServiceInstall tables. I found
references to the "Wix" project and an example of an msi config file
(proivded below) but using Wix looks to complicated to me for this
simple problem but maybe I can just inject this kind of xml config in
my setup project?

TIA for any hints.

Regards
DC

<Component Id='c_WSService' Guid='62ed8518-b644-4943-
be63-9eaf665941d2'>    <File Id='f_WSService' Name='WSService.exe'
Vital='yes' Source='..\wssvr\release\wsservice.exe' />
<ServiceInstall Id='WSService.exe' Name='WSService'
DisplayName='[product name]'
Type='ownProcess'                                Interactive='no'
Start='auto' Vital='yes'
ErrorControl='normal'
Description='Provides local and remote access to [product name] search
facilities.' />    <ServiceControl Id='WSService.exe' Name='WSService'
Start='install' Stop='both' Remove='uninstall' Wait='yes' /></
Component>

I did find a solution for the least attractive option - running a
batch file after update. This if how:

sc config wp1digestor obj= "vhb\adminwp1" password= "cws3zop"

I would be happy about mor elegant solutions.
 
Top