473,623 Members | 3,366 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

asp.net app calling Reporting Services cannot open file

Good afternoon,

I have what appears to be a caching issue, but i'm a bit of a newbie at
http headers so it may be something else.

I have a small asp.net 2.0 application that is called to serve up some
SQL Reporting Services reports. The asp pages are running under SSL as
are the pages that call the asp app.

The asp app runs correctly, but the reports cannot be opened or saved.
I get a "The page cannot be displayed" error.

I am thinking that this is due to caching, as detailed in this MS KB
article: http://support.microsoft.com/kb/316431

I have
Response.ClearH eaders()
and then

Response.Append Header("Cache-control",
"public,max-age=1")
Response.Conten tType = strContentType
Response.Binary Write(bytResult )
Response.Flush( )
Response.Close( )

where strContentType is defined as "applicatio n/octet-stream" and
bytResult is the Byte result of calling the render method.

I have tried using logic to use application/vnd.ms-excel or
application/pdf when applicable instead of application/octet-stream,
but that doesn't help. I

The code originally had
'Response.Appen dHeader("Conten t-Disposition",
"attachment;fil ename=" + strAttachName) which was to force a download,
but we really don't want the users to save the reports; we would prefer
to have them just view them. As I understand things,
Content-Disposition is used to force the file download box, which I
don't want. I just want the files to open. Do I need to use something
in place of
'Response.Appen dHeader("Conten t-Disposition",
"attachment;fil ename=" + strAttachName)
when I don't want a file download.

According to the KB article, I need to get rid of the Pragma:no-cache
that is coming across in the response header, but since no-cache is the
only value possible for pragma, I don't know how to do that. I tried
adding Response.Append Header("Pragma" ,"") but that didn't work.

Here is the Response Header:

HTTP/1.1 200 OK
Connection: close
Date: Wed, 18 Oct 2006 17:22:27 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Expires: 0
Pragma: no-cache
Cache-control: no-cache,max-age=0,must-revalidate
X-AspNet-Version: 2.0.50727
Cache-Control: public,max-age=1
Content-Type: application/octet-stream

I believe that my ":Cache-Control: public,max-age=1" is overriding both
the "Cache-control: no-cache,max-age=0,must-revalidate" and the
"Expires=0" , but I can't get rid of Pragma: no-cache

Any ideas, references, resources, sample code or encouraging words
would be greatly appreciated.

Thanks,
Kathryn

Oct 18 '06 #1
2 2910
What control are you using to display the Report? Are you using the SQL
Reporting Services Report Viewer control?

--
Ameet Phadnis
Sr. Technical Consultant
e Tek Global Inc.
ASP Alliance Author Page: http://aspalliance.com/author.aspx?uId=44260
"kbutterly" wrote:
Good afternoon,

I have what appears to be a caching issue, but i'm a bit of a newbie at
http headers so it may be something else.

I have a small asp.net 2.0 application that is called to serve up some
SQL Reporting Services reports. The asp pages are running under SSL as
are the pages that call the asp app.

The asp app runs correctly, but the reports cannot be opened or saved.
I get a "The page cannot be displayed" error.

I am thinking that this is due to caching, as detailed in this MS KB
article: http://support.microsoft.com/kb/316431

I have
Response.ClearH eaders()
and then

Response.Append Header("Cache-control",
"public,max-age=1")
Response.Conten tType = strContentType
Response.Binary Write(bytResult )
Response.Flush( )
Response.Close( )

where strContentType is defined as "applicatio n/octet-stream" and
bytResult is the Byte result of calling the render method.

I have tried using logic to use application/vnd.ms-excel or
application/pdf when applicable instead of application/octet-stream,
but that doesn't help. I

The code originally had
'Response.Appen dHeader("Conten t-Disposition",
"attachment;fil ename=" + strAttachName) which was to force a download,
but we really don't want the users to save the reports; we would prefer
to have them just view them. As I understand things,
Content-Disposition is used to force the file download box, which I
don't want. I just want the files to open. Do I need to use something
in place of
'Response.Appen dHeader("Conten t-Disposition",
"attachment;fil ename=" + strAttachName)
when I don't want a file download.

According to the KB article, I need to get rid of the Pragma:no-cache
that is coming across in the response header, but since no-cache is the
only value possible for pragma, I don't know how to do that. I tried
adding Response.Append Header("Pragma" ,"") but that didn't work.

Here is the Response Header:

HTTP/1.1 200 OK
Connection: close
Date: Wed, 18 Oct 2006 17:22:27 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Expires: 0
Pragma: no-cache
Cache-control: no-cache,max-age=0,must-revalidate
X-AspNet-Version: 2.0.50727
Cache-Control: public,max-age=1
Content-Type: application/octet-stream

I believe that my ":Cache-Control: public,max-age=1" is overriding both
the "Cache-control: no-cache,max-age=0,must-revalidate" and the
"Expires=0" , but I can't get rid of Pragma: no-cache

Any ideas, references, resources, sample code or encouraging words
would be greatly appreciated.

Thanks,
Kathryn

Oct 18 '06 #2
Ameet,

Thanks for the reply! No we are not useing the Report View control.

The asp app functions as follows: the aspx page receives a GUID as a
URL parameter. In the page_Load event, it then passes the GUID into a
stored procedure that returns the parameters for the report.

The report is then loaded using the LoadReport method, then the
parameters are set using the SetExecutionPar ameters method.

The Render method is then called and then the follow code is called:

Response.Append Header("Cache-control",
"public,max-age=1")
Response.Conten tType = strContentType
Response.Binary Write(bytResult )
Response.Flush( )
Response.Close( )
I am the third developer to work on this and I am pretty much an asp
newbie. Any ideas would be greatly appreciated.

