Wrox Programmer Forums
|
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP 3.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 14th, 2004, 12:25 PM
Registered User
 
Join Date: Jul 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default ADO Stream/CopyRecord failure

I have a series of problems:

1) objRecord.Open Filename, URL1, Mode,, Options, UserName1, Password1
   objRecord.CopyRecord "", URL2, UserName2, Password2
In this case, the line 1 works and line 2 causes "Server cannot complete the operation" error. I checked the write checkbox of the virtual directory, file folder's security box, etc. but the result is the same.

2) objRecord.Open Filename, URL1, Mode,, Options, UserName1, Password1
   objStream.Open objRecord ,,adOpenStreamFromRecord
In this case, the line 1 works and line 2 cuases "Unspecified error"

3) objRecord.Open Filename, URL1, Mode,, Options, UserName1, Password1
   objStream.Open URL1, Mode, Oprions, 8, UserName1, Password1
In this case, the line 1 works and line 2 causes "Permission denied"

4) objRecord.Open Filename, URL1, Mode,, Options, UserName1, Password1
   objStream.Open
   objStream.LoadFromFile Filename
In this case, it works.

So, method 4) is ok, as long as I get a file from a computer in the same private network. However, I cannot get a file from a computer in remote location even if it is connected by VPN. I assume methods 1) to 3) should be used for getting a file from a remote computer. I tried many user name permission combinations but no success. The ASP server is in a Workgroup and the file exists in a server within another Domain. Any help is appreciated.
ken



 
Old July 15th, 2004, 10:06 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi there,

What is there in URL1 and URL2? Also check if the required permissions to those files are already applied for the IUSR_YOURCOMPUTERNAME account(on system that is running IIS).

Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old July 15th, 2004, 09:52 PM
Registered User
 
Join Date: Jul 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Vijay for your response.

URL1 is "URL=http://xxx.xxx.xxx.xxx/Folder" for objRecord statement and "URL=http://xxx.xxx.xxx.xxx/Folder/data.txt" for objStream statement, where xxx... is the IP address for the remote server. URL2 is "http://www.yyy.com/Folder" where yyy.com is the domain for the ASP server (self). I included IUSR_MYCOMPUTERNAME account for permission for the folder of the remote server but the result was the same. Actually, when incorrect username/password is used in the ASP code or incorrect permission is set at the remote server, the line 1 gives permission denied. So I am really puzzled why the line 1 always works with correct username/password and given permission and line 2 (or objStream open, etc.) never works with the same arrangement.
Thanks for your continuing attention.

Ken

 
Old July 18th, 2004, 12:17 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hi Ken,

You may take a look at this thread which was posted long back here in this forum. Server cannot complete operation

Hope that helps.
Cheers!

_________________________
- Vijay G
Strive for Perfection
 
Old July 18th, 2004, 12:31 PM
Registered User
 
Join Date: Jul 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Vijay,

Thank you so much for valuable suggestions. I tried all of the permission setups that your referenced thread suggested, with the same result. However, the same thread also suggested an xml which actually did the job! I spent so much time with ADO but XML is such a breeze. Anyone who has problems with ADO should try reading this: http://www.aspfaq.com/show.asp?id=2173

Vijay, I do not feel 100% comfortable because of the ADO/Stream and permission mystery, but thanks to you I can move on. Much appreciated.

Ken





Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems with copyRecord method of Record object Syster Tara Classic ASP Basics 7 September 19th, 2006 10:55 PM
xml binary file to ADO stream clk1022 XML 1 March 17th, 2006 03:33 PM
XML binary file to ADO stream object clk1022 ASP.NET 2.0 Professional 0 March 16th, 2006 10:31 PM
XML binary file to ADO Stream object clk1022 VB.NET 1 March 16th, 2006 10:23 PM
ADO object failure for larger querys rowlandc Excel VBA 0 May 5th, 2004 11:16 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.