473,413 Members | 1,727 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,413 software developers and data experts.

Need help with this script

I am able to read the contents of our dynamic pages, but how can I create
these html files on the fly on our server using asp. THe code below is a
test to see if I can read the html and then save it to a file on our server
in the same directory.

It will not let me write to the file.

I am trying to create static html pages from our dynamic asp script.
I know it is an writes issue, but does anybody have any other ideas?
Thanks

code is below:

----
Set http = CreateObject("microsoft.xmlhttp")
testfile = http://www.myserver.com/index.asp?product=55

http.Open "Post", testfile,False
testit2 = http.Send()
testit = http.responsetext

Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile("testfile.html, True)

a.write (testit)
Jul 19 '05 #1
6 1861
What do you mean, it will not "let" you write? Do you get an error? What
is it? What line?

In your sample code, you're missing a quote:

Set a = fs.CreateTextFile("testfile.htmlHERE, True)

Ray at home

"Danny" <da********@hotmail.com> wrote in message
news:4W*******************@news4.srv.hcvlny.cv.net ...
I am able to read the contents of our dynamic pages, but how can I create
these html files on the fly on our server using asp. THe code below is a
test to see if I can read the html and then save it to a file on our
server
in the same directory.

It will not let me write to the file.

I am trying to create static html pages from our dynamic asp script.
I know it is an writes issue, but does anybody have any other ideas?
Thanks

code is below:

----
Set http = CreateObject("microsoft.xmlhttp")
testfile = http://www.myserver.com/index.asp?product=55

http.Open "Post", testfile,False
testit2 = http.Send()
testit = http.responsetext

Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile("testfile.html, True)

a.write (testit)

Jul 19 '05 #2
Hi Ray

Thanks for writing. Yes, I get a permission error when I run the script. I
guess it is not letting the asp script create the file on the web server?
How can I fix.

THe quotes are in the actual script, thanks for pointing that out.

Thanks

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:eJ**************@TK2MSFTNGP10.phx.gbl...
What do you mean, it will not "let" you write? Do you get an error? What
is it? What line?

In your sample code, you're missing a quote:

Set a = fs.CreateTextFile("testfile.htmlHERE, True)

Ray at home

"Danny" <da********@hotmail.com> wrote in message
news:4W*******************@news4.srv.hcvlny.cv.net ...
I am able to read the contents of our dynamic pages, but how can I create
these html files on the fly on our server using asp. THe code below is a test to see if I can read the html and then save it to a file on our
server
in the same directory.

It will not let me write to the file.

I am trying to create static html pages from our dynamic asp script.
I know it is an writes issue, but does anybody have any other ideas?
Thanks

code is below:

----
Set http = CreateObject("microsoft.xmlhttp")
testfile = http://www.myserver.com/index.asp?product=55

http.Open "Post", testfile,False
testit2 = http.Send()
testit = http.responsetext

Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.CreateTextFile("testfile.html, True)

a.write (testit)


Jul 19 '05 #3
What is the error? (Copy and paste it from your browser.) And what line of
code gives this error?

Ray at work

"Danny" <da********@hotmail.com> wrote in message
news:TL*******************@news4.srv.hcvlny.cv.net ...
Hi Ray

Thanks for writing. Yes, I get a permission error when I run the script.
I
guess it is not letting the asp script create the file on the web server?
How can I fix.

THe quotes are in the actual script, thanks for pointing that out.

Thanks

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:eJ**************@TK2MSFTNGP10.phx.gbl...
What do you mean, it will not "let" you write? Do you get an error?
What
is it? What line?

In your sample code, you're missing a quote:

Set a = fs.CreateTextFile("testfile.htmlHERE, True)

Ray at home

"Danny" <da********@hotmail.com> wrote in message
news:4W*******************@news4.srv.hcvlny.cv.net ...
>I am able to read the contents of our dynamic pages, but how can I
>create
> these html files on the fly on our server using asp. THe code below is a > test to see if I can read the html and then save it to a file on our
> server
> in the same directory.
>
> It will not let me write to the file.
>
> I am trying to create static html pages from our dynamic asp script.
> I know it is an writes issue, but does anybody have any other ideas?
>
>
> Thanks
>
> code is below:
>
> ----
> Set http = CreateObject("microsoft.xmlhttp")
> testfile = http://www.myserver.com/index.asp?product=55
>
> http.Open "Post", testfile,False
> testit2 = http.Send()
> testit = http.responsetext
>
>
>
> Set fs = CreateObject("Scripting.FileSystemObject")
> Set a = fs.CreateTextFile("testfile.html, True)
>
> a.write (testit)
>
>



Jul 19 '05 #4
IT is the createtextfile command and this is the error

Error Type:
Microsoft VBScript runtime (0x800A0046)
Permission denied
/testit.asp, line 81

command is this
Set a = fs.CreateTextFile("testfile.html", True)

Thanks

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:uC**************@TK2MSFTNGP10.phx.gbl...
What is the error? (Copy and paste it from your browser.) And what line of code gives this error?

Ray at work

"Danny" <da********@hotmail.com> wrote in message
news:TL*******************@news4.srv.hcvlny.cv.net ...
Hi Ray

Thanks for writing. Yes, I get a permission error when I run the script. I
guess it is not letting the asp script create the file on the web server? How can I fix.

THe quotes are in the actual script, thanks for pointing that out.

Thanks

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:eJ**************@TK2MSFTNGP10.phx.gbl...
What do you mean, it will not "let" you write? Do you get an error?
What
is it? What line?

In your sample code, you're missing a quote:

Set a = fs.CreateTextFile("testfile.htmlHERE, True)

Ray at home

"Danny" <da********@hotmail.com> wrote in message
news:4W*******************@news4.srv.hcvlny.cv.net ...
>I am able to read the contents of our dynamic pages, but how can I
>create
> these html files on the fly on our server using asp. THe code below
is a
> test to see if I can read the html and then save it to a file on our
> server
> in the same directory.
>
> It will not let me write to the file.
>
> I am trying to create static html pages from our dynamic asp script.
> I know it is an writes issue, but does anybody have any other ideas?
>
>
> Thanks
>
> code is below:
>
> ----
> Set http = CreateObject("microsoft.xmlhttp")
> testfile = http://www.myserver.com/index.asp?product=55
>
> http.Open "Post", testfile,False
> testit2 = http.Send()
> testit = http.responsetext
>
>
>
> Set fs = CreateObject("Scripting.FileSystemObject")
> Set a = fs.CreateTextFile("testfile.html, True)
>
> a.write (testit)
>
>



Jul 19 '05 #5
These articles are relevant:

http://www.aspfaq.com/show.asp?id=2090
http://www.aspfaq.com/show.asp?id=2039
http://www.aspfaq.com/show.asp?id=2205

Bob Barrows

Danny wrote:
IT is the createtextfile command and this is the error

Error Type:
Microsoft VBScript runtime (0x800A0046)
Permission denied
/testit.asp, line 81

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jul 19 '05 #6
Try specifying the path in which the file should be created in. By not
specifying a path, it will [attemp to] be created in %systemroot%\system32.
Chances are pretty great that your IUSR doesn't have permissions to write a
file there, not that you'd want it there anyway.

Ray at work

"Danny" <da********@hotmail.com> wrote in message
news:T9********************@news4.srv.hcvlny.cv.ne t...
IT is the createtextfile command and this is the error

Error Type:
Microsoft VBScript runtime (0x800A0046)
Permission denied
/testit.asp, line 81

command is this
Set a = fs.CreateTextFile("testfile.html", True)

Thanks

"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:uC**************@TK2MSFTNGP10.phx.gbl...
What is the error? (Copy and paste it from your browser.) And what line

of
code gives this error?

Ray at work

"Danny" <da********@hotmail.com> wrote in message
news:TL*******************@news4.srv.hcvlny.cv.net ...
> Hi Ray
>
> Thanks for writing. Yes, I get a permission error when I run the script. > I
> guess it is not letting the asp script create the file on the web server? > How can I fix.
>
> THe quotes are in the actual script, thanks for pointing that out.
>
> Thanks
>
> "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
> message news:eJ**************@TK2MSFTNGP10.phx.gbl...
>> What do you mean, it will not "let" you write? Do you get an error?
>> What
>> is it? What line?
>>
>> In your sample code, you're missing a quote:
>>
>> Set a = fs.CreateTextFile("testfile.htmlHERE, True)
>>
>> Ray at home
>>
>> "Danny" <da********@hotmail.com> wrote in message
>> news:4W*******************@news4.srv.hcvlny.cv.net ...
>> >I am able to read the contents of our dynamic pages, but how can I
>> >create
>> > these html files on the fly on our server using asp. THe code below is > a
>> > test to see if I can read the html and then save it to a file on our
>> > server
>> > in the same directory.
>> >
>> > It will not let me write to the file.
>> >
>> > I am trying to create static html pages from our dynamic asp script.
>> > I know it is an writes issue, but does anybody have any other ideas?
>> >
>> >
>> > Thanks
>> >
>> > code is below:
>> >
>> > ----
>> > Set http = CreateObject("microsoft.xmlhttp")
>> > testfile = http://www.myserver.com/index.asp?product=55
>> >
>> > http.Open "Post", testfile,False
>> > testit2 = http.Send()
>> > testit = http.responsetext
>> >
>> >
>> >
>> > Set fs = CreateObject("Scripting.FileSystemObject")
>> > Set a = fs.CreateTextFile("testfile.html, True)
>> >
>> > a.write (testit)
>> >
>> >
>>
>>
>
>



Jul 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Sofia | last post by:
My name is Sofia and I have for many years been running a personals site, together with my partner, on a non-profit basis. The site is currently not running due to us emigrating, but during its...
5
by: deko | last post by:
In regard to running php scripts with cron - Here is a sample script: <?php //debug.php echo "<br> This is a test"; ?> I can call debug.php from a web page on my site like this:
6
by: mike | last post by:
Hello, After trying to validate this page for a couple of days now I was wondering if someone might be able to help me out. Below is a list of snippets where I am having the errors. 1. Line 334,...
28
by: Randy Starkey | last post by:
Hi, Does anyone know where I can get a script that show a little plus sign after a line of text, that when you click the plus sign, more text is revealed on that same page, like a continuing...
5
by: news | last post by:
I have a new situation I'm facing and could use a suggestion or two, as I don't seem to be able to think in the abstract very well. We have a local server which holds all of our image files. We...
2
by: ern | last post by:
My command-line application must be able to run text scripts (macros). The scripts have commands, comments, and flags. Comments are ignored (maybe they are any line beginning with " ; ") Commands...
4
by: Brie_Manakul | last post by:
I need to set up an if else to show different weather scripts based on the city selection they choose. Any help on this would be great. Thanks! <%@ page language="java" import="java.util.*,...
9
by: Mickey Segal | last post by:
The long-simmering Eolas patent dispute: http://www.microsoft.com/presspass/press/2003/oct03/10-06EOLASPR.mspx has led to an optional Microsoft Update: http://support.microsoft.com/kb/912945/en-us...
14
by: mistral | last post by:
Need compile python code, source is in html and starts with parameters: #!/bin/sh - "exec" "python" "-O" "$0" "$@" I have installed ActivePython for windows.
4
by: Jonathan Wood | last post by:
I'm trying to duplicate an HTML sample I have using my ASP.NET pages. The sample contains the following within the <headtag: <script type="text/javascript" src="flashobject.js"></script>...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
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,...
0
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...
0
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...
0
agi2029
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,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.