# Controllin C# application from Ignition

**URL:** <https://forum.inductiveautomation.com/t/controllin-c-application-from-ignition/5253>\
**Category:** Ignition\
**Created:** [October 9, 2012, 12:56pm UTC](https://forum.inductiveautomation.com/t/controllin-c-application-from-ignition/5253 "2012-10-09T12:56:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![quper](https://avatars.discourse-cdn.com/v4/letter/q/aeb1de/32.png) [@quper](https://forum.inductiveautomation.com/u/quper)\
**Post date:** [October 9, 2012, 12:56pm UTC](https://forum.inductiveautomation.com/t/controllin-c-application-from-ignition/5253/1 "2012-10-09T12:56:40Z")

</div>

Hello,  
I have one ftp downloader written on C#. What is the best way to communicate with downloader through Ignition? I would like only to send command, like flag to start ftp session.

---

<div class="post-metadata">

**Author:** ![Colby.Clegg](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/colby.clegg/32/3282_2.png) [@Colby.Clegg](https://forum.inductiveautomation.com/u/Colby.Clegg)\
**Post date:** [October 9, 2012, 3:38pm UTC](https://forum.inductiveautomation.com/t/controllin-c-application-from-ignition/5253/2 "2012-10-09T15:38:41Z")

</div>

Hi,

That’s really going to depend on what interfaces the C# application makes available. In other words, what mechanisms does it provide to “send a command”?

The most likely scenario that I can think of is that the application may have a variety of command line flags that can be set in order to perform an operation. In other words, it wouldn’t be a two way dialog, but instead Ignition calling the application with parameters such as “connect to this server, download this file”. In that case, you could launch the application with the [system.util.execute()](http://inductiveautomation.com/support/usermanuals/ignition/system_util_execute.htm) scripting function.

Regards,

---

<div class="post-metadata">

**Author:** ![quper](https://avatars.discourse-cdn.com/v4/letter/q/aeb1de/32.png) [@quper](https://forum.inductiveautomation.com/u/quper)\
**Post date:** [October 11, 2012, 1:50pm UTC](https://forum.inductiveautomation.com/t/controllin-c-application-from-ignition/5253/3 "2012-10-11T13:50:35Z")

</div>

Hi,  
application does not need to be excecuted, it is running all the time.  
It can monitor opc server, database or windows service and so on, depends on what I will implement. I am just wondering what is the best way.  
I was thinking about socket connection, because monitoring database is a lot of queries and wasting cpu and ram. Is it possible to build socket connection from Ignition?

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [October 11, 2012, 3:23pm UTC](https://forum.inductiveautomation.com/t/controllin-c-application-from-ignition/5253/4 "2012-10-11T15:23:42Z")

</div>

[quote=“quper”]Hi,  
application does not need to be excecuted, it is running all the time.  
It can monitor opc server, database or windows service and so on, depends on what I will implement. I am just wondering what is the best way.  
I was thinking about socket connection, because monitoring database is a lot of queries and wasting cpu and ram. Is it possible to build socket connection from Ignition?[/quote]

Sure, you can open a Socket from a gateway/client/event/whatever script: [docs.python.org/release/2.5.2/li … ocket.html](http://docs.python.org/release/2.5.2/lib/module-socket.html)

---

<div class="post-metadata">

**Author:** ![quper](https://avatars.discourse-cdn.com/v4/letter/q/aeb1de/32.png) [@quper](https://forum.inductiveautomation.com/u/quper)\
**Post date:** [October 11, 2012, 4:39pm UTC](https://forum.inductiveautomation.com/t/controllin-c-application-from-ignition/5253/5 "2012-10-11T16:39:36Z")

</div>

Thank you!
