473,324 Members | 2,257 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

Remoting With Windows Service

Salve,
I have write a service Windows for the remoting.

I have a dll Server (OLD COM+)

For Configure DLL Server I user Config File
Es.
<configuration>
<system.runtime.remoting>
<application>
<channels>
<channel ref="tcp" port="50000"/>
</channels>
<service>
<wellknown type="DllServer.Classe1, DllServer" mode="Singleton"
objectUri="Classe1.rem" />
<wellknown type="DllServer.Classe2, DllServer" mode="Singleton"
objectUri="Classe2.rem" />
</service>
</application>
</system.runtime.remoting>
</configuration>

This is my code in the service:

Protected Overrides Sub OnStart(ByVal args() As String)
RemotingConfiguration.Configure("MyService.exe.con fig")
Console.ReadLine()
End Sub

If i start service windows this problem to me:

the service is started, but it stops. Some services stops itself if there
aren't operations to execute, this is, for example, the case of the "event
viewer" service application

WHY?
Nov 21 '05 #1
3 1480
hi John
what is it that the service do after loading configuration

Nov 21 '05 #2
It would have to make available me the DLL server for the calls client..

Nov 21 '05 #3
John
Console.ReadLine() What do you expect this line to do?

A Service does not have a UI, I would suspect that line is throwing an
exception or worse it is not allowing the service's OnStart method to
complete in a timely method! Causing your service not to start. Do you see a
message in the Application Event Log that your service started or failed to
start? I would expect a failed to start message.

Matthew MacDonald's book "Microsoft Visual Basic .NET Progammer's Cookbook"
has a handful of topics on using Remoting within a Windows Service, other
then the Console.Readline, your code looks like it should work... Assuming
your config is correct...

You OnStart should just need:
Protected Overrides Sub OnStart(ByVal args() As String)
RemotingConfiguration.Configure("MyService.exe.con fig")
End Sub
Hope this helps
Jay

"John Fred" <ge*@msn.com> wrote in message
news:eX**************@TK2MSFTNGP15.phx.gbl... Salve,
I have write a service Windows for the remoting.

I have a dll Server (OLD COM+)

For Configure DLL Server I user Config File
Es.
<configuration>
<system.runtime.remoting>
<application>
<channels>
<channel ref="tcp" port="50000"/>
</channels>
<service>
<wellknown type="DllServer.Classe1, DllServer" mode="Singleton"
objectUri="Classe1.rem" />
<wellknown type="DllServer.Classe2, DllServer" mode="Singleton"
objectUri="Classe2.rem" />
</service>
</application>
</system.runtime.remoting>
</configuration>

This is my code in the service:

Protected Overrides Sub OnStart(ByVal args() As String)
RemotingConfiguration.Configure("MyService.exe.con fig")
Console.ReadLine()
End Sub

If i start service windows this problem to me:

the service is started, but it stops. Some services stops itself if there
aren't operations to execute, this is, for example, the case of the "event
viewer" service application

WHY?

Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Linesh Gajera | last post by:
Hi, I have unique problem. I have configured RemotingServer running as Console Application and my Remoting object access Oracle database. My remoting object make call to Oracle database and...
15
by: anders | last post by:
Hi! I have a config file that looks like this: <?xml version="1.0" encoding="utf-8" ?> <configuration> <system.runtime.remoting> <application> <service> <wellknown mode="SingleCall"...
2
by: Fadi | last post by:
Backround: I am trying to figure out how to do the equivalant of a classic COM Local Server Singleton in .NET/C#. I created a coupld of simple Class Libs that exposes public interfaces and hosted...
12
by: Mural Kumar via .NET 247 | last post by:
(Type your message here) -------------------------------- From: Mural Kumar Which is the best way to make a remoting server? 1)As a Windows service 2)As a simple exe, which will run in a...
2
by: Stephajn Craig | last post by:
Is it possible to apply remoting techniques to a Windows Service Application? I have an application that I'm building that is primarily ASP.NET based. However, there are some functions that I...
0
by: Kirk | last post by:
I'm trying to use a Web Service to be a Remoting client of an existing ..NET 2.0 server. But I get the following error when I try to use System.Runtime.Remoting.Channels.Http in my WebService. ...
0
by: Jason | last post by:
Ok, for the life of me, I just don't understand what's going on. I want to use remoting to send messages from a windows service to a windows form app, but I just can't get it to work. So, here's...
8
by: nyhetsgrupper | last post by:
I have written a windows service and want to expose a web based user interface for this service. I then wrote a class library containing a ..net remoting server. The class library have a method...
13
by: José Joye | last post by:
Hello, What is the best way to stop a remoting server (Singleton SAO) that has been started with RemotingConfiguration.Configure(). For sure, I want to do this without quitting the application...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.