15,902,032 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Javascript questions
View Visual Basic questions
View Python questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by OtroCubaLibre (Top 6 by date)
OtroCubaLibre
17-Oct-12 14:49pm
View
Hi Rohit, thank you very much for the ideas, help me a lot to understand the problem, I finally use the response to render the page, but I needed to be in other window (and I could'n write the download handler), so I added this in the button
OnClientClick="aspnetForm.target ='_blank';setTimeout('fixform()', 50);"
then I used the call with a redirect
Response.Redirect("ShowReport.aspx")
and in the top of the page insert,
function fixform() {
document.getElementById("aspnetForm").target = '';
}
to put back the target of the form to _self.
(this solution I also find it on the web, it's not mine.)
problem solved.
thanks again.
Cubas
OtroCubaLibre
16-Oct-12 12:17pm
View
Hi, these are the headers after deleting, I also try adding the expires header and is the same. Automatic prompting for file download is disable, but I can't change nothing in the Ie configuration of the client.
Request Headers
GET /.../appData/prueba.pdf HTTP/1.1
Accept: */*
Accept-Language: en-us
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727)
Host: ssti06
Connection: Keep-Alive
Response Headers
HTTP/1.1 200 OK
Content-Type: application/pdf
Last-Modified: Wed, 12 Sep 2012 18:15:34 GMT
Accept-Ranges: bytes
ETag: "e433319a1291cd1:0"
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
Date: Tue, 16 Oct 2012 15:41:49 GMT
Content-Length: 2670
OtroCubaLibre
16-Oct-12 10:55am
View
You are right, I'm new in fiddler, this would be the correct header. thanks again.
Request Headers
GET /.../appData/prueba.pdf HTTP/1.1
Accept: */*
Accept-Language: en-us
UA-CPU: x86
Accept-Encoding: gzip, deflate
If-Modified-Since: Wed, 12 Sep 2012 18:15:34 GMT
If-None-Match: "e433319a1291cd1:0"
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727)
Host: ssti06
Connection: Keep-Alive
Response Headers
HTTP/1.1 304 Not Modified
Last-Modified: Wed, 12 Sep 2012 18:15:34 GMT
Accept-Ranges: bytes
ETag: "e433319a1291cd1:0"
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
Date: Tue, 16 Oct 2012 13:52:16 GMT
OtroCubaLibre
16-Oct-12 10:29am
View
Hi Bhushan, I tried your solution and is the same, in fact in the fiddlers both calls have the same headers.
Response.Write("<script>window.open('appData/prueba.pdf','pruebapdf','location=no,resizable=yes,scrollbars=yes');</script>")
Page.ClientScript.RegisterStartupScript(Me.GetType(), "click", "<script>window.open('appData/prueba.pdf','pruebapdf1','location=no,resizable=yes,scrollbars=yes');</script>")
OtroCubaLibre
16-Oct-12 10:23am
View
Hi, thanks for the response, yes I used "application/pdf" for pdf and "application/vnd.ms-excel" for excel.
OtroCubaLibre
16-Oct-12 10:20am
View
Hi Rohit, thanks for your quick response, I checked all you suggest me and is the same, no blocking, the mapping is fine, put a name to the window, no javascript errors and install fiddler, this are the headers for the request and the response, can you see something rare in the headers??
Request Headers
POST /.../default.aspx HTTP/1.1
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/x-shockwave-flash, */*
Referer: http://.../default.aspx
Accept-Language: en-us
Content-Type: application/x-www-form-urlencoded
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727)
Connection: Keep-Alive
Content-Length: 196
Host: ...
Pragma: no-cache
Response Headers
HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html; charset=utf-8
Content-Encoding: gzip
Vary: Accept-Encoding
Server: Microsoft-IIS/7.5
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
Date: Tue, 16 Oct 2012 13:52:16 GMT
Content-Length: 583
Show More