Click here to Skip to main content
13,598,210 members
Rate this:
Please Sign up or sign in to vote.
I get this error when trying to execute my SSRS reports. Client found response content type of '', but expected 'text/xml'.
The request failed with an empty response.
VB Code:
Private Sub btnprint_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnprint.Click
        Dim rview As New Microsoft.Reporting.WebForms.ReportViewer()
        Dim apr As New AppSettingsReader()
        rview.ServerReport.ReportServerUrl = New Uri(apr.GetValue("ReportServer", GetType(String)))
        Dim paramList As New System.Collections.Generic.List(Of Microsoft.Reporting.WebForms.ReportParameter)()
        paramList.Add(New Microsoft.Reporting.WebForms.ReportParameter("@DateServed", RadDatePick.SelectedDate))
        paramList.Add(New Microsoft.Reporting.WebForms.ReportParameter("@Location", ddlSch.SelectedValue))
        paramList.Add(New Microsoft.Reporting.WebForms.ReportParameter("@MenuType", ddlmenutype.SelectedValue))
        rview.ServerReport.ReportPath = "/ReportFolder/ReportName"
        Dim mimeType As String = Nothing
        Dim encoding As String = Nothing
        Dim extension As String = Nothing
        Dim deviceInfo As String = Nothing
        Dim streamIds As String() = Nothing
        Dim warnings As Microsoft.Reporting.WebForms.Warning() = Nothing
        Dim format As String = "PDF"
        deviceInfo = "<DeviceInfo>" + "<SimplePageHeaders>True</SimplePageHeaders>" + "</DeviceInfo>"
        Dim bytes As Byte() = rview.ServerReport.Render(format, deviceInfo, mimeType, encoding, extension, streamIds, warnings)
        If format = "PDF" Then
            Response.ContentType = "application/pdf"
            Response.AddHeader("Content-disposition", "filename=output.pdf")
        End If
        Response.OutputStream.Write(bytes, 0, bytes.Length)
    End Sub
Posted 28-Mar-11 5:16am
Updated 28-Mar-11 5:21am
Sandeep Mewara 28-Mar-11 11:21am
Always format your code by PRE tags. They make the question readable.
Sandeep Mewara 28-Mar-11 12:15pm
Sure it's not a timeout issue?
Rohit.Net100 28-Mar-11 13:46pm
no..its not.
Tarun.K.S 29-Mar-11 3:35am
I suspect it might be because of unstructured XML.

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Check this

Service Account Requirements for Reporting Services in a SharePoint deployment

Restrictions on using built-in accounts apply to some deployment topologies of Reporting Services that include a report server running in SharePoint integrated mode. The following combination of factors will result in service account requirements:
* Report Server is integrated with a SharePoint farm comprising more than one computer.
* The report server and SharePoint Central Administration web site run on separate computers.

In this scenario, if the Report Server service runs under a built-in account such as NetworkService, the Grant database access option in SharePoint Central Administration will not work correctly. Consequently, accessing any Reporting Services feature through a SharePoint site will result in the following error:

"An unexpected error occurred while connecting to the report server. Verify that the report server is available and configured for SharePoint integrated mode. --> Server was unable to process request. --> Client found response content type of 'text/html; charset=utf-8', but expected 'text.xml'."

Choose either of the following approaches to avoid this error:

*On the computer that hosts the report server, continue to run the Report Server service as NetworkService and add the built-in account, such as NT_AUTHORITY\NetworkService to the WSS_WPG Windows group.

-- Or --

*Configure the service account to run under a domain user account as follows:
1.Start the Reporting Services Configuration tool and connect to the report server.
2.On the Service Account page, click Use another account, enter a domain user account, and click Apply.
3.Click Web Service Identity, for Report Server, click New, type an application Restart the Report Server service.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web03-2016 | 2.8.180621.3 | Last Updated 4 Dec 2011
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100