473,796 Members | 2,690 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Remote Agents

KV
Anybody here created an agent? I need to create an agent that runs as a
Windows service. The agent would listen on a certain TCP port and run
executable files sent to it from a master program.

I have these questions:

- Is C# a decent language to write this in?
- If there are any major issues, what are they?
- Do you know where I can find example source code for such a project?
It can be in almost any language.

Any help would be appreciated.

-KV
Nov 16 '05 #1
6 2495
Hi,


- Is C# a decent language to write this in?
Sure it's
- If there are any major issues, what are they?
security, you have to be very carefull with who has permission to exec. what
- Do you know where I can find example source code for such a project?


This is nothing different than a regular TCP server with a defined protocol
to send/receive commands.

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
Nov 16 '05 #2
I have worked on IBM aglets SDK which was built using Java and is similar to
what you are referring to. There are many frameworks that enable you to do
the same. I have looked at .NET as a platform for making a remote agent
system and it is suitable to develop such a framework. You can use C#,
VB.NET or any .NET language. IBM aglets SDK and many other similar frame
works are open source.
Can I ask you what you are trying to achieve?
I think such a framework in MS developers' hands makes it easy to come up
with killer apps and thus makes the framework more meaningful.

"KV" <na*****@yahoo. com> wrote in message
news:10******** *****@corp.supe rnews.com...
Anybody here created an agent? I need to create an agent that runs as a
Windows service. The agent would listen on a certain TCP port and run
executable files sent to it from a master program.

I have these questions:

- Is C# a decent language to write this in?
- If there are any major issues, what are they?
- Do you know where I can find example source code for such a project?
It can be in almost any language.

Any help would be appreciated.

-KV

Nov 16 '05 #3
KV
Sankar Nemani wrote:
I have worked on IBM aglets SDK which was built using Java and is similar to
what you are referring to. There are many frameworks that enable you to do
the same. I have looked at .NET as a platform for making a remote agent
system and it is suitable to develop such a framework. You can use C#,
VB.NET or any .NET language. IBM aglets SDK and many other similar frame
works are open source.
Can I ask you what you are trying to achieve?
I think such a framework in MS developers' hands makes it easy to come up
with killer apps and thus makes the framework more meaningful.


I appreciate your help, as well as Ignacio's. I found the Aglet site,
so I will learn as much as possible there.

The place where I work has many remote machines that are not part of a
domain. These machines cannot be managed by WMI, and therefore not by
SMS or other such management programs, due to permissions issues. But
these machines must be updated when certain problems crop up. The most
recent example is Windows XP SP2. We wanted to update all of these
remote computers so their firewall is disabled when SP2 is installed.
Besides, there are times when we want to do custom updates as well.
Simply having a patch management program won't do this. A custom
written agent could be used on every computer, and could be made to
execute any program.

As it stands right now, we have an FTP server running on every single
remote machine. The FTP program has an extension that allows downloaded
files to be executed. Due to the insecure nature of FTP, and given the
fact that our approach is generally cheesy, I would like to write
something better.

I'm only beginning C#, and I don't have any C++ experience. But I've
found the best way to learn is by doing something. That is why I've
asked for examples. I'm confident I can learn the basics, but I want to
engage in good practices that are fairly standardized.

As far as what I'm trying to write - it only needs to be capable of
receiving programs via TCP/IP and executing them through the shell (Most
of what I push down is a custom-written app without a console anyway).
I would think this is simple to write. It needs to run as a service
(all of our machines are NT-based). Later, I could imagine adding some
logging and other features. I would like to keep it as simple as
possible at first so I can learn.

I would certainly welcome any specific ideas you might have.

-KV
Nov 16 '05 #4
You may also want to check out (google) psexec.exe at sysinternals.co m. Can
run a command at remote windows server and see output. Can also upload a
file and run it simply. May give you some ideas.

--
William Stacey, MVP

