Access to Remote Data Files with ASP VBScript
am 15.01.2005 14:39:58 von unknownPost removed (X-No-Archive: yes)
Post removed (X-No-Archive: yes)
Dr. Know wrote:
> Greetings,
>
> I have an ASP/VBScript 'application' that accesses database files
> through OLE DB. It was developed on Win2k and Win2k server.
>
> The script basically opens a connection to a remote drive which is
> shared, and opens a recordset for reading and writing. The connection
> is made in free file mode - meaning that the databases are not in a
> container, but separate files within a directory.
>
> I am using the Visual FoxPro OLE DB provider - vfpoledb.dll v8.0.3117
>
> It works fine here, but when we put it on the customer's machines, it
> fails to work - I cannot get a connection to the remote share. I've
> used the 'wizard' to create a UDL to check the connection, tests OK.
Of course it does: it's using your account to get permission to the remote.
>
> I have created and set permissions for the IUSR_MACHINENAME account to
> grant access to the files - and all the other things which work
For remote file access, you need a domain user account:
http://www.aspfaq.com/show.asp?id=2168
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Dr. Know wrote:
> Greetings,
>
> I have an ASP/VBScript 'application' that accesses database files
> through OLE DB. It was developed on Win2k and Win2k server.
>
> The script basically opens a connection to a remote drive which is
> shared, and opens a recordset for reading and writing. The connection
> is made in free file mode - meaning that the databases are not in a
> container, but separate files within a directory.
>
> I am using the Visual FoxPro OLE DB provider - vfpoledb.dll v8.0.3117
>
> It works fine here, but when we put it on the customer's machines, it
> fails to work - I cannot get a connection to the remote share. I've
> used the 'wizard' to create a UDL to check the connection, tests OK.
Of course it does: it's using your account to get permission to the remote.
>
> I have created and set permissions for the IUSR_MACHINENAME account to
> grant access to the files - and all the other things which work
For remote file access, you need a domain user account:
http://www.aspfaq.com/show.asp?id=2168
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Post removed (X-No-Archive: yes)
Post removed (X-No-Archive: yes)
Dr. Know wrote:
> Bob Barrows [MVP] said:
>
>> Dr. Know wrote:
>
>>> I am using the Visual FoxPro OLE DB provider - vfpoledb.dll
>>> v8.0.3117
>>>
>>> It works fine here, but when we put it on the customer's machines,
>>> it fails to work - I cannot get a connection to the remote share.
>>> I've used the 'wizard' to create a UDL to check the connection,
>>> tests OK.
>>
>> Of course it does: it's using your account to get permission to the
>> remote.
>
> I understand that - but it confirmed that the provider was installed
> and working.
>
>>> I have created and set permissions for the IUSR_MACHINENAME account
>>> to grant access to the files - and all the other things which work
>>
>> For remote file access, you need a domain user account:
>>
>> http://www.aspfaq.com/show.asp?id=2168
>
> As described in the previous post, Already been there, done that.
I'm sorry, but you did not describe it. I see no reference in your previous
post to creating a domain-level account for IUSR to impersonate ...
> Even used this exact page in my reading of 100's of pages pertaining
> to this problem. As I said, we have it working here, remote shares on
> two servers and all. IUSR anonomous users and permissions, Non-IIS
> managed passwords, ALL of it.
>
> I rem'd out the error trapping, and the exact error returned is:
>
> 80040e21 - invalid path or file name
>
> I even pasted the UDL generated path into the script, after the
> originally coded path failed to work.
>
It's not your connection string. It's permissions. The key to seeing this is
that it works for you and not the IUSR account. Try logging into your
machine as the IUSR account (you'll need to grant it a password) and test
the UDL under its credentials.
Of course, never having used Foxpro, I may be off-base here, so you may want
to try google or a foxpro newsgroup.
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Dr. Know wrote:
> Bob Barrows [MVP] said:
>
>> Dr. Know wrote:
>
>>> I am using the Visual FoxPro OLE DB provider - vfpoledb.dll
>>> v8.0.3117
>>>
>>> It works fine here, but when we put it on the customer's machines,
>>> it fails to work - I cannot get a connection to the remote share.
>>> I've used the 'wizard' to create a UDL to check the connection,
>>> tests OK.
>>
>> Of course it does: it's using your account to get permission to the
>> remote.
>
> I understand that - but it confirmed that the provider was installed
> and working.
>
>>> I have created and set permissions for the IUSR_MACHINENAME account
>>> to grant access to the files - and all the other things which work
>>
>> For remote file access, you need a domain user account:
>>
>> http://www.aspfaq.com/show.asp?id=2168
>
> As described in the previous post, Already been there, done that.
I'm sorry, but you did not describe it. I see no reference in your previous
post to creating a domain-level account for IUSR to impersonate ...
> Even used this exact page in my reading of 100's of pages pertaining
> to this problem. As I said, we have it working here, remote shares on
> two servers and all. IUSR anonomous users and permissions, Non-IIS
> managed passwords, ALL of it.
>
> I rem'd out the error trapping, and the exact error returned is:
>
> 80040e21 - invalid path or file name
>
> I even pasted the UDL generated path into the script, after the
> originally coded path failed to work.
>
It's not your connection string. It's permissions. The key to seeing this is
that it works for you and not the IUSR account. Try logging into your
machine as the IUSR account (you'll need to grant it a password) and test
the UDL under its credentials.
Of course, never having used Foxpro, I may be off-base here, so you may want
to try google or a foxpro newsgroup.
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Post removed (X-No-Archive: yes)
Post removed (X-No-Archive: yes)
Dr. Know wrote:
> Bob Barrows [MVP] said:
> And I would love to log on as the IUSR I created, but the computer is
> 800 miles away... No one there has a clue as to what I'm talking
> about... I have to administrate their computers via PCAnywhere.
No! Log into YOUR machine as IUSR and try to test your UDL on YOUR machine.
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Dr. Know wrote:
> Bob Barrows [MVP] said:
> And I would love to log on as the IUSR I created, but the computer is
> 800 miles away... No one there has a clue as to what I'm talking
> about... I have to administrate their computers via PCAnywhere.
No! Log into YOUR machine as IUSR and try to test your UDL on YOUR machine.
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Bob Barrows [MVP] wrote:
> Dr. Know wrote:
>> Bob Barrows [MVP] said:
>> And I would love to log on as the IUSR I created, but the computer is
>> 800 miles away... No one there has a clue as to what I'm talking
>> about... I have to administrate their computers via PCAnywhere.
>
> No! Log into YOUR machine as IUSR and try to test your UDL on YOUR
> machine.
I mean, log into your web server machine as IUSR ....
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Bob Barrows [MVP] wrote:
> Dr. Know wrote:
>> Bob Barrows [MVP] said:
>> And I would love to log on as the IUSR I created, but the computer is
>> 800 miles away... No one there has a clue as to what I'm talking
>> about... I have to administrate their computers via PCAnywhere.
>
> No! Log into YOUR machine as IUSR and try to test your UDL on YOUR
> machine.
I mean, log into your web server machine as IUSR ....
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Post removed (X-No-Archive: yes)
Post removed (X-No-Archive: yes)
I am sorry. I just saw this. I responded to your other posting. look at the
respons in the other posting also.
I beileve the you need to have a domain level iusr account for this to work.
Also it appears that the 2 servers are in different domain.. is this correct?
Alok
"Dr. Know" wrote:
> Bob Barrows [MVP] said:
>
> Bob, Thanks for the guidance, again. But...
>
> >Bob Barrows [MVP] wrote:
> >> Dr. Know wrote:
> >>> And I would love to log on as the IUSR I created, but the computer is
> >>> 800 miles away... No one there has a clue as to what I'm talking
> >>> about... I have to administrate their computers via PCAnywhere.
> >>
> >> No! Log into YOUR machine as IUSR and try to test your UDL on YOUR
> >> machine.
>
> >I mean, log into your web server machine as IUSR ....
>
> I'm not quite certain what you mean by this - as it works fine here.
> But I DID try it here and it does work.
>
> In case there is some misunderstanding, we have 5 computers here. One
> is a Win2k server. The others are development machines - primarily
> for MS Access. We are part of the MS Partners Program.
>
> I have no problem getting the server here to run the script and access
> other local machines when a duplicate anonymous account is created for
> this app. on both computers. I've tried creating three different NEW
> users on the machines - they all work fine here.
>
> The customer is 800 miles away, and has many on-site machines.
> The two machines in question are are the web server, and the machine
> with the data files we are trying to access from IIS(ASP). Going
> through the EXACT same config steps there as here, it fails to work.
> They do NOT run a domain controller.
>
> I created another NEW duplicate anonymous account on both machines,
> works fine here, but not there. It makes no sense.
>
> Here is what I have done since posting this.
> To eliminate the DB drivers as a problem, I created a simple script
> that writes a small test file to a remote share
>
> <%
> Set ScriptObject = Server.CreateObject("Scripting.FileSystemObject")
> Set MyFile = ScriptObject.OpenTextFile("\\DDMS\testfile.txt", 8,true)
> MyFile.WriteLine "*** Write file test ***"
> Myfile.writeline " file was written to at: " & Now
> Myfile.writeline " "
> MyFile.Close
> %>
>
> Works here, not there. I get (as expected) this error:
>
> Microsoft VBScript runtime error '800a0046'
> Permission denied
> /webuser/test.asp, line 3
>
> So, yes - you are right. It is a permissions issue.
>
> But why can I create a totally NEW duplicate account on two machines
> at our location and it works, but I do the EXACT SAME THING there and
> it doesn't?
>
> There is one odd thing...
> I ran the admin script ADSUtil.VBS script on the Web Server with the
> command:
>
> cscript adsutil.vbs get w3svc/anonymoususername and pass
>
> to retrieve the anonymous user account info, and it returns the
> administrator account info... The Admin account is not used as the
> IIS anonymous account anywhere on the system.
>
> I'm beginning to think something is hosed...
> They had this problem with another application, and finally gave up.
> This computer has been upgraded from Win98, to Win2000, to Windows
> Server2003 over the years - or so I'm told... Arrgghh....
>
> I'm so frustrated at this I could stick my head in a plastic bag - for
> about an hour... :-|
>
>
> Thanks again,
>
> Greg
>
>
>
>
>
>
>
>
>
> Dr. Know
>
I am sorry. I just saw this. I responded to your other posting. look at the
respons in the other posting also.
I beileve the you need to have a domain level iusr account for this to work.
Also it appears that the 2 servers are in different domain.. is this correct?
Alok
"Dr. Know" wrote:
> Bob Barrows [MVP] said:
>
> Bob, Thanks for the guidance, again. But...
>
> >Bob Barrows [MVP] wrote:
> >> Dr. Know wrote:
> >>> And I would love to log on as the IUSR I created, but the computer is
> >>> 800 miles away... No one there has a clue as to what I'm talking
> >>> about... I have to administrate their computers via PCAnywhere.
> >>
> >> No! Log into YOUR machine as IUSR and try to test your UDL on YOUR
> >> machine.
>
> >I mean, log into your web server machine as IUSR ....
>
> I'm not quite certain what you mean by this - as it works fine here.
> But I DID try it here and it does work.
>
> In case there is some misunderstanding, we have 5 computers here. One
> is a Win2k server. The others are development machines - primarily
> for MS Access. We are part of the MS Partners Program.
>
> I have no problem getting the server here to run the script and access
> other local machines when a duplicate anonymous account is created for
> this app. on both computers. I've tried creating three different NEW
> users on the machines - they all work fine here.
>
> The customer is 800 miles away, and has many on-site machines.
> The two machines in question are are the web server, and the machine
> with the data files we are trying to access from IIS(ASP). Going
> through the EXACT same config steps there as here, it fails to work.
> They do NOT run a domain controller.
>
> I created another NEW duplicate anonymous account on both machines,
> works fine here, but not there. It makes no sense.
>
> Here is what I have done since posting this.
> To eliminate the DB drivers as a problem, I created a simple script
> that writes a small test file to a remote share
>
> <%
> Set ScriptObject = Server.CreateObject("Scripting.FileSystemObject")
> Set MyFile = ScriptObject.OpenTextFile("\\DDMS\testfile.txt", 8,true)
> MyFile.WriteLine "*** Write file test ***"
> Myfile.writeline " file was written to at: " & Now
> Myfile.writeline " "
> MyFile.Close
> %>
>
> Works here, not there. I get (as expected) this error:
>
> Microsoft VBScript runtime error '800a0046'
> Permission denied
> /webuser/test.asp, line 3
>
> So, yes - you are right. It is a permissions issue.
>
> But why can I create a totally NEW duplicate account on two machines
> at our location and it works, but I do the EXACT SAME THING there and
> it doesn't?
>
> There is one odd thing...
> I ran the admin script ADSUtil.VBS script on the Web Server with the
> command:
>
> cscript adsutil.vbs get w3svc/anonymoususername and pass
>
> to retrieve the anonymous user account info, and it returns the
> administrator account info... The Admin account is not used as the
> IIS anonymous account anywhere on the system.
>
> I'm beginning to think something is hosed...
> They had this problem with another application, and finally gave up.
> This computer has been upgraded from Win98, to Win2000, to Windows
> Server2003 over the years - or so I'm told... Arrgghh....
>
> I'm so frustrated at this I could stick my head in a plastic bag - for
> about an hour... :-|
>
>
> Thanks again,
>
> Greg
>
>
>
>
>
>
>
>
>
> Dr. Know
>
Post removed (X-No-Archive: yes)
Post removed (X-No-Archive: yes)