Automation server can't create object

1) The script in question IS working on my remote host, it IS NOT working on my home development machine.
2) It was working at home but I recently bought a new system and can't get it going now.
3) I am running MDAC 2.8 SP1 on Windows XP SP2, this per the Microsoft Component Checker utility.
4) Anti-virus script blocking is disabled
5) My Internet Guest Account (IUSR_<machineName>) has full control over the folder containing the application
6) IIS virtual directory allows read and write, allows execute permission for scripts only, application protection is low
7) IIS directory security allows anonymous access for the Internet Guest Account (IUSR_<machineName>), allow 'IIS to control password' is checked

The ASP fails in both VBScript and javaScript.
==========================
VBScript:
   Dim objFileSystem, objOutputFile
   Dim strOutputFile
   Set objFileSystem = CreateObject("Scripting.fileSystemObject")
----------------------------
Fails with:
Microsoft VBScript runtime error '800a01ad'
ActiveX component can't create object: 'Scripting.fileSystemObject'
===========================
JavaScript:
    var fs=Server.CreateObject("Scripting.FileSystemObject");
---------------------------
Fails with:
Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
Invalid class string
===========================
Bob3975Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

fritz_the_blankCommented:
What error do you get with this:

VBScript:
   Dim objFileSystem, objOutputFile
   Dim strOutputFile
   Set objFileSystem = Server.CreateObject("Scripting.fileSystemObject")

We should get a little more information.

FtB
0
_Maddog_Commented:
Hi Bob3975,

Have you run the IIS Lockdown tool on this machine?

try re-registering the dll file scrrun.dll in the following manner:
start -> run... -> regsvr32 %windir%\system32\scrrun.dll



0
_Maddog_Commented:
also, make sure IUSR user has execute permissions in %windir%\system32

0
C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Bob3975Author Commented:
Maddog:
- regsvr32 %windir%\system32\scrrun.dll succeded with no change in problem.
- I doubt I ran IIS Lockdown, I have no idea what that is
- IUSR had 'read&write', 'list folder contents', and 'read'.  I added full control with no change in problem.

Fritz:
- it returns...
   Server object error 'ASP 0177 : 800401f3'
   Server.CreateObject Failed
   Invalid class string

0
DragonlairdCommented:
OK... Firstly, there's nothing wrong with your ASP code above as you surmised... It will work on a local machine as I've copied/pasted your ASP code into a test page on my own machine but there is one slight hiccup...

When PWS is installed, the only web site it configures is called Default and that's the only web site you can use (otherwise it would be IIS and not PWS).

The default security settings for this are such that it limits access to almost everything that could damage your PC, including accessing files on the local HDD (thanks to those who wrote such viruses as RedAlert etc).

You need to reset the security settings for the Default website to allow your code to run correctly...

It's been a while since I modified my settings so perhaps someone else can confirm or embellish this as I'm bound to have forgotten something I changed...

The method I used to achieve this was to create a backup folder within the root of the website and move all the existing root contents there (including sub folders) to give me a clean workspace.

Add the IWAM_<MachineName> Account to the Inetpub/wwwroot folder security with at least Write permission...

I then modified my Default website properties to reflect the following...
Home Directory Tab
   Execute Permissions - Scripts only
   Application Protection = Medium (Pooled)
Directory Security Tab
   Edit Anonymous Access and check 'Integrated Windows authentication'

Hope this helps...
0
fritz_the_blankCommented:
Okay, that is helpful.

This comes down to  one of two issues:

1) the object is not registered
2) you have invalid permissions.

Now, you have clearly indicated above that you have given the IUSR accout full permissions. You may need to do the same for IWAM.

If you want to rule out permissions altogether, then try creating a small .vbs file to use the FSO. If it works, then you know that the object is registered and that points to a configuration issue. If that does not run, that points to a permissions issue as unlikely as that seems given the information in your question.

FtB
0
_Maddog_Commented:
Bob3975,

Sorry, meant IWAM user, it runs dlls <blush>
0
_Maddog_Commented:
Whoops, sorry fritz... suggestion cross posted
0
fritz_the_blankCommented:
It's okay, I just did the same to Dragonlaird in regards to the IWAM account issue.

FtB
0
_Maddog_Commented:
I meant setting permissions on the directory that has scrrun.dll (%windir%\system32), the file that actually runs FileSystemObject.
0
Bob3975Author Commented:
Well, now I'm in free fall panic mode!  I added IWAM to the application directory and Windows\system32 and rebooted.  Now I get ...

Active Server Pages error 'ASP 0201'
Invalid Default Script Language
The default script language specified for this application is invalid.

on the asp page that has always begun with and still does begin with <%@ Language = javascript%>.  As well as the test VBScript I used earlier and is posted in the first comment!

0
fritz_the_blankCommented:
Okay, what happens if you try setting the language to VBScript? Same problem?

I am starting to suspect that you may need to uninstall IIS and then do a reinstall.

FtB

0
fritz_the_blankCommented:
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
_Maddog_Commented:
Oh... I get it.

Go to IIS
right click on your website, go to the Home Directory tab.
Click on configuration, go to the options tab...

Write (yes, it's free text) VBScript in the "Default ASP language" textbox.
0
Bob3975Author Commented:
You gotta break a few eggs to make an omelet.  It was a sharing issue just like every web page I ever visited said it was, but it was the link fritz put up that solved it the invalid scripting language.

Here' what must have happened.  I've been changing permissions for a while trying to get the FSO to work and getting nowhere.  Then the IWAM thing and the reboot interacted with whatever I'd been doing to kill the site completely, even system restore couldn't fix it.  The link http://forums.aspfree.com/archive/t-31394 Fritz put up has a guy solving the invalid script language issue by removing the share on his directory and then re-sharing.  well, that solved both the invalid scripting language as well as the original issue where I couldn't instantiate the FSO.

I'll split the points with Fritz getting extra for that link.

You guys should visit  http://www.experts-exchange.com/Web/Web_Languages/ASP/Q_21551169.html#14904151, he's got something nearly identical going on.  Then again, this might fix his also!

Thanks guys, but you had me soiling my shorts for a while!
0
Bob3975Author Commented:
BTW, It's running fine w/o IWAM.
0
fritz_the_blankCommented:
Glad to have helped,

FtB
0
Bob3975Author Commented:
This has spawned another problem.  I'm posting here again hoping you guys will look into http://www.experts-exchange.com/Web/Web_Languages/ASP/Q_21577042.html which I just posted.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.