juliensellgren
2/16/2008 1:32:00 AM
As a follow up, I believe I figured out what my problem was. As it
turns out, I was off on the wrong track, thinking that this issue had
to do with the specific user accounts being used for the service. The
permissions error I was getting was inconsequential. These were
occuring due to some other issue I have on my network to do with newly
created accounts.
The issue I was having with Dotnet 2.0 services not being able to
start, was due to the fact that the service executable was signed.
Apparently, the CLR does some additional checking with a signed
service, whereas the Dotnet 1.1 framework did not do this checking. It
wasn't my OnStart() method that was timing out. Presumably the CLR was
busy looking for some certificate authority over the internet, which
was preventing the service from starting in a timely fashion. It seems
like a lame solution to simply not sign my service executable, but if
that's what it takes...
On Feb 12, 4:05 pm, juliensellg...@hotmail.com wrote:
> 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...@wonderware.something.com> 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...@hotmail.com> wrote in message
>
> >news:be338d66-5ea5-45dd-822c-97b06473f364@s8g2000prg.googlegroups.com...
>
> > >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 -- Hide quoted text -
>
> - Show quoted text -