Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

http request to own site to create a web cache

Status
Not open for further replies.

Sarky78

Programmer
Oct 19, 2000
878
GB
hi all,

Hopeing someone here will be able to help with this issue. We have some code that is accessing our own server based upone various url params and creating an html file to take some pressure of this high traffic website.

Now this code is working locally and with some of the urls that are passed to it, but fails on some of them. it is managing to access the url, so it isn;t the httpo request that is breaking it, but it is the writing of the file to the file system that is causing the problem.

has anyone come across a problem like this in the past?

this is the code that i have:

Code:
<% @LANGUAGE="JScript" %>
<%

var path = Request.ServerVariables("APPL_PHYSICAL_PATH");

var fSys = new ActiveXObject("Scripting.FileSystemObject");
var xmlhttp = new ActiveXObject("Msxml2.ServerXMLHTTP.6.0");

var strServer = "[URL unfurl="true"]http://"[/URL] + Request.ServerVariables("SERVER_NAME") + "/index.asp"+queryString;

xmlhttp.open("GET", strServer, 0);
xmlhttp.send("");
var HTMLFile = fSys.OpenTextFile(path+'\index.htm',2,true);
HTMLFile.Write(xmlhttp.responseText);
HTMLFile.Close();
var xmlhttp = null;

%>

any ideas?

Tony
 
>var HTMLFile = fSys.OpenTextFile(path+'\index.htm',2,true);
[tt]var HTMLFile = fSys.OpenTextFile(path+'[red]\[/red]\index.htm',2,true);[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top