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

Error during file upload

Status
Not open for further replies.

eyal

Programmer
May 15, 2000
38
0
0
IL
Hi,
I'm trying to upload a file to my web site but get the following error message:
Server object error 'ASP 0177 : 800a0046'
Server.CreateObject Failed
/beta/Upload.asp, line 231

The line is: Set objFSOFile = objFSO.CreateTextFile(objFSO.BuildPath(Path, m_strFileName))
Is this information enough? Any idea?
Thanks
Eyal
 
> Is this information enough?

No.

> Server.CreateObject Failed

Based on that error message the line of code that failed would look something like this:

Set objFSOFile = Server.CreateObject("...")

That failure ususally means one of two things:

1) The ActiveX control you are trying to create is not installed (correctly) on the machine.

2) You did not spell the 'name' correctly in the parameter to 'CreateObject'

Hope this helps
-pete
 
If you are using Windows 2000 servers check the permissions are set to everyone write permission for that folder.

if u are using other than windows 2000 check the following two methods

1.
Disable password synchronization for the Internet Information Server 4.0 application. Use the following steps to disable password synchronization:


Open the MMC.


Edit the Properties page of the application.


Under the Directory Security tab, Edit "Anonymous Access and Authentication Control."


Edit the "Account used for Anonymous Access:"


Clear the "Enable Automatic Password Synchronization" check box.


2.
FIX: Cannot Access Remote Files with the FileSystemObject

--------------------------------------------------------------------------------
The information in this article applies to:

Active Server Pages
Microsoft Internet Information Server versions 3.0, 4.0, 5.0

--------------------------------------------------------------------------------


SYMPTOMS
When accessing remote resources with the FileSystemObject through Active Server Pages (ASP), one of the following errors occurs:

Microsoft VBScript runtime error '800a004c' Path not found


Microsoft VBScript runtime error '800a0046' Permission denied


Server object error 'ASP 0177 : 800a0046' Server.CreateObject Failed





RESOLUTION
Use the following steps to resolve this problem:

Open the User Manager on the remote computer and create an account named IUSR_machinename (of the Web server) and give that account the same password that is used on the IUSR_machinename on the Web server.

NOTE: If you don't know the password of the IUSR_machinename then you will need to assign this user a new password. You will then need to change the password for this same account on the Web Server as well.


Create a share on the remote server named "files" and assign Read/Write permissions to that share for the user you just created.


Use the Internet Service Manager of IIS 4.0 to change the authentication method to anonymous access and synchronize the password with the account you created in the previous step:


Open the Internet Service Manager.


Right-click the Web Application and select Properties.


Select the Directory Security tab.


Select Edit from the "Enable Anonymous Access and Authentication Control" section.


From the dialog box that appears select make sure that "Allow Anonymous Access" is selected and then click Edit.


De-select the "Enable Automatic Password Synchronization" option and type in the username(IUSR_machinename) and the password.





Created an ASP page in the Web Project to write to a text file like the following:


<%
Set ScriptObject = Server.CreateObject(&quot;Scripting.FileSystemObject&quot;)
Set MyFile =
ScriptObject.OpenTextFile(&quot;\\<machinename>\files\myfile.txt&quot;, 8,true)

MyFile.WriteLine &quot;*** Write file test ***&quot;
Myfile.writeline &quot; file was written to at: &quot; &amp; Now
Myfile.writeline &quot; &quot;
MyFile.Close
%>



Save the page and preview it in the browser.


The ASP code successfully created a text file located here:



\\<machinename>\files\myfile.txt.




STATUS
This bug was corrected in Windows 2000.



REFERENCES
For more information, please see the following article in the Microsoft Knowledge Base:


Q184566 HOWTO: Set Up Duplicate Anonymous Account on Separate Server

For further information, please see the following articles on the MSDN Online Web Workshop:

Querying Remote Databases
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top