Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Notifications
Login / Register
Community
Community
Notifications
close
  • Forums
  • Knowledge Center
  • Events & Webinars
  • Ideas
  • Blogs
Help
Help
  • Explore Community
  • Get Started
  • Ask the Community
  • How-To & Best Practices
  • Contact Support
Login / Register
Sustainability
Sustainability

Join our "Ask Me About" community webinar on May 20th at 9 AM CET and 5 PM CET to explore cybersecurity and monitoring for Data Center and edge IT. Learn about market trends, cutting-edge technologies, and best practices from industry experts.
Register and secure your Critical IT infrastructure

.Net Application Database Connection Failure

EcoStruxure Geo SCADA Expert Forum

Schneider Electric support forum about installation, configuration, integration and troubleshooting of EcoStruxure Geo SCADA Expert (ClearSCADA, ViewX, WebX).

cancel
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
Showing results for 
Show  only  | Search instead for 
Did you mean: 
  • Home
  • Schneider Electric Community
  • Remote Operations
  • EcoStruxure Geo SCADA Expert Forum
  • .Net Application Database Connection Failure
Options
  • Subscribe to RSS Feed
  • Mark Topic as New
  • Mark Topic as Read
  • Float this Topic for Current User
  • Bookmark
  • Subscribe
  • Mute
  • Printer Friendly Page
Invite a Co-worker
Send a co-worker an invite to the portal.Just enter their email address and we'll connect them to register. After joining, they will belong to the same company.
You have entered an invalid email address. Please re-enter the email address.
This co-worker has already been invited to the Exchange portal. Please invite another co-worker.
Please enter email address
Send Invite Cancel
Invitation Sent
Your invitation was sent.Thanks for sharing Exchange with your co-worker.
Send New Invite Close
Top Experts
User Count
sbeadle
Kirk sbeadle Kirk
307
AndrewScott
Admiral AndrewScott
96
BevanWeiss
Spock BevanWeiss
90
AdamWoodlandToo
Lt. Commander AdamWoodlandToo
36
View All
Related Products
product field
Schneider Electric
EcoStruxure™ Geo SCADA Expert

Invite a Colleague

Found this content useful? Share it with a Colleague!

Invite a Colleague Invite
Back to EcoStruxure Geo SCADA Expert Forum
sgussy
Crewman sgussy
Crewman

Posted: ‎2022-03-16 01:50 PM . Last Modified: ‎2023-05-02 11:57 PM

0 Likes
3
902
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2022-03-16 01:50 PM . Last Modified: ‎2023-05-02 11:57 PM

.Net Application Database Connection Failure

Hello,

 

I just developed a .Net Application that queried the GeoSCADA database via an Advanced Connection and published to a remote MySQL Database and it was successful.

 

I am replicating that project, except it will publish to a database via an API call.  The only difference is the first app was GeoSCADA 2020 and this project is ClearSCADA 2017 R3. 

 

I have confirmed that 127.0.0.1 connects to the server on the local machine and that the port is 5481 so i don't think the ServerNode object is the issue.  

 

The only glaring difference I see is that in the first project the line:

AdvConnection = node.Connect("Utility"); was AdvConnection = node.Connect("Utility", false);

For some reason in this project, it will only allow me to provide the clientName.  Trying to add the False gives an error.

 

So the program is not erroring, but is instead not connecting the Database. ie, the Try...Catch... Code at the bottom.

 

