August 10, 2017 at 7:41 am
I am running 2016 and using the ReportingService2010. I am trying to run this code sample from the documentation:
var items = rs.ListChildren("/", false);
But I always get this Exception:
"Client found response content type of '', but expected 'text/xml'.\r\nThe request failed with an empty response."
Has anyone run into this error?
August 10, 2017 at 8:26 am
fthurber - Thursday, August 10, 2017 7:41 AMI am running 2016 and using the ReportingService2010. I am trying to run this code sample from the documentation:var items = rs.ListChildren("/", false);
But I always get this Exception:
"Client found response content type of '', but expected 'text/xml'.\r\nThe request failed with an empty response."Has anyone run into this error?
It's very likely something more than just that line - most likely how it's being called. If you are just following the documentation it just has a sub main with the GetPropertiesSamples and then creates various classes for the other examples. Those are all just examples of the different methods but they don't necessarily explain too much beyond that
In following the example where they are just using sub main, try to get it working by just running ListChilden() that you are using by commenting out whatever else you have in Sub main and just call ListChildren(). Create the sub procedure for ListChildren something like: Public Sub ListChildren()
Dim rs As New ReportingService2010
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
rs.Url = "http://YourReportServer/reportserver/reportservice2010.asmx"
rs.Credentials = System.Net.CredentialCache.DefaultCredentials
Dim items As CatalogItem()
Try
items = rs.ListChildren("/", False)
For Each item As CatalogItem In items
Console.WriteLine(item.Name & ": " & item.TypeName)
Next
Catch ex As Exception
Console.WriteLine(ex.Message)
End Try
End Sub
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply