Yes, I tried changing the UseRecycling to false but that didn't help. I've also wondered if it was due to the fact that I'm calling this from a windows service on my local machine and i'm not sure if there are permission issues. Lastly, when connecting to the workspace i'm using the ArcServer product code to initialize. Not sure if thats right either.
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