EXE에서 작동하며 CLR의 작은 xml 파일에서도 작동하는 코드가 있지만 10MB보다 커지면 스레드 낙태 오류가 발생합니다. SQL Server에서 구성해야 할 것이 있습니까?CLR 저장 프로 시저 스레드 예외
Try
sStream = HttpRequest.GetRequestStream()
sStream.Write(baByteArray, 0, baByteArray.Length)
sStream.Close()
wrWebResponse = HttpRequest.GetResponse()
sStream = wrWebResponse.GetResponseStream()
Dim readStream As New StreamReader(sStream, System.Text.Encoding.UTF8)
strXmlResponse = readStream.ReadToEnd() ' Errors out here
strXmlResponseDoc.LoadXml(strXmlResponse)
wrWebResponse.Close()
sStream.Close()
readStream.Close()
Catch ex As Exception
SqlContext.Pipe.Send(ex.ToString())
clsE.LogError(ex.ToString())
End Try
오류 메시지 :
System.Threading.ThreadAbortException: Thread was being aborted.
at System.Threading.Thread.AbortInternal()
at System.Threading.Thread.Abort(Object stateInfo)
at System.Data.SqlServer.Internal.ClrLevelContext.CheckSqlAccessReturnCode(SqlAccessApiReturnCode eRc)
at System.Data.SqlServer.Internal.ClrLevelContext.SendMessageToPipe(String message, SmiEventSink eventSink)
at Microsoft.SqlServer.Server.SqlPipe.Send(String message)
at MacCLR.MacClass.RequestXml(String strXmlToSend)
at MacCLR.StoredProcedures.ProcessShippingXML_1(String iOrderNumb, String iXmlFilePath, String iXmlFileName, SqlInt32& iResult, SqlString& iResult_String)
예. .NET의 CLR 저장 프로 시저입니다. – Somejerk
차갑습니다. 나는 .NET 언어 태그를 추가했는데, 항상 SO에서 기본 태그가되어야합니다. 감사. – Gray
SQLCLR에서 파일을 다운로드하지 마십시오. 외부 .exe –