PROJECT CODE BELOW: (Only to the Catch that is throwing the "Cannot Connect...."

 

 

 

using System;
using System.IO;
using System.Data;
using System.Threading.Tasks;
using ClearScada.Client;
using ClearScada.Client.Advanced;

namespace SCADA_API_Console_App
{
	static class Program
	{
		// Global node and Geo SCADA server connection -- using ClearScada.Client.Advanced;
		private static ServerNode node;
		private static IServer AdvConnection;

		/// <summary>
		/// Program to query and publish data from the GeoSCADA database via API Call
		/// </summary>
		/// <param name="args"></param>
		/// <returns></returns>

		async static Task Main(string[] args)
		{
			//Create
			StreamWriter LogFiler = new StreamWriter(@"C:\SCADA_VS_Apps\SCADA_API_Console_Logfile.txt", append: true);
			LogFiler.WriteLine(DateTime.Now + ": Logger Initiated.");

			// Geo SCADA Connection
			node = new ServerNode(ClearScada.Client.ConnectionType.Standard, "127.0.0.1", 5481);
			try
			{
				AdvConnection = node.Connect("Utility");
			}
			catch
			{
				LogFiler.WriteLine(DateTime.Now + ": Cannot connect to Geo SCADA - Advanced Connection Failure");
				LogFiler.WriteLine("!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
				LogFiler.WriteLine(" ");
				LogFiler.Close();
				Console.WriteLine("Cannot connect to Geo SCADA");
				return;
			}

 

 

 

Labels
  • Labels:
  • SCADA
  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA software
  • SCADA tutorial
  • Telemetry and SCADA
Reply

Link copied. Please paste this link to share this article on your social media post.

  • All forum topics
  • Previous Topic
  • Next Topic
Replies 3
sgussy
Crewman sgussy
Crewman

Posted: ‎2022-03-16 02:07 PM

0 Likes
2
901
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2022-03-16 02:07 PM

I should also note that it appears, i am using .Net 5.0 on the new project where the old project used .Net 4.7.2. 

 

These are two different servers/clients.

 

@sbeadle I see you're quite active on here and have used your github for reference in the past, maybe you have seen this before.  I am very confused why the node won't allow the false when every example contains it.

  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA software
  • SCADA tutorial
  • Telemetry and SCADA
Reply

Link copied. Please paste this link to share this article on your social media post.

BevanWeiss
Spock BevanWeiss
Spock

Posted: ‎2022-03-16 02:48 PM . Last Modified: ‎2022-10-19 01:01 AM

In response to sgussy
0 Likes
1
895
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2022-03-16 02:48 PM . Last Modified: ‎2022-10-19 01:01 AM

There's going to be a few things in play.

 

  1. Client<->Server compatibility.  https://community.se.com/t5/Geo-SCADA-Knowledge-Base/Geo-SCADA-and-ClearSCADA-Version-Compatibility-...
    From this it seems that Geo SCADA Expert 2020 client should be compatible back to ClearSCADA 2017R3.
  2. Client DLL version vs your application ABI
    The best option here is to ship the client DLLs alongside your application.  In this way whilst you're always using a fixed client version, it is one that you have validated with your application.  If you don't do this, and allow for the Windows DLL resolution stuff.. you'll want to make sure that the client has a matching version of the DLL that will work with the expected ABI of your application (i.e. the same call signatures.. which sounds like is not the case for your situation).
  3. .NET... I'm unaware of .NET 5 being at all backward compatible with .NET FRAMEWORK 4.x  This is important to note that there are numerous forms of .NET, and they are generally all incompatible.  i.e. .NET Framework 1.5 and .NET Framework 3.5 are entirely different.. I'm pretty sure once into the .NET Framework 4.x series there is backwards compatibility, but .NET Core is entirely different again (with .NET Core 1 and .NET Core 2 being incompatible).. .NET 5.0 is supposed to be where they are unifying the various versions... so .NET Framework concepts are being brought into .NET Core.. but I suspect this is going to result in another incompatible ABI where .NET 5 will not be compatible with any .NET Core, or any .NET Framework.
    Since Geo SCADA Expert 2020 is built against .NET 4.7.1 (I think) you should be able to go with any later release in the .NET Framework 4.x.x family (i.e. .NET Framework 4.8.2 etc)

Lead Control Systems Engineer for Alliance Automation (VIC).
All opinions are my own and do not represent the opinions or policies of my employer, or of my cat..
  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA software
  • SCADA tutorial
  • Telemetry and SCADA
Reply

Link copied. Please paste this link to share this article on your social media post.

sbeadle
Kirk sbeadle Kirk
Kirk

Posted: ‎2022-03-17 02:53 AM

In response to BevanWeiss
0 Likes
0
872
  • Mark as New
  • Bookmark
  • Subscribe
  • Mute
  • Subscribe to RSS Feed
  • Permalink
  • Print
  • Email to a Friend
  • Report Inappropriate Content

Link copied. Please paste this link to share this article on your social media post.

Posted: ‎2022-03-17 02:53 AM

Firstly - what Bevan wrote.

 

Plus:

* Very occasionally the API changes, which explains the change of arguments to Connect

* Your code did not print the exception message which can be useful to understand the problem. (catch (exception e) ... writeline( e.message ...

 

Steve

  • Tags:
  • english
  • scada
  • SCADA app
  • SCADA software
  • SCADA tutorial
  • Telemetry and SCADA
Reply

Link copied. Please paste this link to share this article on your social media post.

Preview Exit Preview

never-displayed

You must be signed in to add attachments

never-displayed

 
To The Top!

Forums

  • APC UPS Data Center Backup Solutions
  • EcoStruxure IT
  • EcoStruxure Geo SCADA Expert
  • Metering & Power Quality
  • Schneider Electric Wiser

Knowledge Center

Events & webinars

Ideas

Blogs

Get Started

  • Ask the Community
  • Community Guidelines
  • Community User Guide
  • How-To & Best Practice
  • Experts Leaderboard
  • Contact Support
Brand-Logo
Subscribing is a smart move!
You can subscribe to this board after you log in or create your free account.
Forum-Icon

Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.

Register today for FREE

Register Now

Already have an account? Login

Terms & Conditions Privacy Notice Change your Cookie Settings © 2025 Schneider Electric

This is a heading

With achievable small steps, users progress and continually feel satisfaction in task accomplishment.

Usetiful Onboarding Checklist remembers the progress of every user, allowing them to take bite-sized journeys and continue where they left.

of