"KV" <na*****@yahoo. com> wrote in message
news:10******** *****@corp.supe rnews.com...
Sankar Nemani wrote:
I have worked on IBM aglets SDK which was built using Java and is similar to what you are referring to. There are many frameworks that enable you to do the same. I have looked at .NET as a platform for making a remote agent
system and it is suitable to develop such a framework. You can use C#,
VB.NET or any .NET language. IBM aglets SDK and many other similar frame
works are open source.
Can I ask you what you are trying to achieve?
I think such a framework in MS developers' hands makes it easy to come up with killer apps and thus makes the framework more meaningful.


I appreciate your help, as well as Ignacio's. I found the Aglet site,
so I will learn as much as possible there.

The place where I work has many remote machines that are not part of a
domain. These machines cannot be managed by WMI, and therefore not by
SMS or other such management programs, due to permissions issues. But
these machines must be updated when certain problems crop up. The most
recent example is Windows XP SP2. We wanted to update all of these
remote computers so their firewall is disabled when SP2 is installed.
Besides, there are times when we want to do custom updates as well.
Simply having a patch management program won't do this. A custom
written agent could be used on every computer, and could be made to
execute any program.

As it stands right now, we have an FTP server running on every single
remote machine. The FTP program has an extension that allows downloaded
files to be executed. Due to the insecure nature of FTP, and given the
fact that our approach is generally cheesy, I would like to write
something better.

I'm only beginning C#, and I don't have any C++ experience. But I've
found the best way to learn is by doing something. That is why I've
asked for examples. I'm confident I can learn the basics, but I want to
engage in good practices that are fairly standardized.

As far as what I'm trying to write - it only needs to be capable of
receiving programs via TCP/IP and executing them through the shell (Most
of what I push down is a custom-written app without a console anyway).
I would think this is simple to write. It needs to run as a service
(all of our machines are NT-based). Later, I could imagine adding some
logging and other features. I would like to keep it as simple as
possible at first so I can learn.

I would certainly welcome any specific ideas you might have.

-KV


Nov 16 '05 #5

Hi,

If this is your case then I will also take a look at installing terminal
services. You see some programs ( including the SP 2 setup? ) needs user
interaction as they are not prepared to be used from the command line. this
may be also true with some configuration settings of windows.

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

I appreciate your help, as well as Ignacio's. I found the Aglet site,
so I will learn as much as possible there.

The place where I work has many remote machines that are not part of a
domain. These machines cannot be managed by WMI, and therefore not by
SMS or other such management programs, due to permissions issues. But
these machines must be updated when certain problems crop up. The most
recent example is Windows XP SP2. We wanted to update all of these
remote computers so their firewall is disabled when SP2 is installed.
Besides, there are times when we want to do custom updates as well.
Simply having a patch management program won't do this. A custom
written agent could be used on every computer, and could be made to
execute any program.

As it stands right now, we have an FTP server running on every single
remote machine. The FTP program has an extension that allows downloaded
files to be executed. Due to the insecure nature of FTP, and given the
fact that our approach is generally cheesy, I would like to write
something better.

I'm only beginning C#, and I don't have any C++ experience. But I've
found the best way to learn is by doing something. That is why I've
asked for examples. I'm confident I can learn the basics, but I want to
engage in good practices that are fairly standardized.

As far as what I'm trying to write - it only needs to be capable of
receiving programs via TCP/IP and executing them through the shell (Most
of what I push down is a custom-written app without a console anyway).
I would think this is simple to write. It needs to run as a service
(all of our machines are NT-based). Later, I could imagine adding some
logging and other features. I would like to keep it as simple as
possible at first so I can learn.

I would certainly welcome any specific ideas you might have.

-KV

