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

Hello all. Here's a problem that's

Status
Not open for further replies.

smsinger3

Programmer
Oct 5, 2000
192
US
Hello all. Here's a problem that's stumping me. On one server this statement works, but another server I get a "activex can't create component". I checked to make sure theere is an entry for the dll (scrrun.dll) and an entry for "Scripting.FileSystemObject" in the registry. They are both there, but it's still not working.

set objFSO = Server.CreateObject("Scripting.FileSystemObject")

Any ideas?

Thanks!

Steve
sms@hmbnet.com
 
Well, I replaced the dll with a newer version and rebooted, but that still didn't help! It's odd that it works on my pc where I do my development, but when I copy it to another server, I get the error.

Any other ideas???????

Thank you very much!
 
Try commenting all references to objFSO after setting.
Do you see error again?
If yes, I don't know what could be the problem.
If not, may be the problem is that you do not have proper rights to use(read and/or write) to a file on second server.
D.
 
I had the same probelm. I am connecting MS-ACCESS in my asp pages. But I had the problen (got this very same error message) when trying to use wizards in MS-ACCESS.
I solved it by repairing office amd then run windows update and office update.
Then it was solved.
 
It's still not working, so here's what I did:

1) Made sure c:\winnt\system32\scrrun.dll and everything it calls is in the system path
2) I believe the security is ok because out of desparation, I added the IUSR_server_name logon id as "Full Control" to all the files in c:\winnt\system32. (If there is a different way to check, then someone let me know)
3) I installed Scripting 5.5, Updated Internet Explorer to the newest version 5.5, and even installed MS Office 2000 (thinking that it may install some dll's that I need).

All of this still did not work. This is getting frustrating considering it works on my machine but not the development server.

Any other ideas? Thanks everyone for all your input!!!

Steve
sms@hmbnet.com
 
Can you try just to see if u can use wizards in access, or r u getting this error too?
For example, try to build a button using the wizard. Can u?
 
I really don't have access installed on that machine anymore, so I can't do it.

I'm still stumped... Maybe it is a security issue, but I'm not sure how.

Other suggestions?
 
Smsinger,

Can you show us more of your code? Do you have "server" defined as anything? You can also use:

set objFSO = CreateObject("Scripting.FileSystemObject")

Does the error point to that line in the ASP web page?

Just asking questions to see if we're on the right track.

fengshui1998



 
Here is my code:

dim objFSO

the statement below is where I get the error:
set objFSO = Server.CreateObject("Scripting.FileSystemObject")
set objFolder = objFSO.GetFolder(Application("edi_folder"))
set objAllFiles = objFolder.Files
for each objFile in objAllFiles
Response.Write &quot;<OPTION value=&quot; & objFile.Name & &quot; >&quot; & objFile.Name
next


I also tried it with the line you suggested above but it did not work either.

Is there something else I can try, or possibly another way to read, and copy a file?

Thanks :)

 

smsinger,

Try this first in TEST.VBS to see if the object can be created. This should tell you whether it is related to your web page.

fengshui1998

---TEST.VBS ---

Dim Fso
Set Fso = CreateObject(&quot;Scripting.FileSystemObject&quot;)
If fso.DriveExists(&quot;C:&quot;) Then
Wscript.echo &quot;Drive &quot; & drv & &quot; exists.&quot;
Else
Wscript.echo &quot;Drive &quot; & drv & &quot; does not exist.&quot;
End If
 
I found some discussions about that error.

I am quoting some of them (I am not responsible for any of it. :) )
1. &quot;I belive CreateObject and File Access capabilities are part of version 2 of
VBScript .. .. IE carries version 1.&quot;
2. &quot;Check the security settings&quot;.
3. &quot;That code, specifically: 'CreateObject', will never run on the client...
It WILL, however, run on the server (IIS) in an ASP.&quot;
4. &quot;It sounds like the Microsoft Scripting Component(sccrun.dll) that you're using has been removed or unregistered. one possible reason for this is if the user has removed IE5.
If the file isn't on the users system you can get an install for it from msdn.microsoft.com/scripting/&quot;

Following a discussion of that exact error:


Now some info:
 
Believe it or not, I figured out the problem!

It was a SECURITY isssue the entire time. I was quite sure that was not the problem because I thought the IUSR_servername had access to c:\winnt\system32 directory. I suppose I still don't quite understand security for IIS.

To figure out the problem, I wrote a very short visual basic program using the scrrun.dll object. I was able to run this under my own logon id, but when I logged in as IUSR_servername on the IIS server, I got the same error. This told me it was security related. I was not a happy camper, obviously.

Next, since I apparently thought I understood security, but didn't, I gave IUSR_servername Administrator rights. I know it's not a good thing to do, but my server is behind a firewall so the outside world can't touch it. (<--justification). Everything worked when I did this.

Now, I want to actually go back and figure out what the security rights should be, but time is lacking right now. I will make the time soon as I really want to know! If anyone knows the answer, then post it! When I find out, then I will put the answer on here.

Thanks everyone for your time for answering my post. I learned a lot! It really is very much appreciated X-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top