Re: Cannot start Dotnet 2.0 Windows Service after install - Access is denied

Tech-Archive recommends: Fix windows errors by optimizing your registry



The OS is Windows Server 2003. InstallAllUsers is set to true. It
appears to be a Dotnet framework issue, since the 1.1 version of the
service starts fine under the same user account. The only other thing
I could see it being would be a permissions issue on one of the
related DLL's of my service... For example, my 1.1 service references
the SharePoint 2003 dll, and my 2.0 service references the SharePoint
2007 dll... However, OnStart() would not cause the SharePoint DLL to
load at that time.

All my OnStart() method does is register a TCP channel, using the
System.Runtime.Remoting .dll. This registration attempt never gets
called however because otherwise I would have seen something in the
eventlog. So I am wondering if it might be happening when this dll is
loaded by framework, right after the call to OnStart(), but before any
of my code executes. Could Dotnet 2.0 have some stricter permissions
requirements over Dotnet 1.1 here?

On Feb 12, 12:50 pm, "Phil Wilson"
<phil.wil...@xxxxxxxxxxxxxxxxxxxxxxxx> wrote:
1) What OS is this? Wondering if it's Vista.
2) You should be using InstallAllUsers set True, just in case you're not.

--
Phil Wilson
[MVP Windows Installer]

<juliensellg...@xxxxxxxxxxx> wrote in message

news:be338d66-5ea5-45dd-822c-97b06473f364@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx



I have created an MSI installer using Visual Studio 2005, to install a
Dotnet2.0WindowsService. In the OnAfterInstall() method of the
ProjectInstaller class, I am using
System.ServiceProcess.ServiceController to start theservice. The
servicenever starts however, and in the Eventlog, I get:

EventID: 1509, Source: UserEnv, Type: Warning
Windows cannot copy file C:\Documents and Settings\Default User.WINDOWS
\Application Data\Microsoft\CLR Security Config
\v2.0.50727.832\security.config.cch.3352.681328 to location C:
\Documents and Settings\<user.MACHINE>.000\Application Data\Microsoft
\CLR Security Config\v2.0.50727.832\security.config.cch.3352.681328.
Possible causes of this error include network problems or insufficient
security rights. If this problem persists, contact your network
administrator.

DETAIL - Access is denied.

I can get theserviceto start with some users, but not others.
Granting local Administrator priviledges to theserviceuser doesn't
help. I have tried experimenting with permissions on the C:\Documents
and Settings\ directory, granting theserviceuser Full control - with
no luck.

This problem never existed when myservicewas aDotnet1.1 app. This
problem only started happening withDotnet2.0. This problem exists
whether or not I try to start theservicein code from the MSI or
whether or not I press 'Start' from theServiceControl Manager. What
rights does my user need to have? And what is the temporary .000
profile directory that gets created when aservicetries to start?
Note: I am trying to use a local user, as opposed to a Domain Account
for myservice.

Any help would be greatly appreciated.

Julien- Hide quoted text -

- Show quoted text -

.



Relevant Pages

  • Re: Cannot start Dotnet 2.0 Windows Service after install - Access is denied
    ... whereas the Dotnet 1.1 framework did not do this checking. ... the SharePoint 2003 dll, and my 2.0 service references the SharePoint ... OnStart() would not cause the SharePoint DLL to ... Granting local Administrator priviledges to theserviceuser doesn't ...
    (microsoft.public.dotnet.framework.setup)
  • Re: Access a VB.net ComClass from VB6
    ... It works with the dotnet application. ... "problem" is actually with the incoming DLL. ... dotNet Interop is a more completed process than it first appears or that ...
    (microsoft.public.vb.com)
  • Re: Access a VB.net ComClass from VB6
    ... I understand that and should explain why you still need to post to a dotNet ... "problem" is actually with the incoming DLL. ... likely to get a quick and useful response. ... it worked the first time but when I had ...
    (microsoft.public.vb.com)
  • COM+ Com Component never stops spinning when called from DOTNET
    ... I have a vb6 com DLL that I am calling from DOTNET c# sharp. ... I added a reference to the dll via the asp.net application. ... I tried calling the GC.Collectmethod and it kinda worked. ... let more tha 1 instance spin up, but yet it still never stops. ...
    (microsoft.public.dotnet.framework.interop)