Nov 16 '05 #6
KV
Ignacio Machin ( .NET/ C# MVP ) wrote:
Hi,

If this is your case then I will also take a look at installing terminal
services. You see some programs ( including the SP 2 setup? ) needs user
interaction as they are not prepared to be used from the command line. this
may be also true with some configuration settings of windows.

Cheers,


Terminal services would work for a few workstations, maybe even a dozen.
I have over 300 that I must look after in this fashion. All are in
remote locations, coming in through different ISPs, with different
connection speeds, etc.

XP SP2 firewall can be disabled through a registry key, proactively,
before SP2 is even installed. I did this through a script.

Almost everything can be controlled, or at least crippled, via command
line. I remember one time McAfee screwed up all of our machines by
releasing a bad pattern file (it caused an unrecoverable BSOD during a
subsequent reboot). We had to update all of our machines in a hurry
before they rebooted. We sent a .reg file that prevented the virus
scanner from starting. We only lost about 10 computers that day.

Anyway, those are some of the reasons I'm seeking what I am. I don't
imagine it will be easy to write. Hey, anyone want to start a new open
source project?!? =)

-KV
Nov 16 '05 #7

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

Similar topics

3
1611
by: Jim | last post by:
I have a situation with a 6 server setup whereby merge agents will not run if other merge agents are alreay running. Basically we have a 5 laptop, one tower config with the tower being the publisher. In theory we want to be able to hook a laptop up and have it sync within, say, 5 mins. Trouble is, if agents for the other laptops are running (trying and failing to connect because those laptops aren't connected) then the agents for the...
0
1544
by: Conference Secretary | last post by:
CALL FOR PAPERS International Conference on Intelligent Agents, Web Technologies and Internet Commerce http://www.ise.canberra.edu.au/conferences/iawtic05/ Jointly with International Conference on Computational Intelligence for Modelling, Control and Automation
0
2182
by: Conference Secretary | last post by:
CALL FOR PAPERS International Conference on Intelligent Agents, Web Technologies and Internet Commerce http://www.ise.canberra.edu.au/conferences/iawtic05/ Jointly with International Conference on Computational Intelligence for Modelling, Control and Automation
1
5913
by: Michael Howes | last post by:
I have a c# windows form that talks to a web service on a server that then can talk to multiple "agents" on different machines using web service calls. I want to be able to launch an application of the users choice on the remove, "agent" machine. I've discovered that Process.Start() won't work because it runs under asp.net and it will launch any "process" but if the application has a windows UI it will not show.
1
3366
by: db2udbgirl | last post by:
When I issue an db2 list applications on my DB2 UDB V8.2 database on AIX 5.3 I get the following o/p /home/card30/admin] > db2 list applications Auth Id Application Appl. Application Id DB # of Name Handle Name Agents -------- -------------- ---------- ------------------------------ -------- -----
5
1808
by: thermate2 | last post by:
Here is the daily good news. ======================== It was established at the Nuremberg that simple excuse of "following the orders" will not save your skin from crimes. You must at ALL TIMES work according to the International law and also in the USA according to the constitution, no matter who your boss is and what he tells you to do. Can someone remind me what CIA stands for? ... Is it Criminal International Agency ?
3
3349
by: Woody Ling | last post by:
>From the DB2 UDB memory model document, I found the following info: ============================== The agent private memory set consist of the following memory pools. Their sizes are specified in the database configuration parameters enclosed in parenthesis: Application Heap (applheapsz) Sort Heap (sortheap) Statement Heap (stmtheap)
2
4917
by: shorti | last post by:
DB2 UDB V8.2 on AIX. Is there a db2 command/function to terminate a single idle agents from the agent pool. I could kill -9 the process but I was wonder if there was a more graceful or appropriate way to do this. I did not see an API call like sqleEndCtx that could perminently remove the agent and clean up memory. Any ideas?
4
3017
by: Steven Simpson | last post by:
Stefan Ram wrote (in "More than one language in a page"): Is this a new trend of user-agent writers (Microformats, and now Google) staking claims on the @class namespace? I'm surely not the only one disturbed by this. Somehow, an author publishing on the web, with no control over which user agents will access his page, has to avoid clashes with the union of all names deemed special by all those user agents, now and in the future? I...
0
9679
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9527
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10453
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
7546
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6785
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5573
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4115
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3730
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2924
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.