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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Microsoft VBScript runtime error '800a0046'

Status
Not open for further replies.

Mike2020

Programmer
Mar 18, 2002
55
US
Hi:

I got this error msg when I open my webpage index.asp:

Microsoft VBScript runtime error '800a0046'
Permission denied
/index.asp, line 29

This error point to this line of code

fp = Server.MapPath("aspcount.txt")
Set fs = CreateObject("Scripting.FileSystemObject")
Set a = fs.OpenTextFile(fp)
ct = Clng(a.ReadLine)
if Session("ct") = "" then
Session("ct") = ct
ct = ct + 1
a.close
Set a = fs.CreateTextFile(fp, True) <------------error here
a.WriteLine(ct)
end if
a.Close

this is in Unix environment. I chmod aspcount.txt file to 777.
So I don't know get this error.

Thanks lots for help
 
It sounds like a permission problem. I am not sure how it would work in UNIX, but NT would generate that error if the user that the web service is using to interact with the server doesn't have permission to write to or modify objects in that directory.

That would be where I would start.
 
I think you may find that the chmod needs to be 577 or 775. Its a long time since I worked with unix but I do remember that all 7's usually caused a problem. Experiment anyway. ASCII silly question, get a silly ANSI
 
This happened to me when I was doing createtextfile.
I hadn't set write permissions for the database, so therefore no files could be created.
and also if you're dealing with subfolders, make sure all the folders and parent folders have the write permissions set as well.
hope this helps

george
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top