Protected Sub connectToSDE_QRAEdit() Log.Log("*********Connecting to QRA workspace**********", _logFileName) ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.Server) Dim qraPropSet As New PropertySet() Dim qraWorkspaceFactory As IWorkspaceFactory = New SdeWorkspaceFactory Dim qraWS_Edit As IWorkspace Try Dim pAoInitialize As IAoInitialize pAoInitialize = New AoInitialize Dim licenseStatus As esriLicenseStatus Dim productCode As esriLicenseProductCode productCode = esriLicenseProductCode.esriLicenseProductCodeArcServer licenseStatus = pAoInitialize.Initialize(productCode) If (Not (licenseStatus = esriLicenseStatus.esriLicenseCheckedOut)) Then Log.LogError("", New Exception("License Initialization Failed error = " & licenseStatus), _logFileName) Throw New Exception("License Initialization Failed error = " & licenseStatus) End If qraPropSet.SetProperty("SERVER", Common.AppSettings("SERVER")) qraPropSet.SetProperty("INSTANCE", Common.AppSettings("INSTANCE")) qraPropSet.SetProperty("USER", Common.AppSettings("QRA_USER")) qraPropSet.SetProperty("PASSWORD", Common.AppSettings("QRA_PASSWORD")) qraPropSet.SetProperty("VERSION", Common.AppSettings("VERSION")) qraPropSet.SetProperty("AUTHENTICATION_MODE", Common.AppSettings("AUTHENTICATION_MODE")) qraWS_Edit = qraWorkspaceFactory.Open(qraPropSet, 0) qraEditWorkspace = CType(qraWS_Edit, IFeatureWorkspace) Catch ex As Exception Log.Log(LogLevel.DetailedInfo, "Error trying to connect to SDE. [1]: " & ex.Message & vbCrLf & ex.StackTrace, _logFileName) Log.LogError("Error trying to connect to SDE", ex, _logFileName) Throw Finally End Try End Sub
Did you ever figure out what caused the problem, and how to fix it? I am experiencing the same issue now