''''''''''''''''''''''''' Function in custom web service to call Reporting Services web service Render Private Function RenderReport(ByVal reportName As String, ByVal reportFormat As String, ByVal parameters() As ParameterValue) As Byte() Try rptService.Credentials = System.Net.CredentialCache.DefaultCredentials Return rptService.Render(reportName, reportFormat, _ Nothing, Nothing, parameters, _ Nothing, Nothing, Nothing, Nothing, Nothing, Nothing, Nothing) Catch ex As Exception WriteToErrorLog(ex.ToString()) Throw ex End Try End FunctionMost of the time everything works fine but intermittently an error is
System.InvalidOperationException: There is an error in XML document (1, 948). ---> System.Net.WebException: The operation has timed-out. at System.Net.ConnectStream.Read(Byte[] buffer, Int32 offset, Int32 size) at System.IO.StreamReader.ReadBuffer(Char[] userBuffer, Int32 userOffset, Int32 desiredChars, Boolean& readToUserBuffer) at System.IO.StreamReader.Read(Char[] buffer, Int32 index, Int32 count) at System.Xml.XmlScanner.Read() at System.Xml.XmlScanner.IncrementalRead(Object destBuffer, Int32 index, Int32 count, XmlTextReader reader, IncrementalReadType readType) at System.Xml.XmlTextReader.IncrementalRead(Object buffer, Int32 index, Int32 count, IncrementalReadType readType) at System.Xml.Serialization.XmlSerializationReader.ReadByteArray(Boolean isBase64) at System.Xml.Serialization.XmlSerializationReader.ToByteArrayBase64(Boolean isNull) at Microsoft.Xml.Serialization.GeneratedAssembly.XmlSerializationReader1.Read171_RenderResponse() --- End of inner exception stack trace --- at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, String encodingStyle, XmlDeserializationEvents events) at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader, XmlDeserializationEvents events) at System.Xml.Serialization.XmlSerializer.Deserialize(XmlReader xmlReader) at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at AADAC.STORS.ReportWriter.ReportingServicesWebService.ReportingService.Render(String Report, String Format, String HistoryID, String DeviceInfo, ParameterValue[] Parameters, DataSourceCredentials[] Credentials, String ShowHideToggle, String& Encoding, String& MimeType, ParameterValue[]& ParametersUsed, Warning[]& Warnings, String[]& StreamIds) at AADAC.STORS.ReportWriter.ReportWriter.RenderReport(String reportName, String reportFormat, ParameterValue[] parameters)