XMLHttp Download And Use A File.

I have recently started to look after a website which has been setup to do the following.
We have intranet1, intranet2 and internet3.

1 is our intranet site, 2 is a backup of 3 and located on our intranet and 3 is our main public website.

1 and 2 are both hosted on the same network, 3 is on an external network. Here is what I need to do, internet3 has a page where jobs are loaded dynamically from XML and XSL files and it is backed up every night to intranet2. Code:

View Replies


ADVERTISEMENT

Get A File Using XMLHTTP

Is this the correct newsgroup for this posting?
I have a problem when using these lines of code:

Dim xmlhttp as Object
set xmlhttp = CreateObject("Microsoft.XMLHTTP")
Call xmlhttp.Open("GET", Application.Profiles.ActiveProfile.Server &
"/Test.abc", False):
Call xmlhttp.send("");

when the last line of code is executed, i get the following error message:

"The download of the specified resource has failed. -2146697208"

Application.Profiles.ActiveProfile.Server = http://x.x.x.x/virtualdirectory

View Replies View Related

XMLHTTP Writting To File

I cant find out how to get this to work...i got this bit of code..
--------------------------------------------

Code:
dim objXMLHTTP
dim URL

URL = "http://www.yahoo.com" 'the url that you want to pull html from

Set objXMLHTTP = Server.CreateObject("Microsoft.XMLHTTP") 'create the

xmlhttp object
objXMLHTTP.Open "GET", URL, false 'use the open command to get the url
objXMLHTTP.Send

'TO GET HEADERS
'response.write objXMLHTTP.getAllResponseHeaders

Response.Write "<hr>"
Response.Write "<h4>HTML Code for&nbsp"&URL&"</h4>"
Response.Write "<textarea rows=30 cols=120>"
Response.Write objXMLHTTP.responseText 'output the html that was
pulled from the page
Response.Write "</textarea>"
Set objXMLHTTP = Nothing

-----------------------------------------------
and it works...it fetches the page but i want it to save the information that it fetches into an html file

I tried using this code as well...
------------

Code:
sFile = "test.html"
sURL = "http://www.yahoo.com"

Set objXMLHTTP = CreateObject("WinHttp.WinHttpRequest.5.1")

objXMLHTTP.Open "GET", sURL, False
objXMLHTTP.Send

set strm1=createobject("adodb.stream")
With strm1
.type = 1
.open
.write objXMLHTTP.responsebody
.savetofile sFile, 2' adSaveCreateOverWrite
.close
End With
-------------------------
but it doesnt want to write to file.

i get the following error
ADODB.Stream error '800a0bbc'

Write to file failed.

/bytesect/data/test2.asp, line 15

Can anyone please help i am really struggling with this...I simply want a generated ASP page to be saved into an html page on the server through a script. I tried the filesystemobject method but it would be insane to insert an FSo.writeline "" code into every single line of html. This XMLHTTP component is promising but i wanna save the file!

View Replies View Related

XMLHTTP To Prompt File Upload

I am trying to upload a file on my web server to another website using XMLHTTP. My code logs onto the other website automatically and navigates through about 4 pages to the file upload screen.

If I were trying to post regular form data to the site it would work fine, but I have to some how mimic the <input type="file"> box and enctype="multipart/form-data" parameter of the form within the XMLHTTP post. I know I have to turn the file and other form data on my server into a binary stream and send it to the receiving website.

View Replies View Related

Msxml2.XMLHTTP Takes Too Long To Upload File

Uploading from browser to server using Msxml2.XMLHTTP takes a long time about 15 minutes for a 1.5MB file at 37.2Kbps, although it does get there. Is there anyway to speed things up?

Here's the code ...

View Replies View Related

File Download Box

Downloaded the sendMail.htm and sendMail.asp sample files
from technet onto my IIS 4.0 server. The first 2-3 times
I tested all went well. Subsequent tests, with no server
changes, gave/gives me the "File Download" dialogue box
when the sendMail.asp file should be executing. Why does
sendMail.asp give a "File Download" box instead of just
executing?

View Replies View Related

Download A File

