Child Apps (spawned processes) cannot access SQL Server

0

I have a utility app that saves data from a stream to a SQL Server db.

I need to run multiple instances of this app to download and save different streams of data from the same site.

I have a 'parent' app that allows me to configure and spawn these child apps ( using ProcessStartInfo startInfo = new ProcessStartInfo("MyAppEtc"); )

This works fine on my dev laptop - I spawn child apps, they save data.

When I install these apps on a server:

  1. If I run the child apps by themselves (i.e. not spawning them from the parent app, they work fine, save data.)

  2. If I spawn them from the parent, the child apps cannot connect to SQL Server.

The connection string is contained in the child app and authenticates using SQL Server authentication (username/pw) so doesn't change whether run standalone or spawned from the parent app.

Note: These are clickonce apps if that makes a difference.

Error: System.Data.SqlClient.SqlException (0x80131904): A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified) at System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, SqlCredential credential, Object providerInfo, String newPassword, SecureString newSecurePassword, Boolean redirectedUserInstance, SqlConnectionString userConnectionOptions, SessionData reconnectSessionData, DbConnectionPool pool, String accessToken, Boolean applyTransientFaultHandling, SqlAuthenticationProviderManager sqlAuthProviderManager)

Can anyone make suggestions as to why this is happening?

c#
sql-server
asked on Stack Overflow Jun 3, 2018 by Dave Tapson • edited Jun 4, 2018 by Dave Tapson

1 Answer

0

Seems the parent app had a reference to an older version of the child app.

answered on Stack Overflow Jun 4, 2018 by Dave Tapson

User contributions licensed under CC BY-SA 3.0