We are trying to access a PI system using a .NET webservice with the below connection string.
<add name="PIOLEDBConnection" connectionString="Initial Catalog=piarchive;Data Source = <CLIENT-PI-SERVER>;Persist Security Info = False;Integrated Security = SSPI;" providerName="PIOLEDB.1"/>
However when our client app (in house app that has been used on a number of other clients' PI systems) tries to connect, it returns the following error:
[PI Service] System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> System.Exception: Exception thrown while trying to get PITAG DATA!
Exception Message:[PI SDK] The requested server is not currently available.
Stack Trace: at System.Data.OleDb.OleDbConnectionInternal..ctor(OleDbConnectionString constr, OleDbConnection connection)
at System.Data.OleDb.OleDbConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreateNonPooledConnection(DbConnection owningConnection, DbConnectionPoolGroup poolGroup)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.OleDb.OleDbConnection.Open()
at NativeService.Business.PIManager.GetPITagData(tagDataRequest theTagDataRequest) in c:\Dev\dotNET\-native-service\NativeService\NativeService\Business\PIManager.cs:line 77
Query:
Connection String:Provider=PIOLEDB.1;Initial Catalog=piarchive;Data Source = <CLIENT-PI-SERVER>;Persist Security Info = False;Integrated Security = SSPI;
at NativeService.Business.PIManager.GetPITagData(tagDataRequest theTagDataRequest) in c:\Dev\dotNET\-native-service\NativeService\NativeService\Business\PIManager.cs:line 142
at NativeService.PIService.getPITagData(tagDataRequest tagDataRequest) in c:\Dev\dotNET\-native-service\NativeService\NativeService\PIService.asmx.cs:line 94
--- End of inner exception stack trace ---
If we try to connect directly using the PIOLEDB client, we can connect fine.
So I can only think this is an issue with either Firewall or Windows account authentication (see we're using SSPI)
Unfortunately this is as client’s PI system so we have no direct access to the system itself and are reliant on the client providing access (something they seem to feel they have done).
I know the error is very generic and gives very little detail but was just hoping someone would have seen the 'currently unavailable' error before and point us/client in the general direction of what they should
be looking at. As I say, if we try to connect via the PIOLEDB client, everything is fine.
Appreciate your feedback
K