# Connection to Ignition OPC Server with a c# client

**URL:** <https://forum.inductiveautomation.com/t/connection-to-ignition-opc-server-with-a-c-client/11713>\
**Category:** Ignition\
**Created:** [May 24, 2016, 1:16pm UTC](https://forum.inductiveautomation.com/t/connection-to-ignition-opc-server-with-a-c-client/11713 "2016-05-24T13:16:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Totof](https://avatars.discourse-cdn.com/v4/letter/t/9de0a6/32.png) [@Totof](https://forum.inductiveautomation.com/u/Totof)\
**Post date:** [May 24, 2016, 1:16pm UTC](https://forum.inductiveautomation.com/t/connection-to-ignition-opc-server-with-a-c-client/11713/1 "2016-05-24T13:16:47Z")

</div>

Hi everyone!

I’m working on a project wich consist of developping a Visual Studio application that will be connected to a PLC throught an Ignition OPC Server.

First I just created a “Simulators Dairy Demo Simulator” in Ignition and I’m trying right know to connect my little C# Client on it and…I’m really struggling to do that.

Here is my code which is trying to get a connection to Ignition:

```auto
            Opc.URL url;
            [color=#FF0000]url= new Opc.URL("????"); [/color] //I don't know what URL I have to put here...                                           
            Opc.Da.Server server = null;
            OpcCom.Factory fact = new OpcCom.Factory();
            server = new Opc.Da.Server(fact, null);

            // connection
            try
            {         
                [color=#FF0000]server.Connect(url, new Opc.ConnectData(new System.Net.NetworkCredential()));[/color]
                _connection = true;
            }
            catch(Exception e)
            {
                Console.WriteLine("{0} Exception caught.", e.Source);
                _connection = false;
            }
```

Basically I have no idea on what url I have to put to being connected to the Ignition OPC server…

I will be very greateful for help ! ![:prayer:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/e5a7e3b63facc151ea73e3b45db7bdb3d4bdc316.gif ":prayer:")

Thanks !

Totof

---

<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:** [May 24, 2016, 1:51pm UTC](https://forum.inductiveautomation.com/t/connection-to-ignition-opc-server-with-a-c-client/11713/2 "2016-05-24T13:51:26Z")

</div>

Ignition does not have an OPC-DA server, so I think you’ll need a different library than you’re using. You need something that can do OPC-UA.

The endpoint URL will be something like: opc.tcp://1.2.3.4:4096

---

<div class="post-metadata">

**Author:** ![Totof](https://avatars.discourse-cdn.com/v4/letter/t/9de0a6/32.png) [@Totof](https://forum.inductiveautomation.com/u/Totof)\
**Post date:** [May 24, 2016, 2:07pm UTC](https://forum.inductiveautomation.com/t/connection-to-ignition-opc-server-with-a-c-client/11713/3 "2016-05-24T14:07:16Z")

</div>

Well, the problem is in my Ignition OPC Server Connections there is a OPC UA Server at the beginning as Ignition OPC-UA Server…

I created a OPC-DA COM Connection but is status is ‘fault’ and I’m really stuck now…

Do you know any other C# library used for Ignition?

---

<div class="post-metadata">

**Author:** ![diat150](https://avatars.discourse-cdn.com/v4/letter/d/a587f6/32.png) [@diat150](https://forum.inductiveautomation.com/u/diat150)\
**Post date:** [May 24, 2016, 2:58pm UTC](https://forum.inductiveautomation.com/t/connection-to-ignition-opc-server-with-a-c-client/11713/4 "2016-05-24T14:58:59Z")

</div>

[quote=“Totof”]Well, the problem is in my Ignition OPC Server Connections there is a OPC UA Server at the beginning as Ignition OPC-UA Server…

I created a OPC-DA COM Connection but is status is ‘fault’ and I’m really stuck now…

Do you know any other C# library used for Ignition?[/quote]

what kevin is saying is that ignition does not support accessing tags(acting as a server) over a opc-da connection. It can only act as a client using opc-da. You will need to find a c# librry that supports opc-ua.

---

<div class="post-metadata">

**Author:** ![Totof](https://avatars.discourse-cdn.com/v4/letter/t/9de0a6/32.png) [@Totof](https://forum.inductiveautomation.com/u/Totof)\
**Post date:** [May 25, 2016, 9:25am UTC](https://forum.inductiveautomation.com/t/connection-to-ignition-opc-server-with-a-c-client/11713/5 "2016-05-25T09:25:44Z")

</div>

Hi everyone !

I tried something else with this sample opc client which you can find here:

[support.industry.siemens.com/cs … 0&lc=en-WW](https://support.industry.siemens.com/cs/document/42014088/programming-an-opc-ua-net-client-with-c-for-the-simatic-net-opc-ua-server?dti=0&lc=en-WW)

However when I’m trying to connect, I’ve got this error connection:

“could not add self-signed certificate to certificate store”, what does it mean ? ![:scratch:](https://us1.discourse-cdn.com/inductiveautomation/original/1X/76d1620bec252bfac07050c889ff5a91dc8a9c25.gif ":scratch:")

Is it possible that Inductive Automation doesn’t allow other client like visual studio to connect to Ignition OPC Server ?? : 😮