I need to have script that automatic download files (open a "save file
dialog box") based on a variable (value in the URL).

Example:

files.asp?file=1 shall automaticly download file1.mp3 (open a dialogbox for
saving file1.mp3)

files.asp?file=2 shall automaticly download file2.mp3 (open a dialogbox for
saving file2.mp3)

View Replies View Related

Download File

I want to be able to let users download movies from my site, but when they click on the link it opens automatically with windows media player. Of course, they could right click and save target as, but the majority of users don't realise this.

Is there a way to tell a page to send the file to the browser as an attachment and force them to save it to disk i.e. not open automatically.

View Replies View Related

Download File

I have to write a code for download file in asp.

View Replies View Related

Download File

i just want to find out how do i make a file downloadable, like when it gives an option to save or open the file not only open it.

View Replies View Related

Download CSV File

How can i download a CSV file the same way a i could with a Excel XLS file using teh below at the top of the page: Code:

response.contentType = "application/vnd.ms-excel"

View Replies View Related

Download Txt File

can't use filesystemobject to create txt file on my C: drive. gives me access denied error.

I used same object to create file in the directory on the web server but how can I download txt file using something like a simple hyperlink to the exe file. a hyperlink to a text file simply opens that file in a browser.

View Replies View Related

File Download

I want the MP3 audio files to be able to download by users only. Even I set the pages validated by session, anyone still can type the download url to get my files without access of the pages where download URL provided. How can I do in order to prevent everyone from downloading without a user account?

View Replies View Related

Prevent File Download

Currently i am doing a file management project where user are able to create folder and upload files to it. The file ownner would be able to set permission (from database linking to the file path) if a user able to download it or not.

*each file info will be stored into a table e.g. fileid, filename, path, access.

Now i am facing a problem where if a user does not have permission to click on the link to download, the user can guess the path and the file name and directly type the path on the address bar to download the file.

View Replies View Related

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

Create And Download File

I have a script in ASP 3.0 which creates a CSV file on the server. After the
code has run I want it to prompt the user to download the file (via the
browser). I have spent a frustrating hour trying this.

View Replies View Related

File Download Dialog Box For Pdf

I want to get dialog box(open,save,cancel) for pdf file using asp(vbscript).
Presently when i click on pdf link on the site,the pdf document opens in
the browser.

I have used the below code(download.asp?file=filename):

<%
Response.AddHeader "content-disposition", "attachment; filename=" &
request.querystring("file")
Response.ContentType = "application/octet-stream"
%>

This file resides in the same dir of pdf documents Code:

View Replies View Related

File Download Utility

how do i create a file download utility that limits the number of users? for example, a maximum of 5 users can download a particular file at the same time.
i can use asp (not asp.net), javascript, maybe read/write a text file if necessary.

View Replies View Related

Automatic File Download

if anyone had any script that can allow a page to run some code and then kick off a file download.Maybe like many places do saying download should start automatically or you can "click here".I appologise if this is easy to work out from the source of one of those pages, but my view source seems to have died and I thought an answer from here might be quicker than fixing it!

View Replies View Related

Dont Download A File

i have a file *.num and when i enter the full URL to download it he give my
a 404 error !

but when i rename the *.NUM by *.TXT everything coming ok !?
so how i can tell to IIS6 to accept *.num files ?

View Replies View Related

How To Force A File Download

How to force a file download

Is it possible to use ASP to create something like, the following webpage, where you click on the download Mozilla now and up pops the downloader.

http://www.download.com/Mozilla-Fire...eatured.editor

I need to make it so that I can download a .WMV video file. because giving users the direct link doesn't work and I think its alot better than asking them to right click and save item as..

View Replies View Related

File Download In My Own Website

I wanna make a link for my visitors to download some files in my website.How can I do so?

View Replies View Related

File Download Https

I am trying to write a routine that allows users to download files from our secure site, with the code below the file will download and when you click save i get an IE error. However when the page is not https the routine runs just fine. Any Ideas?

View Replies View Related

Multiform Asp File Download

I am using enctype of multipart/form-data to transfer
files. However, in the target page (action), I can only
retrieve the file. ie. If I call Request.BinaryRead, then
Request doesnt process Form or QueryString anymore. If I
access Form/ QueryString, BinaryRead doesnt work anymore.

Is this by design? If so, how can I pass parameter to the
target page, alongwith file?

View Replies View Related

Download Text File

i have a code that creates a text file and puts it into a folder on the server. i would like after the script is finished creating the text file to prompt the user to download the newly created text file, when he clicks yes a window should appear asking where he would like to save it.

View Replies View Related

Multiple File Download

i am able to do file download using the response object, where a dialog box will appear,
asking user whether they want to open,save or cancel.

it is possible to download multiple files at once. since it is stated that 1 file download per http request. i am lookinn at
http://www.motobit.com/tips/detpg_m...es-one-request/

where it show multiple file per http request. i don't quite understand it though.

View Replies View Related

File Download Dialog Box

I have coded a file upload process in ASP and the current way I allow files to be downloaded, which have been uploaded is by using the <a href> tag. This works but it normally opens the files for the user in a new browser window. What I would like to do is present the user with a download link which opens the Windows File Download dialog box.
I thought there might be an easy way to do this kind of like HTML provides for uploading a file… which is the input type=file (presents the user with the browse button). Is there an easy way to present the user with a Windows File Download dialog box?

View Replies View Related

File Upload/download

Does anyone know of anything that will allow uploads to a server then show the URL of the file so the user can send and email to someone so it can be downloaded? I looked at huge asp upload and couldnt tell if it would show the url to the user. It has an email option but i cannot see if it does what i want it to do and i dont see anywhere on the site to find out.

View Replies View Related

Force Download Of Pdf File

How do i force a user to download from a hyperlink as adobe pdf file, it loads up in a new window and I need them to download it, or at least give them the choice to download it.

View Replies View Related

Auto Download Csv File

How can I force a download of a csv file by user clicking on hyperlink.

View Replies View Related

Multiple File Download

Is it possible to download multiple files from a site into a single document, which can also be downloaded as a single file? E.g. files

1. a.doc
2. b.pdf
3. c.pdf

output like document.zip etc?

View Replies View Related

Download CSV File In Client

how I can save my the result of my SQL Select query in a CSV file and later on
download it in the client side (showing the Save As dialog box...)?

View Replies View Related

Download File From Different Server Than IIS

I am trying to use asp to download a file located on a different server. I can use ADODB.Stream, LoadFromFile(ServerSomething) and the Response.BinaryWrite successfully, but only if I create an IUSR_XXXX account on the other machine.

What other alternatives do I have, or is this the best method? Could I use a com object that ran as a valid user on the other server to copy the file back to the IIS server?

View Replies View Related







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