Solved

Q about attaching pdf files that end up with an aspx extension

Posted on 2006-06-19
3
591 Views
Last Modified: 2007-12-19
Hello,

I have written an .net web application (1.1) that opens up a pdf file after a user clicks on a button.  The adobe reader version is 7.0.5.  When I click on the "Email" button, Novell Groupwise opens up and attaches the file automatically with a pdf extension.  On my machine it works fine, however, when our clients click on the "Email" button on the adobe reader, groupwise attaches the pdf file with an aspx extension.  Why is that and how can I fix that?  

Hopefully I was able to explain this adequatly.  If not, feel free to ask away and i'll try to explain better.

a million thanks in advance....

P.S.  the following link is where I got the pdf creator from.
http://report.sourceforge.net/
0
Comment
Question by:brdrok
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 11

Assisted Solution

by:pratap_r
pratap_r earned 250 total points
ID: 16935738
can you post the code where you write the PDF to the response stream? I think the content headers are not set properly.
0
 
LVL 26

Accepted Solution

by:
DireOrbAnt earned 250 total points
ID: 16937723
Hi,

You might not be using the same browser on both ends (IE, Firefox, others...).
In your Web app, try these two things:

1) In the actual URL that pops the PDF, ends it with .pdf so let's assume your link is like "mysite.com/app.aspx?GetFile=3" then make it "mysite.com/app.aspx?GetFile=3&Filename=file.pdf". Obviously, don't use a parameter name that you use in your application for "Filename=". This might help IE pick the extension.

2) Change the HTTP headers you pass back through that Web App (only change them when a PDF is sent back). I assume you are already passing a different "Content-Type:" header? "Content-Type: application/pdf"? You might also need to add a "Content-Disposition: attachment; filename=Whatever.pdf" header and maybe a "Content-Transfer-Encoding: binary" and "Content-Length: X" one. What headers are you passing back?

I hope #1 solves it for you. Provide us with more information on headers if it does not.
0
 
LVL 7

Author Comment

by:brdrok
ID: 17093478
Sorry, didn't mean to leave this Q hanging.  When you guys mentioned HTTP headers and content headers, it gave me an idea to look at "SmartNavigation".  Turns out, by setting this attribute to false, made the problem go away.

thank you.
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.

742 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question