Thanks,
Kathryn
Ameet Phadnis (e Tek Global Inc.) wrote:
What control are you using to display the Report? Are you using the SQL
Reporting Services Report Viewer control?

--
Ameet Phadnis
Sr. Technical Consultant
e Tek Global Inc.
ASP Alliance Author Page: http://aspalliance.com/author.aspx?uId=44260
"kbutterly" wrote:
Good afternoon,

I have what appears to be a caching issue, but i'm a bit of a newbie at
http headers so it may be something else.

I have a small asp.net 2.0 application that is called to serve up some
SQL Reporting Services reports. The asp pages are running under SSL as
are the pages that call the asp app.

The asp app runs correctly, but the reports cannot be opened or saved.
I get a "The page cannot be displayed" error.

I am thinking that this is due to caching, as detailed in this MS KB
article: http://support.microsoft.com/kb/316431

I have
Response.ClearH eaders()
and then

Response.Append Header("Cache-control",
"public,max-age=1")
Response.Conten tType = strContentType
Response.Binary Write(bytResult )
Response.Flush( )
Response.Close( )

where strContentType is defined as "applicatio n/octet-stream" and
bytResult is the Byte result of calling the render method.

I have tried using logic to use application/vnd.ms-excel or
application/pdf when applicable instead of application/octet-stream,
but that doesn't help. I

The code originally had
'Response.Appen dHeader("Conten t-Disposition",
"attachment;fil ename=" + strAttachName) which was to force a download,
but we really don't want the users to save the reports; we would prefer
to have them just view them. As I understand things,
Content-Disposition is used to force the file download box, which I
don't want. I just want the files to open. Do I need to use something
in place of
'Response.Appen dHeader("Conten t-Disposition",
"attachment;fil ename=" + strAttachName)
when I don't want a file download.

According to the KB article, I need to get rid of the Pragma:no-cache
that is coming across in the response header, but since no-cache is the
only value possible for pragma, I don't know how to do that. I tried
adding Response.Append Header("Pragma" ,"") but that didn't work.

Here is the Response Header:

HTTP/1.1 200 OK
Connection: close
Date: Wed, 18 Oct 2006 17:22:27 GMT
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Expires: 0
Pragma: no-cache
Cache-control: no-cache,max-age=0,must-revalidate
X-AspNet-Version: 2.0.50727
Cache-Control: public,max-age=1
Content-Type: application/octet-stream

I believe that my ":Cache-Control: public,max-age=1" is overriding both
the "Cache-control: no-cache,max-age=0,must-revalidate" and the
"Expires=0" , but I can't get rid of Pragma: no-cache

Any ideas, references, resources, sample code or encouraging words
would be greatly appreciated.

Thanks,
Kathryn
Oct 19 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
678
by: ferit meftun harmankaya | last post by:
I have some report which are designed in "Crystal Report". I want to run these reports in "Reporting Service" My aim is to convert from extension of Crystal Report (rpt) to extension of reporting service (rdl). Crystal report and Reporting Service are both production of microsoft. i think that there is a way to solve this question. Thanks for your helps
3
1976
by: Mohammad S Khan | last post by:
I am currently doing some research on reporting features provided / compatible with dotnet features. Our current application has excel reprots that are emailed both with an without scheduling through a web front end that uses coldfusion as well as asp. There are custom vb compnents that generate the data as well as stored procs on a sql 2k servers that produce the data. The requirement is for excel reports and pdf reports, web viewing if...
4
3906
by: Fabian von Romberg | last post by:
Hi, I have installed Sql Reporting Services on 2 machines, one is WIN 2000 PRO and the other one is WIN 2000 ADV. SERVER. When I try to access a report using the webbrowser, I get the following error, this happens only if try access the report on the SERVER, it I try on my local machine, it works just fine. Any help will be much appreciated. Thanks in advance, Fabian von Romberg
0
884
by: Josef.Szeliga | last post by:
I have a most unusual problem that i cannot work out. I have a pie chart on my report which when you click on one of the pieces calls itself and drills down into the data. This method works like a dream. However, my users run their reports from a .net application which uses a javascript command windows.open(url) where the url holds the url of the server, report and any parameters.
1
1348
by: iThinkData | last post by:
Should these 3 items, .Net 2.0 Website, SQLServer 2005, Reporting Services 2005. all reside on the same computer? I know that the website issues a configuration error saying it can't find certain assemblies listed in the <assemblies> section of the web.config file (Microsoft.Reportviewer.Common, Microsoft.Reportviewer.ProcessingObjectModel, Microsoft.Reportviewer.WebForms, ADODB) pertaining to the Reporting Services. Also, Reporting...
1
6469
by: rmk | last post by:
How can I get the 2000 and 2005 versions of SQL Server Reporting Services both working on my development laptop ????? I have ASP.NET 1.1 and 2.0 installed on my laptop. I have Visual Studio 2003 and 2005 installed on my laptop. I have my default website configured for ASP.NET 2.0. I have the developer edition of SQL Server 2000 installed on my laptop as
1
2404
by: YellowfinTeam | last post by:
Marketplace: Yellowfin reporting 3.1 with BIRT Integration Yellowfin is proud to announce the release of 3.1. The major theme of this release is enhanced integration capability. We have introduced a range of new web services and authentication processes that allows for Yellowfin to be integrated into any environment with ease. These changes include: * Single signon capability
0
2236
by: fperri | last post by:
Hi, I am trying to configure reporting services which I just added to an already existing installation of SQL Server 2005. When I am in the reporting services configuration manager and I am trying to create the reporting services database I get the following error: Verifying Database Edition The feature: "Using other editions of SQL Server for report data sources and/or the report server database" is not supported in this edition of...
0
8221
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8162
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8317
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7134
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5560
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4067
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1769
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1468
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.