Hi,
I have an urgent question about showing the PDF. I got the following
message:
Some files can harm your computer. If the file information below looks
suscipcious, or you do not fully trust the source, do not open or save this
file.
File name: XXX.pdf
....
Then i click open, i have error message again like below:
Internet Explorer cannot download XXX.pdf from ....
I can successfully run from the local machine, but from the application
machine i got above error message. The codes are exactly the same between
local machine and the application machine.
Really appreciate your help.
THX. 4 1555
> Some files can harm your computer. If the file information below looks suscipcious, or you do not fully trust the source, do not open or save
this file. File name: XXX.pdf
2 thoughts:
1) Is your security on your browser set to some paranoid level?
2) Is maybe the live site sending a different mime type than your local
machine for PDF files?
-Darrel
Hi Green,
In addition to Darrel's suggestions, I think you can also check the
following things:
1. Is it ok to save the pdf , if we don't chose"open", but save it to
client disk?
2. The problem only occurs when you deploy the web application on that
application server? Will the problem reoccur if we visit that page from
some othe client machines?
3. AS Darrel has mentioned the live site's mime setting, I think you can
also compare the other settings between your local site and the applicaiotn
server's iis site setting. Maybe there're some thing different which may
cause the problem.
Thanks.
Regards,
Steven Cheng
Microsoft Online Support
Have had the same problem months ago. Believe it has something to do with the
way you pass the pdf to the browser. Maybe an open door, but try the
following code:
// Create new reference to the report
Reports.myrep crReportDocumen t = new Reports.myrep() ;
//To PDF
System.IO.Memor yStream ReportStream =
(System.IO.Memo ryStream)crRepo rtDocument.Expo rtToStream( ExportFormatTyp e.PortableDocFo rmat);
Response.ClearC ontent();
Response.ClearH eaders();
Response.Conten tType = "applicatio n/pdf";
Response.Binary Write(ReportStr eam.ToArray());
Response.End();
"Green" wrote: Hi, I have an urgent question about showing the PDF. I got the following message:
Some files can harm your computer. If the file information below looks suscipcious, or you do not fully trust the source, do not open or save this file. File name: XXX.pdf .... Then i click open, i have error message again like below: Internet Explorer cannot download XXX.pdf from ....
I can successfully run from the local machine, but from the application machine i got above error message. The codes are exactly the same between local machine and the application machine.
Really appreciate your help. THX.
I came across a possible cause/resolution while researching a similar problem
with PDF documents. There is a documented problem using things like Excel or
Word with documents on the client. It also seems to affect PDF's. If the
virtual directory on an IIS server has "expire immediately" turned on for the
location of the PDF then a similar error will occur. A solution was to locate
the PDF in a directory in which the content expiration was something other
than "immediatel y".
"Green" wrote: Hi, I have an urgent question about showing the PDF. I got the following message:
Some files can harm your computer. If the file information below looks suscipcious, or you do not fully trust the source, do not open or save this file. File name: XXX.pdf .... Then i click open, i have error message again like below: Internet Explorer cannot download XXX.pdf from ....
I can successfully run from the local machine, but from the application machine i got above error message. The codes are exactly the same between local machine and the application machine.
Really appreciate your help. THX. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Vishnu |
last post by:
I have a strange problem on WindowsXP proffessional with
IE6 ,when i try to display a tiff file ,it is not
showing ,small red x is comming up.
I tried by dowloading latest IE from microsoft but no use.
This is working fine on win2k IE6
Here is the html file I am using to display the tif file
<html>
<head>
|
by: Sean W. Quinn |
last post by:
Hey folks,
I have a question regarding file handling, and the preservation of class
structure. I have a class (and I will post snippets of code later in the
post) with both primitive data structures (ints), and more complex data
structures (strings and vectors) in it, and would like to write the entire
class to a data file that could then
be read back and loaded.
However I'm having difficulty with this -- I found out (due to an...
|
by: dennis |
last post by:
Hi,
First of all, hi to you all.
I'm working on a Delphi project wich is becoming near it's deadline.
I have a very simple XSLT question wich i hope one of you folks can
help me with?
The problem is i need to transform a xml file from this:
<root>
|
by: koumides |
last post by:
I am using an .mdb file that someone send me to make some changes.
There are lots of forms, reports and tables inside the file. However I
see lot of data in a form that doesn't come from the table is supposed
to come.Lots of records are not in any of the tables but I can see them
in the form ! How can I find out from where that .mdb file finds all
the data? Any ideas?
Thanks a lot,
Marios Koumides
|
by: Adrian |
last post by:
How do I put an icon on a form using code?
Thank you.
| |
by: NuB |
last post by:
I'm passing in an array and I need to write them to a text file. I'm getting
the data in fine but instead of writing it all to one file it generates a
seperate file for each item. How can I put each item onto the same file.
comes in like
BMW Lexus Chevy Saab
and its generating a file for
BMW Lexux Chevy Sabb
|
by: ME via .NET 247 |
last post by:
I have a question about how System.Web.HttpPostedFile manages mime types using property ContentType in Windows.
When I upload a known "text/plain" file with no extension the property doesnt recognizes the type, showing a blank string or some weird characters. But if I put an extension like .pdf ou .exe to that same file the ContentType shows "text/plain".
Is that result expected?
-----------------------
Posted by a user from .NET 247...
|
by: Frank Kamjunke |
last post by:
I want to make a little vb tool wich are actually looking
for a file and this must be showing the file in this tool.
Its a jpg or a bmp. Wich context must i use to load a
external file in the tool?
Secound question this file are changed and the tool must
be actuallysized every secound?
please help me
|
by: SStory |
last post by:
Here is the situation.
I want to display Icons, Type of file etc from a file extension.
Upon initial program load I may only need icons for certain files. But
other operations will require showing all filetypes and icons. I have an
object that has extension, desc (like Word Document) and then icon, which is
nothing to start with.
I have a collection object of these and when it is initialized it goes to
|
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...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
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...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |