Gibberish Pdf File Displayed If I Transfer Using Bit Stream

The following code was suggested by one of the users in this newsgroup when a pdf file was requested by a user from an asp page. I used the similar code in my page and the very interesting thing is when the pdf is displayed on the fly, the whole page is a gibberish code in stead of a normal pdf file. But it displays fine if I just use a link to a file on the page. Can you tell me what's the possible reason will cause this problem?

View Replies


ADVERTISEMENT

File Download Stream

i want to be able to write an asp.net function to download files.

For example, brinkster.com hosting service has a COM component that allows a stream of binary data to the client from the server so that the client will be prompted to download the file.

here is the syntax:

Set Upload = Server.CreateObject("Persits.Upload")

Dim SysFilePath
SysFilePath = Request.QueryString("filePath")

' Parmeters:
' 1. Path to file to download
' 2. Yes, build content-xxx headers
' 3. Use this value for Content-Type header
' 4. Include the word "attachment;" to Content-Disposition to force download

Upload.SendBinary "premfs3sitespremium8jaydakissx22webrootmyFile.txt, True, "application/octet-binary", True

How can I do this in asp.net without using the "Persits.Upload" COM object?

View Replies View Related

File Stream Object

I am trying to create a text file by using the following code. But it's not working. It just loading the page that's all.

<%
DIM fso, NewsFile
Set fso = CreateObject("Scripting.FileSystemObject")
Set NewsFile = fso.CreateTextFile("c: est1.txt", True)
NewsFile.WriteLine("Hello World!")

NewsFile.Close
%>

View Replies View Related

Stream File To User

I have a page on our intranet that is supposed to stream an Excel sheet to the user.

View Replies View Related

ADODB.Stream 'format Error: Not A Pdf Or Corrupt' Only On Large File

I use the code below to authorise the download of certain files.
Thus, instead of linking to the file in a wwwroot directory, I link to
this code with the filename as a parameter, and the script streams the
file if the user is authorised.

This has worked fine on PDFs, DOCs, XLS, etc. until today, and 18MB
file presents the error message 'format error: not a pdf or corrupt'.

Is there a file size limit, or a default that needs overridden? Any
thoughts? Code:

View Replies View Related

File Transfer Via FTP

I'm doing file uploads using the free component ASPSimpleUpload but I have problems of file transfer when the file size is too big or the connection used by the sender is slow.

I'd like to transfer file via FTP from a web page instead of using ASPSimpleUpload. Has somebody already done that and has some code or some links to give me?

View Replies View Related

Transfer A File

I would like for an ASP page to transfer a text file (from the same
directory the ASP file is in) to another Web server.I don't mind if the code is in ASP or VB.I suspect that there is a way of having an ASP page conduct an FTP session
to transfer the file. would like to do this without a component as I'm looking for source code.

View Replies View Related

Automated File Transfer

My team would like to use an ASP script to have an automatic transfer of files to our live server happen each evening at a predetermined time. I was looking on the web for a script but all I could find is user driven upload scripts.

Is there anything out there that will facilitate automatic uploads of several folders and files via ASP scripts?

View Replies View Related

File Transfer System

I'm looking for an ASP (dotnet is alirght too) File Transfer system for use by internal employees and customers. I need to be able to control access to the system on a user and group basis and allow people to upload and download files.

View Replies View Related

File Transfer Between Servers

Does anyone knows of a way to copy some file fro the server to another computer WITHOUT using ftp?

View Replies View Related

File Transfer Script

I searched and searched at Google and couldn't find a thing that helped me here...

Many results found for "ASP Upload Script" but what I want is a "ASP Download Script".

In my website, I have a script that authenticates the user (login) and then checks a few informations. But what interests for this topic is what's called next: a file download page.

Of course I could simply ask the user to Save File As in a location I would inform him, but I would like to have a script that would do that for him. It gets the file from the server and transfers it to a default folder in the user's computer.

View Replies View Related

Upload Excel File And Transfer To SQL

I am trying to figure out how to allow a person to select a file on their local machine and then read that file and transfer the data into SQL.

View Replies View Related

006~ASP 0230~Server.Transfer Error~The Call To Server.Transfer Failed While Load

Any idea what is causing this error? 006~ASP
0230~Server.Transfer Error~The call to Server.Transfer
failed while loading the page.

Just read about benefits of Server.Transfer over
Response.Redirect, replaced, and getting the error.

View Replies View Related

Cannot Be Displayed

I am moving from a Windows 2000 Web Server to a Windows 2003 Server.I have converted all of my old CDONTS to CDOSYS with no problems. However,I am having major problems with getting my asp pages that have both MySQL and CDOSYS
on them to work.I get the following error:HTTP 500 Internal Server error
There is a problem with the page you are trying to reach and it cannot be displayed

View Replies View Related

Stream XLS

I have a page which streams an Excel spreadsheet to the user. It has worked
fine for 12mths or more, but recently I found out that it wasn't working. I
suspect the problem lies with IIS, but I'm not sure...
When the user submits a form, the page should stream the file to the user -
the user is presented with a standard Open/Save/Cancel dialog, which the
would ordinarily save to their HDD. I have updoaded the code from the live
server to my development machine (IIS5.1) - and this same code works fine.
However, on the live server (IIS6), the user is presented with the dialog
box, but rather than listing myfile.xls, it lists mypage.asp as the file to
be downloaded.I think this must be an IIS6 issue but I don't know what. Some time before
the problem was noticed, work had been done on the live server, but AFAIK
nothing was done that was *intended* to affect this application.

View Replies View Related

Stream & 800a0bbc

I'm using streams to upload a file. I get an error 800a0bbc write to file failed.

I've looked on support.microsoft.com and groups.google.com.
No luck on what a 800a0bbc error is.

View Replies View Related

Attachment Using Stream

Does anyone know how to create an attachment using a stream in classic
ASP.I can see that it can be done in ASP.Net as per the article below:
Initializes a new instance of the Attachment class with the specified
stream and name.
http://msdn2.microsoft.com/en-us/library/6sdktyws.aspx.

View Replies View Related

Adodb.stream

After the latest security update, is it still possible to use adodb.stream
on the server side?

View Replies View Related

Text Stream

I'm using

file.OpenAsTextStream(ForReading, _
TristateUseDefault)
and then i read some lines.

Line = TextStream.readline

Then when i finished reading it i need to go to the begiining and read some
lines again.But i dont see how to go back to the begining.
I mean, Is there a way to go back to the first line of the file if i
allready read some lines

View Replies View Related

Ntext Cannot Be Displayed

Because I needed to store more than 4,000 characters, I decided to convert one field in SQL Server Database from nvarchar to ntext...now the field holds many more characters without a problem as I examined in my online manager.

But when I tried to display it on my asp page with
Code:

<%=rs("Text")%>

, nothing showed up, and there is no error message. It cannot be null because i checked in the manager...

View Replies View Related

Page Cannot Be Displayed In ASP

I'm using classic ASP. I made a change to a page and I got a Page Cannot Be Displayed error. I changed the code back and now I get the same thing. Other pages can run and access the db server.

I tried taking out includes and bypassing some code. I've also checked both the Application and Event logs on the server and there doesn't seem to be anything obvious there. I'm not using any components. Can anybody give me an idea as to the types of
things that cause this problem?

View Replies View Related

ADODB.Stream

We have an application, written in ASP, that uses the ADODB.Stream to be
able to open files and write byte arrays to the Response object. If one of
our administrators patches the web servers this application runs on in
Windows Update, I'm screwed, right? You've essentially just disabled this
COM object, for not only its evil purposes, but its useful ones?

View Replies View Related

Stream SpreadsheetML

Ok, I'm stumped on something that really shouldn't be this hard. I've
created some cool code to transform a dataset via XSLT into SpreadsheetML
(XML for Excel) and I'm storing the physical file on a file server. Now... I
currently provide a hyperlink to view/save the file, but this won't work
outside the network.

So, I've been working on making this
hyperlink/linkbutton/button/whatever stream the file back to the user. How
in the name of Zeus's butthole do I do this?

So, in simpler terms; how do I take a physical file and stream the sucker
back? Ideally, I'd like this to work just like it does now with the physical
link to the file. Click the link, it prompts you to save/open/cancel.
Clicking Open pops up Excel and looky-looky, you see the file.

View Replies View Related

Be Displayed Error

I've got an asp page that allows users to input quantities of certain items. When they click the "Total" button, the page is submitted to itself and a total for their selected items is displayed, similar to any online shopping cart.

When all items have been selected, the form is submitted, and their taken to the next page. If they choose the browser's "Back" button, or a "Cancel" button on the asp page, they get the Page Cannot Be Displayed Error. However, if they never update the total, and instead enter all the quantities and then submit the form, withing submitting back to itself, the browser's "Back" button and the asp "Cancel" button work fine.

It appears the back button doesn't work when the previous page has been submitted to itself. Does anyone have any suggestions? Is it a bug in my code or possibly an IIS issue?

View Replies View Related

Page Can't Displayed

I have a form from html called "rcf" and it suppose to get the data from users and send it to the database.but from my form to my add_rcf.asp page I get a "The " message.I uploaded the files.

View Replies View Related

Pages Cannot Be Displayed

I get this page cannot be displayed every time i try to run ASP pages on Win 2k Server IIS5.1 . I know that the guy who's server it is had run a couple of lock down tools after his server's security was compromised.

Could this be part of the reason why? I had a look at his configuration and .asp files were pointing to 404.dll? I changed it to the asp.dll in inetsrv directory but that didn't help as well as restarting IIS.

View Replies View Related

Page Cannot Be Displayed

i am tryint to access this ASP website, but it keeps giving me the msg PAGE CANNOT DISPLAY. when i send the url to my friend, it load for them just fine. can someone tell me if ther are any option i have to chang or any way of solving this problem?

View Replies View Related

ASP/XML Stream To Excel

The problem is that in XP SP2, the IE instance opened for the vbscript only
page no longer closes when Excel is closed. The user has to manually close
this window. This didn't happen in XP SP1. Obviously there is a security
change, but I have been unable to determine how to reverse it.

Does anyone know how I can get the IE instance to close when Excel closes in
XP2 SP2?

View Replies View Related

Page Can Not Be Displayed

We have two websites:

1. On Internet
2. On INTRANET

Anyone with any internet account can access to the first site, but to enter to the 2nd, u need to have a special internet account (say, a certain supplier).

The general menu is on the Internet website, but one of the items in the sub-menu, links to a page On the INTRANET. If u r not authorized (=did not use the certain internet account), then u get the page "The page can not be displayed".

How do I redirect the "page can not be displayed" to the help page, and of course, redirect it ONLY when the "page can not be displayed" page is there b/c of linking from this sub-menu, or b/c of trying to reach directly to the Intranet certain URL that this sub menu links to.

View Replies View Related

ADODB.Stream

I am using ADODB.Stream for downloading the files on user machine. The code works fine when filesize is less than 10 MB. But if file size is more than 10 MB then it doesn;t get download. Can anyone tell what is the problem. I have to user some different component.

View Replies View Related

Displayed Images Not Changing

I have a page that displays images. However, at times if I have changed the actual image but have kept the same name and src, the old image still displays when I run the page. I have cleared the files and cookies and sometines this helps but not always.

Is there something I can do to force a change?

View Replies View Related

Click Image, ADO Stream?

I'm looking to have an image (say, icons for a particular document) and when it is clicked on, I would like the "Open/Save/Cancel" dialogue to open up.

I was told using an ADO data stream was the way to go, making the app an unknown so the dialogue opens:

Dim FileName
Dim FullFileName
FileName = "MyWordDocument.doc"
FullFileName = "C:WebfilesMyWordDocument.doc"
Response.ContentType = "application/x-unknown"
Response.Addheader "Content-Disposition", "attachment; filename=" & chr(34) & FileName & chr(34)
Response.Binarywrite GetBinaryFile(FullFileName)

Function GetBinaryFile(ByVal FileSpec)
Const adTypeBinary = 1
Dim objStream
Set objStream = Server.CreateObject("ADODB.Stream")
objStream.Open()
objStream.Type = adTypeBinary
objStream.LoadFromFile (FileSpec)
GetBinaryFile = objStream.Read()
Set objStream = Nothing
End Function

Is there a better way to do this? Also, I grab the file name from a SQL query which is then populated to a datagrid - the image name/etc is populated dynamically - how is this done in ASP? Is that with an anchor tag?

<asp:TemplateColumn ItemStyle-HorizontalAlign="Center"><ItemTemplate><asp:Image ID="thumb" runat="server" /></ItemTemplate></asp:TemplateColumn>

View Replies View Related

Page Cannot Be Displayed Problem

I know this is a simple problem,what are all the causes of this problem? This occurs to only when I don't login to the web server.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved