Not tested yet.

On Mon, Feb 2, 2009 at 11:00 PM, Matt Burton <[email protected]> wrote:

>
> Excellent - thanks! Are you able to host and run services now?
>
> On Mon, Feb 2, 2009 at 3:27 AM, Ayende Rahien <[email protected]> wrote:
> > applied
> >
> > On Fri, Jan 30, 2009 at 6:27 AM, Matt Burton <[email protected]>
> wrote:
> >>
> >> Sure thing - there you go. This gets around the install problem, but
> >> like I said, the service won't start - haven't been able to dig into
> >> that to diagnose yet...
> >>
> >> Thanks,
> >> Matt
> >>
> >> On Thu, Jan 29, 2009 at 6:44 PM, Ayende Rahien <[email protected]>
> wrote:
> >> > Can you create a patch? It is hard for me to see what was changed.
> >> >
> >> > On Thu, Jan 29, 2009 at 6:23 PM, Matt Burton <[email protected]>
> >> > wrote:
> >> >>
> >> >> No matter what combination I try I wind up with the following error
> >> >> when attempting to install a service using the host...
> >> >>
> >> >> C:\dev\rsb-spike\Services\bin\Debug>Rhino.ServiceBus.Host.exe
> >> >> /action:Install /asm:"Services.dll" /name:"ApplicationServices"
> >> >> Installing service ApplicationServices...
> >> >> Creating EventLog source ApplicationServices in log Application...
> >> >> System.InvalidOperationException: Cannot get service file name.
> >> >>   at System.ServiceProcess.ServiceInstaller.Install(IDictionary
> >> >> stateSaver)
> >> >>   at System.Configuration.Install.Installer.Install(IDictionary
> >> >> stateSaver)
> >> >>   at
> >> >> Rhino.ServiceBus.Host.Actions.InstallAction.Execute(ExecutingOptions
> >> >> options) in C:\dev\open-source\rhino-tools.ti
> >> >>
> >> >>
> >> >>
> p\trunk\rhino-service.bus\Rhino.ServiceBus.Host\Actions\InstallAction.cs:line
> >> >> 18
> >> >>   at Rhino.ServiceBus.Host.Program.Main(String[] args) in
> >> >> C:\dev\open-source\rhino-tools.tip\trunk\rhino-service.bus\Rh
> >> >> ino.ServiceBus.Host\Program.cs:line 31
> >> >>
> >> >> I hacked on it for a bit and was able to get the service to install
> by
> >> >> changing the InstallAction implementation to the following:
> >> >>
> >> >> public void Execute(ExecutingOptions options)
> >> >> {
> >> >>
> >> >>    var installer = new ProjectInstaller
> >> >>    {
> >> >>        DisplayName = options.Name,
> >> >>        Description = options.Name,
> >> >>        Context = new InstallContext()
> >> >>    };
> >> >>    installer.Context.Parameters.Add("assemblypath",
> >> >> this.GetType().Assembly.Location);
> >> >>    installer.Install(new Hashtable());
> >> >>    using (var system = Registry.LocalMachine.OpenSubKey("System"))
> >> >>    using (var currentControlSet =
> >> >> system.OpenSubKey("CurrentControlSet"))
> >> >>    using (var services = currentControlSet.OpenSubKey("Services"))
> >> >>    using (var service = services.OpenSubKey(installer.ServiceName,
> >> >> true))
> >> >>    {
> >> >>        var path = (string)service.GetValue("ImagePath");
> >> >>
> >> >>        options.Action = Action.Server;
> >> >>
> >> >>        service.SetValue("ImagePath", path + options);
> >> >>    }
> >> >> }
> >> >>
> >> >> Notice the addition of the "assemblypath" context and then changing
> >> >> the Action to Server. I can now install and uninstall but the service
> >> >> won't start - I'm getting the following message in the event viewer:
> >> >>
> >> >> "Service cannot be started. The service process could not connect to
> >> >> the service controller"
> >> >>
> >> >> Any thoughts?
> >> >>
> >> >> Thanks,
> >> >> Matt
> >> >>
> >> >>
> >> >
> >> >
> >> > >
> >> >
> >>
> >>
> >
> >
> > >
> >
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Rhino Tools Dev" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rhino-tools-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to