我有以下代码可以在 exe 中工作,甚至可以在 CLR 中的小 xml 文件上工作,但是一旦它们大于 10mb,我就会收到线程中止错误。我需要在 SQL Server 中配置什么吗?
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)