How to use LifeViewer when dispatcher runs as Service

CodeSite Dispatcher, CodeSite Viewers, CodeSite Controller

How to use LifeViewer when dispatcher runs as Service

Postby janr » Fri Nov 18, 2011 9:54 am

Hi Ray,

I have my dispatcher running as a service on a server. My applications are running on the same server and are using this dispatcher to send logging to a file. Both the dispatcher as my applications are running under user 'SYSTEM' and this works fine.

Now sometimes I want to log on into this server and want to use the LifeViewer in stead of sending the logging to a file. When I route the logging messages via the Dispatcher to the LifeViewer, the TaskManager shows me that the lifeViewer has been started under the user 'SYSTEM'. Because I'm not logged in as 'SYSTEM', I however cannot use this LifeViewer.

How can I make use of the lifeViewer in this configuration. I tried it with both 'connectUsingTCP' as with 'ConnectUsingCopyData'. However with no success.

Do you have any suggestions?

Regards, Jan Reynaerts
janr
 
Posts: 8
Joined:
Thu Oct 27, 2011 5:00 pm

Re: How to use LifeViewer when dispatcher runs as Service

Postby Raize Support » Fri Nov 18, 2011 5:49 pm

Hi Jan,

When running the Dispatcher as a Service it is currently not possible to redirect the messages to the Live Viewer. The reason for this is related to window stations and the communication mechanism used to transfer messages between your app, the Dispatcher, and the Live Viewer. The communication between the Dispatcher and the Live Viewer utilizes window messages and starting with Windows Vista, Windows prevents window messages from crossing window station boundaries. The ConnectUsingTcp method controls the communication channel between your application code and the Dispatcher. In the current release, it is not possible to change the communication mechanism.

Are the applications in which you are using CodeSite service applications or desktop applications? If they are desktop applications, then you can certainly run the Dispatcher as a regular application and then Live Logging will work. Actually, you can run the Dispatcher as a regular app when sending messages from a service app as well. Installing the Dispatcher as a service is only really necessary when your service needs to run with no user logged in, or before the user's desktop window station gets created.

There is another way to work around this issue, and that is use send the CodeSite messages to another machine using a remote destination. That is, you setup a TCP destination for your CodeSite messages to another machine with the RemoteDestinationDetails being the Viewer (the default). When your app sends CodeSite messages to the local Dispatcher (via TCP after calling the ConnectUsingTcp method), the local Dispatcher will send the messages to the remote Dispatcher also via TCP and on the remote machine the messages will be sent to the Live Viewer.

Ray
Raize Software Support
Raize Software
http://www.raize.com
Raize Support
 
Posts: 611
Joined:
Fri Mar 25, 2011 9:04 pm

Re: How to use LifeViewer when dispatcher runs as Service

Postby janr » Mon Nov 21, 2011 10:18 am

Hi Ray, my application is a service application. And sending the logging to another machine is at the moment no option for us. But thanks for your suggestions.
Regards, Jan Reynaerts
janr
 
Posts: 8
Joined:
Thu Oct 27, 2011 5:00 pm


Return to Tools

Who is online

Users browsing this forum: No registered users and 1 guest