Hi all
I'm looking for code regarding opening (not saving) binary files (pdf, word,
excel...) from hard disk with asp, the website is hosted in C:\ and the pdf
files are in D:\.
Does anyone have an idea about this??
Many thanks in advance.
Moony. 11 2065
moony marouane wrote on 22 dec 2005 in
microsoft.publi c.inetserver.as p.general: I'm looking for code regarding opening (not saving) binary files (pdf, word, excel...) from hard disk with asp, the website is hosted in C:\ and the pdf files are in D:\. Does anyone have an idea about this??
binary stream http://www.aspfaq.com/show.asp?id=2161
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Many thanks for your reply Evertjan, but actually I'm looking for code to
open files not to save them.
To be more clear, I have an asp file (hosted in c:\ of my web server) that
lists (filesystemobje cts) the content of a folder in D:\, in this asp file I
have in front of each file 3 links (download/print/open), the download link
works great but not the 2 other links.
when I use the absolute path and try to open the files from another pc (not
the webserver where the website is hosted) it tries to look for it in the
local computer and not the webserver so it gives "page can not be displayed"
Hope I clarified my problem.
Thanks again.
Moony
"Evertjan." <ex************ **@interxnl.net > a écrit dans le message de
news:Xn******** ************@19 4.109.133.242.. . moony marouane wrote on 22 dec 2005 in microsoft.publi c.inetserver.as p.general:
I'm looking for code regarding opening (not saving) binary files (pdf, word, excel...) from hard disk with asp, the website is hosted in C:\ and the pdf files are in D:\. Does anyone have an idea about this??
binary stream
http://www.aspfaq.com/show.asp?id=2161
-- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
moony marouane wrote on 24 dec 2005 in
microsoft.publi c.inetserver.as p.general: "Evertjan." <ex************ **@interxnl.net > a écrit dans le message de news:Xn******** ************@19 4.109.133.242.. . moony marouane wrote on 22 dec 2005 in microsoft.publi c.inetserver.as p.general:
> I'm looking for code regarding opening (not saving) binary files > (pdf, word, excel...) from hard disk with asp, the website is > hosted in C:\ and the pdf files are in D:\. > Does anyone have an idea about this?? binary stream
http://www.aspfaq.com/show.asp?id=2161
[please do not toppost on usenet]
Many thanks for your reply Evertjan, but actually I'm looking for code to open files not to save them.
The below example gets a file from the server HD and then sends it to the
client, not neccessarily for saving.
========== main.asp =============== =
<a href='myPDF.asp '>read, not save myPDF.pdf</a>
=============== =============== ======
=========== myPDF.asp ==============
<%
pdf("myPDF.pdf" )
function pdf(x)
Response.Clear
strFileName="/mySecretFolder/" & x
strFilePath=ser ver.mappath(str Filename)
'' or: strFileName="c: \myRootFolder\" & x
Set objStream = Server.CreateOb ject("ADODB.Str eam")
objStream.Open
objStream.Type = 1
objStream.LoadF romFile strFilePath
Response.Conten tType = "applicatio n/pdf"
Response.Binary Write objStream.Read
objStream.Close
Set objStream = Nothing
Response.end
end function
%>
=============== =============== =========
To be more clear, I have an asp file (hosted in c:\ of my web server) that lists (filesystemobje cts) the content of a folder in D:\, in this asp file I have in front of each file 3 links (download/print/open), the download link works great but not the 2 other links.
when I use the absolute path and try to open the files from another pc (not the webserver where the website is hosted) it tries to look for it in the local computer and not the webserver so it gives "page can not be displayed"
Hope I clarified my problem.
Not compleatly, but will the above help?
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
"Evertjan." <ex************ **@interxnl.net > a écrit dans le message de
news:Xn******** ************@19 4.109.133.242.. . moony marouane wrote on 24 dec 2005 in microsoft.publi c.inetserver.as p.general:
"Evertjan." <ex************ **@interxnl.net > a écrit dans le message de news:Xn******** ************@19 4.109.133.242.. . moony marouane wrote on 22 dec 2005 in microsoft.publi c.inetserver.as p.general:
> I'm looking for code regarding opening (not saving) binary files > (pdf, word, excel...) from hard disk with asp, the website is > hosted in C:\ and the pdf files are in D:\. > Does anyone have an idea about this??
binary stream
http://www.aspfaq.com/show.asp?id=2161
[please do not toppost on usenet]
Many thanks for your reply Evertjan, but actually I'm looking for code to open files not to save them.
The below example gets a file from the server HD and then sends it to the client, not neccessarily for saving.
========== main.asp =============== =
<a href='myPDF.asp '>read, not save myPDF.pdf</a>
=============== =============== ======
=========== myPDF.asp ==============
<% pdf("myPDF.pdf" )
function pdf(x) Response.Clear
strFileName="/mySecretFolder/" & x strFilePath=ser ver.mappath(str Filename)
'' or: strFileName="c: \myRootFolder\" & x
Set objStream = Server.CreateOb ject("ADODB.Str eam") objStream.Open
objStream.Type = 1 objStream.LoadF romFile strFilePath Response.Conten tType = "applicatio n/pdf" Response.Binary Write objStream.Read objStream.Close Set objStream = Nothing Response.end end function %>
=============== =============== =========
To be more clear, I have an asp file (hosted in c:\ of my web server) that lists (filesystemobje cts) the content of a folder in D:\, in this asp file I have in front of each file 3 links (download/print/open), the download link works great but not the 2 other links.
when I use the absolute path and try to open the files from another pc (not the webserver where the website is hosted) it tries to look for it in the local computer and not the webserver so it gives "page can not be displayed"
Hope I clarified my problem.
Not compleatly, but will the above help? -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
Many thanks again for your reply, the code you gave me didn't work, it opens
up the pdf file in the form of text.
This one worked for me : http://support.microsoft.com/kb/276488/en-us
Thanks again.
Moony.
I can't see the difference between both solutions, but the second worked
whereas the one you sent didn't work.
Hi again.
I have another question, what about printing files without opening them, I
have the URL of the file and I want to print it directly to printer (with
message confirmation).
Any help is too much appreciated.
Thanks in Advance.
moony marouane wrote on 26 dec 2005 in
microsoft.publi c.inetserver.as p.general: Hi again.
I have another question,
[please do not start new questions on usenet with an old subject string.]
what about printing files without opening them, I have the URL of the file and I want to print it directly to printer (with message confirmation). Any help is too much appreciated.
If you mean printing it on the client via a regular browser,
that is and should be impossible with an internet security level.
Further more that is not ASP-related so off topic in this NG.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
I read once that there is a function that allows this, I just can't remember
what is it.
Anyway, thanks for your help.
moony marouane wrote on 27 dec 2005 in
microsoft.publi c.inetserver.as p.general: I read once that there is a function that allows this, I just can't remember what is it.
Allows what?
This is usenet, not email, so please quote.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress) This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Ben Jeurissen |
last post by:
Hello,
I have to deal with the following issue in C++:
Two threads are started from the main thread, both capturing images from
a different firewire camera. Both threads take shots of 460800 bytes at
a rate of 30 frames per second. This works fine, without frame loss, and
I can display the two framestreams on screen.
Now I would like to write these frames to my disk too (2 10000rpm in
|
by: Alfons |
last post by:
Hello,
I have build a program that can do file transferring between a Windows
XP computer and a DOS computer via a serial port. The Windows program
I have build in C++ with Visual Studio 6.0. The DOS program I made in
Turbo C++ 3.0.
At this moment I am in a test phase of sending files and directories.
The code I am using in DOS to open a file for writing looks like this
(forgive me the typos, since I only have my source code at work...
|
by: Giacomin Alan |
last post by:
I have to do an exercise for school where in a HTML file I have to
read and write some words from a txt file. the two files are in
network, not in local. can someone help me? thanks a lot.
**Alan**
|
by: Nagarajan |
last post by:
Hello,
I am trying to open an application as a VS . NET Project . I get this error every time
"Cannot create the offline cache in C:\Documents and Settings\TEMP\My Documents\Visual StudioProjects\VSWebCache. Unable to create disk-based web at C:\Documents and Settings\TEMP\My Documents\Visual Studio Projects\VSWebCache because its parent web would not be a disk-based web, create the disk-base web elsewhere outside of your servers documnent...
|
by: Joe Lester |
last post by:
This thread was renamed. It used to be: "shared_buffers Question". The
old thread kind of died out. I'm hoping to get some more direction by
rephrasing the problem, along with some extra observations I've
recently made.
The core of the problem is that Postgres is filling up my hard drive
with swap files at the rate of around 3 to 7 GB per week (that's
Gigabytes not Megabytes) . At this rate it takes roughly two months to
fill up my 40...
| |
by: zacks |
last post by:
I use some shareware CD/DVD burning software that has a command line
interface version. This allowed me to write my own custom SDK that
performs various CD/DVD burning operations from my own VB.NET
applications.
Recently, I had some problems reading DVDs that I had recently burned,
reading them with the same DVD device that burned them. So I wrote a
quickie verification program that simply attempts to binary read all
files on the disk.
|
by: =?Utf-8?B?U2NobWVuZ3k2OQ==?= |
last post by:
Hopefully someone can help with this query. I have searched the internet and
no other occurence of this problem seems to appear so I must be unique in
some way...
OS : XP Media Center
I decided to clean up my hard-drive using Windows System Tools, Disk
Cleanup. I had 'Compress old files' selected (on) and when the tool started
to compress the files I got a message saying that 'certain Windows files that
were required by the system...
|
by: elgiei |
last post by:
Good morning at all,
i have to implement a server,that every n-seconds (eg. 10sec) sends to
other clients,which files and directory has been deleted or modified.
i build a n-tree, for each files on harddisk there's a node into n-
tree,
this solution is not good for large hard disk..
and i can't use inotify (it's forbidden),
and only c solutions are accepted
without third party software or external calls.
|
by: varunkumarid |
last post by:
Hai to all, I want to know about Files Address in inside of the Hard disk...
When we Click some Files,that Time how the Operating System Identitfy the Exact File Address In Hard Disk ........
If you Know About this concept Please send a message Very Quickly....
|
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,...
|
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: 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...
|
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: 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();...
|
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: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
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...
| |