cancel
Showing results for 
Search instead for 
Did you mean: 

NCo: SNC connection causes AccessViolationException which tears the whole process down

0 Kudos

We're using SAP .NET Connector 3.0.23.0 to connect to an SNC-enabled SAP system. Executing our application with standard user permissions yields the following exception:

System.AccessViolationException
 at <Module>.SAP_STINIT3(Byte*, Char*, Char*, Char*, Char*, Char*, Char, Int32, CPIC_SNC_DATA*, Int32*)
 at SAP.Middleware.Connector.CpicConnection.ConnectAsClient(System.Collections.Generic.Dictionary`2<System.String,System.String>, Boolean)
 at SAP.Middleware.Connector.RfcConnection.ConnectAsClient(SAP.Middleware.Connector.RfcDestination, Boolean)
 at SAP.Middleware.Connector.RfcConnectionPool..ctor(SAP.Middleware.Connector.RfcDestination, Boolean)
 at SAP.Middleware.Connector.RfcConnectionPool.GetPool(SAP.Middleware.Connector.RfcDestination, Boolean, Boolean)
 at SAP.Middleware.Connector.RfcDestination.GetClient(Boolean)
 at SAP.Middleware.Connector.RfcDestination.SetAttributeValues()
 at SAP.Middleware.Connector.RfcDestination.get_SystemAttributes()
 at SAP.Middleware.Connector.RfcRepository.GetRepositoryForDestination(SAP.Middleware.Connector.RfcDestination)
 at SAP.Middleware.Connector.RfcDestination.get_Repository()

As you probably know, an AccessViolationException is one of very few exceptions that are so severe that it takes the whole process down (for good reasons).

In contrast, running our application with admin permissions works fine. However, we really do not intend to run our application with admin permissions just because we need to use SNC.

Is there a workaround? Or a fix from SAP?

cris_hansen
Advisor
Advisor
0 Kudos

Hi Stavros,

Have you checked in the backend system for SNC-related errors while you try to use the .NET app?

Regards,

Cris

Accepted Solutions (0)

Answers (0)