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

Server.CreateObject Failed 2

Status
Not open for further replies.

theocraticmind

Programmer
Apr 19, 2002
318
CA
i would love some help with this problem. here is the code involved:


the error is this:
[tt]
Server object error 'ASP 0177 : 800a003e'

Server.CreateObject Failed

/church site/admin.asp, line 44

00000000
[/tt]
line 44, is content = objFile.readall

thanks again guys...you have helped me many times, even through my ignorance.
 
Can you post the entire code. It would really help to know where you are creating everyting like the objFile object....


The money's gone, the brain is shot.....but the liquor we still got.
 
i have posted the entire code. check out that link... it's a text file with all the code in it.
 
I would hazard a guess the line above isn't really working - that the file path is incorrect, or pointing to an empty file. codestorm
Fire bad. Tree pretty. - Buffy
select * from population where talent > 'average'
<insert witticism here>
 
ok, i know for a face that that is not the case... well, maybe. see the file name for the fiel is given like this:

admin.asp?what=youth-fun_stuff

then:

filename = request.querystring(&quot;what&quot;) & &quot;.asp&quot;

this is how i get the file name. i know for a face that [tt]youth-fun_stuff.asp[/tt] is a file. the question is, could there be a problem with making the file name in this way? and if so, is there a way around it?
 
Is it in the same directory as the ASP page calling it? codestorm
Fire bad. Tree pretty. - Buffy
select * from population where talent > 'average'
<insert witticism here>
 
Hey Theocratic guy...

Another thing to think about is that direct file access doesn't work with virtual filenames for the most part. You will need to provide a physical path to read or write data files. like:

&quot;C:\inetpub\
hope it helps.
and what is Theocratic anyway?
 
Sounds religious to me. codestorm
Fire bad. Tree pretty. - Buffy
select * from population where talent > 'average'
<insert witticism here>
 
codestorm,
ya, it's in the same directory.

tlhawkins,
in the past, i have never had to use absolute fie paths with FSO. but i will try. but i'm not to inclined to use a path from my hard drive. will &quot; fork the same? (note: in the url for viewing all the stuff in my pws folder)
 
well...

In my experience it is different everytime. I've used virtual filenames myself and had them work, but only from my computer. It seems like as soon as you use a dedicated server you need to use the absolute path, so it is probably a security setting someplace. I read a long explanation of it once but I still didn't understand it. I would give both methods a try and see what happens, it will probably take less time to try then it takes to read my long winded post... :)

hope ya get it.
 
thanks, i'll try it. not only may that help with this problem, but i think it will help with a prolem i was having with a completely differant project. one that worked fine on my machine, then completely crumbled when i went live. thanks.
 
when i atempt to use the absolute path
Code:
filename = &quot;C://computer/church%20site/&quot; & request.querystring(&quot;what&quot;) & &quot;.asp&quot;
the error moves up 2 lines to:
Code:
Set objFile = objFSO.OpenTextFile(filename, 1, 1)
the error is still [tt]server.createobject failed[/tt]. i'm not sure what that means...
 
Does your webuser (IUser) have permissions to access the directory? What operating system are you using?
 
Does your webuser (IUser) have permissions to access the directory?

i don't even know what &quot;webuser (IUser)&quot; is... sorry

What operating system are you using?

windows 98
 
I am using W2000. When I check the properties for a directory, my internet anonymous user (IUSR_MachineName) needs to have privileges to write to a directory. I don't remember how 98 works.

However, have you tried:

filename = &quot;C:/computer/church site/&quot; & request.querystring(&quot;what&quot;) & &quot;.asp&quot;

to open the file?
 
i have not tried that. but it would not work. &quot; acceses &quot;C:\windows\profiles\aron\my documents\pws\&quot;
so, i have tried:
filename = &quot;C:\windows\profiles\aron\my%20documents\pws\church%20site\&quot; & request.querystring(&quot;what&quot;) & &quot;.asp&quot;
and:
filename = &quot; & request.querystring(&quot;what&quot;) & &quot;.asp&quot;

ps.
when i posted
filename = &quot;C://computer/church%20site/&quot; & request.querystring(&quot;what&quot;) & &quot;.asp&quot;
as what i had tried, it was in err. i'm not sure why i messed that...
 
ack! when i took out the %20 that were suposed to replace spots that had spaces. it worked.
 
ok, so it works with an absolute file path that relates to my machine. how an i suposed to go live with that? is there no way to use the url? (like-&quot; site/youth-fun_stuff.asp&quot;)
 
let me know if i'm wrong, but should [tt]Server.MapPath()[/tt] not do the trick?
 
It should .. it'll return the absolute path. codestorm
Fire bad. Tree pretty. - Buffy
select * from population where talent > 'average'
<insert witticism here>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top