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.
   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'
    var fs=Server.CreateObject("Scripting.FileSystemObject");
Fails with:
Server object error 'ASP 0177 : 800401f3'
Server.CreateObject Failed
Invalid class string
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.

What error do you get with this:

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

We should get a little more information.

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

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

Rowby Goren Makes an Impact on Screen and Online

Learn about longtime user Rowby Goren and his great contributions to the site. We explore his method for posing questions that are likely to yield a solution, and take a look at how his career transformed from a Hollywood writer to a website entrepreneur.

Bob3975Author Commented:
- 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.

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

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...
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.


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

I meant setting permissions on the directory that has scrrun.dll (%windir%\system32), the file that actually runs FileSystemObject.
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!

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.



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
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.
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 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, 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!
Bob3975Author Commented:
BTW, It's running fine w/o IWAM.
Glad to have helped,

Bob3975Author Commented:
This has spawned another problem.  I'm posting here again hoping you guys will look into which I just posted.
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

From novice to tech pro — start learning today.