ASP access to Data on Remote devices

P

p byers

Good Morning Folks

I have a LAN
Among the several connections to it are the following four devices:
A MAXSTOR network Storage Device
A PC running Microsoft Windows 2000 Server 5.0.2195 (SP4)
A PC running Microsoft Windows XP Professional 5.1.2600 (SP2)
A PC running Microsoft Windows XP Professional 5.1.2600 (SP2)

All of the PCs are running IIS

The 'Public Internet' is connected via a Broadband connection from the
LAN

On the MAXSTOR is a folder called 'CENTRALDATA'
In that folder are a number of Access dotMDB files.

The Access files can be opened on all of the PCs by double clicking on
them in Windows Explorer.

================================================================
QUESTION ONE

Can the access files on the MAXTOR be accessed from dotASP pages on the
three PCs ??

If so, how ??

If so, are there any simple tutorial pages that explain in simple
language how to do it ??




================================================================
I have a similar 'CENTRALDATA' folder on a "Public Internet Server" that
I own

QUESTION TWO

Can the access files on the "Public Internet Server" be accessed from
dotASP pages on the three PCs ??

If so, how ??

If so, are there any simple tutorial pages that explain in simple
language how to do it ??




================================================================
I have a similar 'CENTRALDATA' folder on a "Public Internet Server" that
I own

QUESTION THREE

Can the access files on the "Public Internet Server" be accessed from
dotASP pages on other "Public Internet Server" servers ??

If so, how ??

If so, are there any simple tutorial pages that explain in simple
language how to do it ??




================================================================
By the way, I tried to create Virtual Folders using IIS Admin on the
three PCs on the LAN, but it will not allow it for 'Remote' folders.



I await your replies with interest
Thank You in Advance

Pete (Northolt UK)
 
A

Anthony Jones

p byers said:
Good Morning Folks

Whether it is morning depends on a) when the reader reads the message and b)
what timezone they are in.
I read this this morning and I'm UK based to so good morning back. But its
afternoon now, or is it?
I have a LAN
Among the several connections to it are the following four devices:
A MAXSTOR network Storage Device
A PC running Microsoft Windows 2000 Server 5.0.2195 (SP4)
A PC running Microsoft Windows XP Professional 5.1.2600 (SP2)
A PC running Microsoft Windows XP Professional 5.1.2600 (SP2)

All of the PCs are running IIS

The 'Public Internet' is connected via a Broadband connection from the
LAN

On the MAXSTOR is a folder called 'CENTRALDATA'
In that folder are a number of Access dotMDB files.

The Access files can be opened on all of the PCs by double clicking on
them in Windows Explorer.

================================================================
QUESTION ONE

Can the access files on the MAXTOR be accessed from dotASP pages on the
three PCs ??

If so, how ??

If so, are there any simple tutorial pages that explain in simple
language how to do it ??

You haven't stated whether you are expecting users to access the site
anonymously or not.

If all access is to be from users who have domain accounts on your network
then turn off anonymous access on the IIS site and turn on windows
intergrated security. Now grant access for those users to the file share
and folders containing the MDBs as would if the were accessing them via the
file system.

If you need anonymous access you will need more work. By default IIS
creates an IUSR_<machinename> machine guest account which it used to access
files. This account has not access to the network. Therefore you need to
create a new account in the domain and change the anonymous access on the
IIS to use this new domain account. Grant this account file access as
above.
================================================================
I have a similar 'CENTRALDATA' folder on a "Public Internet Server" that
I own

QUESTION TWO

Can the access files on the "Public Internet Server" be accessed from
dotASP pages on the three PCs ??

If so, how ??

If so, are there any simple tutorial pages that explain in simple
language how to do it ??

I guess that depends on what you mean by 'access'. If you mean can you use
JET queries against a copy of an MDB held on a public server I would say
thats probably not a good idea.


What is it you want to do? Download it? Do you need to upload it as well.
================================================================
I have a similar 'CENTRALDATA' folder on a "Public Internet Server" that
I own

QUESTION THREE

Seems identical to second.
================================================================
By the way, I tried to create Virtual Folders using IIS Admin on the
three PCs on the LAN, but it will not allow it for 'Remote' folders.

Creating virtual folders for a UNC path is possible, you must specific a
user name and password that IIS will use to access the folder. That however
would not help with DB queries against MDBs on remote server.
 
P

p byers

Anthony
Thank you for your reply.

I tried so hard not to 'screw-up' my request and to give all of the relevant
information !!

Such irony to slip-up on the 'Salutation' - lol

The access to the ASPages (both on the PCs on the Local LAN and on the 'Public
Internet') will be anonymous.

The access to the Databases is Jet Queries only - not uploading or downloading.

In simple language, I would like several servers running IIS (LAN and 'Public
Internet') to serve ASPages to be able to use the a Common (the same) Database -
not individual copies.

-AND-

to do it simply by quoting the appropriate Shared Folder in the DataSource of
the 'Open' statements.

-BUT-

I am too dim to be able to do it, I have Searched, Read and Struggled for ages -
and FAILed so far.

-HENCE-

My simple plea for simple help from clever folks

Thank you
Pete (Northolt UK)
 
B

Bob Milutinovic

p byers said:
In simple language, I would like several servers running IIS (LAN and
'Public
Internet') to serve ASPages to be able to use the a Common (the same)
Database -
not individual copies.
<snip>

There's an oft-abused acronym of "UNC" which'd help you greatly here.

Have a read of the URL below; hopefully that'll be enough to set you in the
right direction.

http://en.wikipedia.org/wiki/Path_(computing)#Uniform_Naming_Convention

- Bob.
 
P

p byers

Bob

Thank you for your advice.

The "Computer Name" of my MAXTOR storage device is: MSS-0135F8
On the PC on which I am testing, it is Mapped as the 'S:' drive

I created a tiny test ASPage which is shown below.

There are three "dataBaseRoot" values

================================================================

The first is to prove the Script by using a Local Database table - it works OK

================================================================

The second uses the Mapped drive name - it fails as below

Error Type:
Microsoft JET Database Engine (0x80004005)
's:\atest\ReConstituted_wwwroot\Data\common\data\org_data.mdb' is not a valid
path. Make sure that the path name is spelled correctly and that you are
connected to the server on which the file resides.
/test/testshare.asp, line 14

================================================================

The third is my attempt to use a UNC string - it fails as below

Error Type:
Microsoft JET Database Engine (0x80004005)
'\\MSS-0135F8\atest\ReConstituted_wwwroot\Data\common\data\org_data.mdb' is not
a valid path. Make sure that the path name is spelled correctly and that you
are connected to the server on which the file resides.
/test/testshare.asp, line 14

================================================================

Where do I go next ??

Pete (Northolt UK)



<%

dataBaseRoot = "c:\inetpub\wwwroot\Data\common\"

''dataBaseRoot = "s:\atest\ReConstituted_wwwroot\Data\common\"

''dataBaseRoot = "\\MSS-0135F8\atest\ReConstituted_wwwroot\Data\common\"

DBCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & dataBaseRoot &
"data\org_data.mdb"
''Response.Write("<P>" & DBCon)
''Response.end

set my_conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open DBCon

%>
 
A

Anthony Jones

p byers said:
Anthony
Thank you for your reply.

I tried so hard not to 'screw-up' my request and to give all of the relevant
information !!

Such irony to slip-up on the 'Salutation' - lol

The access to the ASPages (both on the PCs on the Local LAN and on the 'Public
Internet') will be anonymous.

The access to the Databases is Jet Queries only - not uploading or downloading.

In simple language, I would like several servers running IIS (LAN and 'Public
Internet') to serve ASPages to be able to use the a Common (the same) Database -
not individual copies.

-AND-

to do it simply by quoting the appropriate Shared Folder in the DataSource of
the 'Open' statements.

-BUT-

I am too dim to be able to do it, I have Searched, Read and Struggled for ages -
and FAILed so far.

-HENCE-

My simple plea for simple help from clever folks


I'm gonna guess that what you mean by public server is a server you run on
your network which is accessible to the public.

Add a new user to your domain (lets call it IUSR but you call it what you
like) and make it a part of the GUESTS group. Set its password never to
expire.

On the File server (MAXTOR?) grant IUSR read/write access to the file share
that contains the mdbs. Similarly grant the IUSR access to the folder that
is being shared.

The 2000 server will have a website or application folder which needs access
to an mdb on the file server. Open the site or applications properties in
IIS manager. Go to directory security, click edit... in authentication
control, clear Intergrated Windows authentication, click edit... anonymous
access, change the username to the domain IUSR account (use the browse
button to select this) and enter the IUSR account password. Clear the Allow
IIS to control password box and ok out the dialogs.

Grant IUSR at least read rights on the folder that is the root of the site
or application.

Open local security policy (in admin tools) on the 2000 server. Expand
Local Policies and click User Rights Assignment. In the list select and
edit 'Log on as batch job' add IUSR to the set of accounts that can logon as
a batch. While you're there look through the list of rights looking of
rights granted to IUSR_<machinename> where ever such a right is granted add
the IUSR (I think batch is the only one necessary, if that).

Access some simple htm or gif in the application from a browser to check you
got those steps correct. If that fails check the event logs, you'll likely
have some message complaining about the username, password or access rights.

I notice form subsequent replies that you may be attempting to access the
mdbs on a mapped network drive. The process that ASP applications run in
cannot see network drives. You must use UNCs to access network resources.

The site should now be able query the mdb files.

The steps for the XP systems are the same (note you only need one IUSR
account for the domain).
 
P

p byers

Anthony
Thank you for your reply



I will follow your advice step-by-step - hopefully arriving at the desired
solution.


I guess that I need to get to understand ActiveServer and create a Local Domain
on my LAN before I can start.

At the moment, connections on the LAN are achieved by IP Address or Machine
Name.



Only one point of correction - "Public Internet Server" is a phrase that I use
to describe a Windows 2003 Server hosted for me by '1and1 ltd' - I have total
use and control over that server, it is NOT shared access to a '1and1' Server.

I host around 80 of my own WebSites on it and provide hosting for other folks
too.

Sorry that I did not make that clear in my original question.

I also have several sites hosted with other ISPs

I dream of giving these other sites access to Databases on my 'own' server !!



Pete (Notholt UK)
 
A

Anthony Jones

p byers said:
Anthony
Thank you for your reply



I will follow your advice step-by-step - hopefully arriving at the desired
solution.


I guess that I need to get to understand ActiveServer and create a Local Domain
on my LAN before I can start.

Umm... that would seem to me to be a pre-requisite.
At the moment, connections on the LAN are achieved by IP Address or Machine
Name.



Only one point of correction - "Public Internet Server" is a phrase that I use
to describe a Windows 2003 Server hosted for me by '1and1 ltd' - I have total
use and control over that server, it is NOT shared access to a '1and1' Server.

Sorry I'm not clear on this now. You want query an mdb hosted on this
server from one on your internal network?
Do you have access to file services on this machine? Are you really sure
you want to be doing JET queries (not known for their robust nature) over a
VPN style link (if you have file service access you would want be using a
VPN)?

I host around 80 of my own WebSites on it and provide hosting for other folks
too.

Thats both the blessing and the curse of IIS. Much can be achieved without
a great deal of understanding of how it works.
 
C

Chris Hohmann

p byers said:
Bob

Thank you for your advice.

The "Computer Name" of my MAXTOR storage device is: MSS-0135F8
On the PC on which I am testing, it is Mapped as the 'S:' drive

I created a tiny test ASPage which is shown below.

There are three "dataBaseRoot" values

================================================================

The first is to prove the Script by using a Local Database table - it
works OK

================================================================

The second uses the Mapped drive name - it fails as below

Error Type:
Microsoft JET Database Engine (0x80004005)
's:\atest\ReConstituted_wwwroot\Data\common\data\org_data.mdb' is not a
valid
path. Make sure that the path name is spelled correctly and that you are
connected to the server on which the file resides.
/test/testshare.asp, line 14

================================================================

The third is my attempt to use a UNC string - it fails as below

Error Type:
Microsoft JET Database Engine (0x80004005)
'\\MSS-0135F8\atest\ReConstituted_wwwroot\Data\common\data\org_data.mdb'
is not
a valid path. Make sure that the path name is spelled correctly and that
you
are connected to the server on which the file resides.
/test/testshare.asp, line 14

================================================================

Where do I go next ??

Pete (Northolt UK)



<%

dataBaseRoot = "c:\inetpub\wwwroot\Data\common\"

''dataBaseRoot = "s:\atest\ReConstituted_wwwroot\Data\common\"

''dataBaseRoot = "\\MSS-0135F8\atest\ReConstituted_wwwroot\Data\common\"

DBCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & dataBaseRoot &
"data\org_data.mdb"
''Response.Write("<P>" & DBCon)
''Response.end

set my_conn = Server.CreateObject("ADODB.Connection")
my_Conn.Open DBCon

%>
The "S" drive is mapped to a network file share on MSS-0135F8, correct? If
so, what is the name of that file share. The name of the file share should
appear in the folder tree in Windows Explorer (i.e. the file manager). It
should appear as something like:

myfileshare on 'MSS-0135F8' (S:)

So, in the example above the UNC you should use would be:

\\MSS-0135F8\myfileshare\atest\ReConstituted_wwwroot\Data\common
 
B

Bob Milutinovic

p byers said:
Bob

Thank you for your advice.

The "Computer Name" of my MAXTOR storage device is: MSS-0135F8
On the PC on which I am testing, it is Mapped as the 'S:' drive

I created a tiny test ASPage which is shown below.

There are three "dataBaseRoot" values

================================================================

The first is to prove the Script by using a Local Database table - it
works OK

================================================================

The second uses the Mapped drive name - it fails as below

Error Type:
Microsoft JET Database Engine (0x80004005)
's:\atest\ReConstituted_wwwroot\Data\common\data\org_data.mdb' is not a
valid
path. Make sure that the path name is spelled correctly and that you are
connected to the server on which the file resides.
/test/testshare.asp, line 14

This would appear to be a major failing.

From the machine you're running the ASP scripts on, can you get to
S:\atest\ReConstituted_wwwroot\Data\common\data\org_data.mdb using Windows
Explorer?

If not, you'll need to create a permanent mapping to drive S: on _that_
machine, so IIS can reference the network drive.

If you can navigate to it with Explorer, then it'd likely be a
setting/permission issue within IIS, but I've never encountered this
before - and not having an IIS machine readily available to me at the
moment, I can't dig through the settings to see if there's anything in there
which would prevent you from accessing network shares from within a script.

To eliminate the possibility of it being a peculiarity of the external
Maxtor device, you might want to try accessing a share on another physical
(Windows-based) computer. You might also want to use
Scripting.FileSystemObject and ReadTextFile to read a text file from drive
S:, to see if an ASP script can access simple files from a shared source
(and if this succeeds, the blame'll lay on JET/OLEDB).

- Bob.
 
P

p byers

Chris and Bob

Thank you for your replies
I have done my best to try your suggestions.
I think/hope that I covered them all !!

The results are described below.


================================================================


I can Double Click on
S:\atest\ReConstituted_wwwroot\Data\common\data\org_data.mdb
in Windows Explorer and it opens it in MSAccess

BUT

It gives a security warning (can be seen at
http://www.byershostingpeter.co.uk/test/securitywarning.gif )
I have never noticed that warning before !!
On checking, I find that the message appears for any dotMDB files on any
networked PCs

SO

I checked on doubleclicking on dotTXT files on the "S:" share
No Security Warning
File opens in Notepad


I checked on doubleclicking on dotSVG files on the "S:" share
No Security Warning
File opens in Internet Explorer


================================================================

The "S:" share in WindowsExplorer is shown as:
pbyers on 'mss-0135F8 (192.168.1.110)' (S)

SO

I tried
dataBaseRoot = "\\mss-0135F8\pbyers\atest\ReConstituted_wwwroot\Data\common\"
still got the "is not a valid path" message !!



================================================================

I tried the "Z:" share and UNC eqivalent to get to the 'Windows Server 2000' PC

got the "is not a valid path" message !!


================================================================

I created an ASPage to test the ability to read a dotTXT file

It is shown below.

There are four "strFileName" statements.

The first is to prove the script on the Local PC - it works

The other three fail !!


I pasted "S:\atest\ReConstituted_wwwroot\test\testshare.txt" in the 'Open File'
box in Notepad and it opened the file instantly.

I tried the same test with both UNC strings - both took several seconds and
then gave "invalid file name"




================================================================

Thank you for your knowledge, suggestions and interest - I hope that we will
triumph !!

Pete (Northolt UK)


<%


Const ForReading = 1, ForWriting = 2, ForAppending = 8
Const TristateUseDefault = -2 ' Opens the file using the system default.
Const TristateTrue = -1 ' Opens the file as Unicode.
Const TristateFalse = 0 ' Opens the file as ASCII.

Set objFS=Server.CreateObject("Scripting.FileSystemObject")
strFileName= "c:\inetpub\wwwroot\test\testshare.txt"
''strFileName=
"\\mss-0135F8\pbyers\atest\ReConstituted_wwwroot\test\testshare.txt"
''strFileName= "\\mss-0135F8\atest\ReConstituted_wwwroot\test\testshare.txt"
''strFileName= "S:\atest\ReConstituted_wwwroot\test\testshare.txt"


If objFS.FileExists(strFileName) = True Then
Set objTextS = objFS.OpenTextFile(strFileName, ForReading, False,
TristateFalse)

textRead = objTextS.ReadAll

Response.Write textRead
else
Response.Write "File Not found"
end if

%>
 
P

p byers

Chris and Bob

Thank you for your replies
I have done my best to try your suggestions.
I think/hope that I covered them all !!

The results are described below.


================================================================


I can Double Click on
S:\atest\ReConstituted_wwwroot\Data\common\data\org_data.mdb
in Windows Explorer and it opens it in MSAccess

BUT

It gives a security warning (can be seen at
http://www.byershostingpeter.co.uk/test/securitywarning.gif )
I have never noticed that warning before !!
On checking, I find that the message appears for any dotMDB files on any
networked PCs

SO

I checked on doubleclicking on dotTXT files on the "S:" share
No Security Warning
File opens in Notepad


I checked on doubleclicking on dotSVG files on the "S:" share
No Security Warning
File opens in Internet Explorer


================================================================

The "S:" share in WindowsExplorer is shown as:
pbyers on 'mss-0135F8 (192.168.1.110)' (S)

SO

I tried
dataBaseRoot = "\\mss-0135F8\pbyers\atest\ReConstituted_wwwroot\Data\common\"
still got the "is not a valid path" message !!



================================================================

I tried the "Z:" share and UNC eqivalent to get to the 'Windows Server 2000' PC
got the "is not a valid path" message !!


================================================================

I created an ASPage to test the ability to read a dotTXT file

It is shown below.

There are four "strFileName" statements.

The first is to prove the script on the Local PC - it works

The other three fail !!


I pasted "S:\atest\ReConstituted_wwwroot\test\testshare.txt" in the 'Open File'
box in Notepad and it opened the file instantly.

I tried the same test with both UNC strings - both took several seconds and then
gave "invalid file name"




================================================================

Thank you for your knowledge, suggestions and interest - I hope that we will
triumph !!

Pete (Northolt UK)


<%


Const ForReading = 1, ForWriting = 2, ForAppending = 8
Const TristateUseDefault = -2 ' Opens the file using the system default.
Const TristateTrue = -1 ' Opens the file as Unicode.
Const TristateFalse = 0 ' Opens the file as ASCII.

Set objFS=Server.CreateObject("Scripting.FileSystemObject")
strFileName= "c:\inetpub\wwwroot\test\testshare.txt"
''strFileName=
"\\mss-0135F8\pbyers\atest\ReConstituted_wwwroot\test\testshare.txt"
''strFileName= "\\mss-0135F8\atest\ReConstituted_wwwroot\test\testshare.txt"
''strFileName= "S:\atest\ReConstituted_wwwroot\test\testshare.txt"


If objFS.FileExists(strFileName) = True Then
Set objTextS = objFS.OpenTextFile(strFileName, ForReading, False,
TristateFalse)

textRead = objTextS.ReadAll

Response.Write textRead
else
Response.Write "File Not found"
end if

%>
 
A

Anthony Jones

Bob Milutinovic said:
This would appear to be a major failing.

From the machine you're running the ASP scripts on, can you get to
S:\atest\ReConstituted_wwwroot\Data\common\data\org_data.mdb using Windows
Explorer?

If not, you'll need to create a permanent mapping to drive S: on _that_
machine, so IIS can reference the network drive.


How is that done exactly? I've never been able to convince IIS to use a
mapped drive, I'm not sure how a service would get to see one.
 
A

Anthony Jones

p byers said:
Chris and Bob

Thank you for your replies
I have done my best to try your suggestions.
I think/hope that I covered them all !!

The results are described below.


================================================================


I can Double Click on
S:\atest\ReConstituted_wwwroot\Data\common\data\org_data.mdb
in Windows Explorer and it opens it in MSAccess

BUT

It gives a security warning (can be seen at
http://www.byershostingpeter.co.uk/test/securitywarning.gif )
I have never noticed that warning before !!
On checking, I find that the message appears for any dotMDB files on any
networked PCs

Dunno what that is. A better test would be to knock up some VBScript in VBS
file that simulates the sort of ADO querying you would be doing from ASP.
SO

I checked on doubleclicking on dotTXT files on the "S:" share
No Security Warning
File opens in Notepad


I checked on doubleclicking on dotSVG files on the "S:" share
No Security Warning
File opens in Internet Explorer


================================================================

The "S:" share in WindowsExplorer is shown as:
pbyers on 'mss-0135F8 (192.168.1.110)' (S)

When you created the S: mapping did you enter any user credentials that are
needed gain access to the share?

SO

I tried
dataBaseRoot = "\\mss-0135F8\pbyers\atest\ReConstituted_wwwroot\Data\common\"
still got the "is not a valid path" message !!

What does this mean? Your assigning a string into a variable but what do
you do with it?
================================================================

I tried the "Z:" share and UNC eqivalent to get to the 'Windows Server 2000' PC
got the "is not a valid path" message !!

What is 'the "Z:" share"? What is the UNC equivalent?

================================================================

I created an ASPage to test the ability to read a dotTXT file

It is shown below.

There are four "strFileName" statements.

The first is to prove the script on the Local PC - it works

The other three fail !!

That isn't surprising since so far you haven't got the UNC path working even
in an interactive session and S: will not be available in IIS.

I pasted "S:\atest\ReConstituted_wwwroot\test\testshare.txt" in the 'Open File'
box in Notepad and it opened the file instantly.

I tried the same test with both UNC strings - both took several seconds and then
gave "invalid file name"

Sounds like there is a problem resolving the name mss-0145F8?
What protocols are you running (OTW are you running NBT over TCP/IP or just
straight TCP/IP).

Try pinging mss-0145F8 I bet that doesn't work. Is mss-0145F8 actually the
Computer name the domain knows the device as. Your other post appear to
refer to it as MAXTOR.
 
B

Bob Barrows [MVP]

Is this MAXTOR thing a removable drive?
In my experience, mapped drives do not work with IIS. you need to use
the unc path.

p said:
Chris and Bob

Thank you for your replies
I have done my best to try your suggestions.
I think/hope that I covered them all !!

The results are described below.


================================================================


I can Double Click on
S:\atest\ReConstituted_wwwroot\Data\common\data\org_data.mdb
in Windows Explorer and it opens it in MSAccess

This is not really relevant. just because this drive is visible to your
user account does not mean that it is visible to the account under which
ASP is running.

The "S:" share in WindowsExplorer is shown as:
pbyers on 'mss-0135F8 (192.168.1.110)' (S)

SO

I tried
dataBaseRoot =
"\\mss-0135F8\pbyers\atest\ReConstituted_wwwroot\Data\common\" still
got the "is not a valid path" message !!

Permissions. The account IIS is running under needs permissions to both
the pbyers share and the folder the share is referring to.
I pasted "S:\atest\ReConstituted_wwwroot\test\testshare.txt" in the
'Open File' box in Notepad and it opened the file instantly.

Again ... irrelevant
I tried the same test with both UNC strings - both took several
seconds and then gave "invalid file name"

Then you have the wrong path. This needs to be correct before you
attempt to use it.
 
P

p byers

Hi

Chris Hohmann and Bob Milutinovic gave me two replies that I read carefully and
tried to take on board.

They had both suggestions and questions.

I did my level best to try their suggestions and answer their questions.

I put it all in one reply to try and establish one path of trials.

================================================================

Anthony Jones and Bob Barrows both kindly contributed with comments and suggestions.

My replies and comments to both are here.


Anthony said

*********

"Dunno what that is. A better test would be to knock up some VBScript in VBS file
that simulates the sort of ADO querying you would be doing from ASP."

I will do that - the reason there are two reasons that I did not do it already

1. I expected that I would be told that this is the wrong group
- AND -
it is ASP that I want the things to wok in.

2. I have experience in the past that the content in VBS does not always work when
transfered to ASP

*********

"When you created the S: mapping did you enter any user credentials that are needed
gain access to the share?"

No - found the Folder (cannot remember if it was in 'Search' or 'Network Places') -
then RightClick - DropDown - Clicked on MapPath

*********

"What does this mean? Your assigning a string into a variable but what do you do
with it?"

In the Original Post, there was a copy of the ASPage, I inserted the line in to that
file.

*********

"What is 'the "Z:" share"? What is the UNC equivalent?"

In the Original Post I listed four devices on the Network - the "Z:" share is the
Windows 2000 Server.

The test was done in response to the thought that it could all work OK if I used a
PC rather than the MAXTOR device.

*********

"That isn't surprising since so far you haven't got the UNC path working even in an
interactive session and S: will not be available in IIS."

I understand that - that is the whole basis of my problem - lol

*********

"Sounds like there is a problem resolving the name mss-0145F8? What protocols are
you running (OTW are you running NBT over TCP/IP or just straight TCP/IP).

Try pinging mss-0145F8 I bet that doesn't work. Is mss-0145F8 actually the
Computer name the domain knows the device as. Your other post appear to refer to it
as MAXTOR."

Please look at http://www.byershostingpeter.co.uk/test/images-1.htm there are three
images tha I think may be relevant.

I do not know what protocols I am running, BUT, I will find out !!

Thank you Anthony



Bob said

*********

"Is this MAXTOR thing a removable drive?
In my experience, mapped drives do not work with IIS. you need to use the unc
path."

The MAXTOR thing is a Network Attached Storage device - 192.168.1.110

I have never got Mapped Drives to work with IIS

This is my first aquaintance with UNC paths - BUT - I am doing my best to learn -
lol

*********

"This is not really relevant. just because this drive is visible to your user
account does not mean that it is visible to the account under which ASP is running."

I understand that - it was done in response to a comment from 'Chris and the other
Bob' - I am trying to cover all bases and give all the info to the kind, clever
folks that are trying to help me !!

*********

"Permissions. The account IIS is running under needs permissions to both the pbyers
share and the folder the share is referring to."

I understand that - sadly, I am not very knowledgeable about the subject of
Permissions (so far, I have got away with plugging devices into a network and
praying - lol)

As mentioned in a previous post, I am furiously trying to learn and get up to speed
on the subject of Active Directory and Domains.

In years I am ancient - technologically, I am a Babe-in-Arms, but I am working hard
to learn - once I know, I wont forget !!

*********

"Again ... irrelevant"

I did this simple to prove to myself that I was not being caught out by any typos !!

*********

"Then you have the wrong path. This needs to be correct before you attempt to use
it."

That is something I know - I wish I could get the correct ones - with help from the
clever folks in here, I hope and expect to get there !!

*********

Thank you Bob
 
A

Anthony Jones

p byers said:
Hi

Chris Hohmann and Bob Milutinovic gave me two replies that I read carefully and
tried to take on board.

They had both suggestions and questions.

I did my level best to try their suggestions and answer their questions.

I put it all in one reply to try and establish one path of trials.

================================================================

Anthony Jones and Bob Barrows both kindly contributed with comments and suggestions.

My replies and comments to both are here.


Anthony said

*********

"Dunno what that is. A better test would be to knock up some VBScript in VBS file
that simulates the sort of ADO querying you would be doing from ASP."

I will do that - the reason there are two reasons that I did not do it already

1. I expected that I would be told that this is the wrong group

Yes it can be off putting when people are more interested in netiquette then
simpy being a community of people with knowledge spanning likely common
areas
- AND -
it is ASP that I want the things to wok in.

2. I have experience in the past that the content in VBS does not always work when
transfered to ASP

True, but its a useful diagnositic tool to know whether the same code runs
in VBS or not. If it does then its likely a user rights permission problem,
if doesn't then there is something else wrong.


*********

"When you created the S: mapping did you enter any user credentials that are needed
gain access to the share?"

No - found the Folder (cannot remember if it was in 'Search' or 'Network Places') -
then RightClick - DropDown - Clicked on MapPath

K that means either the current user has permissions or the share has no
restrictions.

*********

"What does this mean? Your assigning a string into a variable but what do you do
with it?"

In the Original Post, there was a copy of the ASPage, I inserted the line in to that
file.

*********

"What is 'the "Z:" share"? What is the UNC equivalent?"

In the Original Post I listed four devices on the Network - the "Z:" share is the
Windows 2000 Server.

The test was done in response to the thought that it could all work OK if I used a
PC rather than the MAXTOR device.

*********

"That isn't surprising since so far you haven't got the UNC path working even in an
interactive session and S: will not be available in IIS."

I understand that - that is the whole basis of my problem - lol

*********

"Sounds like there is a problem resolving the name mss-0145F8? What protocols are
you running (OTW are you running NBT over TCP/IP or just straight TCP/IP).

Try pinging mss-0145F8 I bet that doesn't work. Is mss-0145F8 actually the
Computer name the domain knows the device as. Your other post appear to refer to it
as MAXTOR."

Please look at http://www.byershostingpeter.co.uk/test/images-1.htm there are three
images tha I think may be relevant.

I do not know what protocols I am running, BUT, I will find out !!

The ping results shows your fundemental problem. The name mss-0145F8 can
not be resolved to an IP address.

Ordinarily in a TCP/IP Windows network running the old NetBT protocol the
2000 server would be nominated as a name server. I suspect that this isn't
working on your network because either it isn't running NetBT or the NAS
doesn't support it.

My advice for such a small network would be to edit the hosts file (you will
need to do this on each machine)

In notepad open C:\Windows\System32\drivers\etc\hosts file (note the hosts
file has no file extension).

Add an entry:-

192.168.1.110 MSS-01345F8

to the file and save.

Try the ping

If that works

try using the UNC path in Windows Explorer

If that works

try a sample of your code in a VBS file

If that works

try your ASP again

if that fails re-read my comments on configuring the anonymous user on a web
app.
 
P

p byers

Anthony

Added the line to the 'hosts' file

The 'ping' did work OK as you expected.

Created VBS file shown below.

Tried it with the database on the 'C:' drive just to prove the script
It Worhed OK

Tried it with the UNC file source.
It failed - Error message shown below

Pete (Northolt UK)



************* The VBS file *********************************

''dataBaseRoot = "c:\inetpub\wwwroot\Data\common\"

''dataBaseRoot = "s:\atest\ReConstituted_wwwroot\Data\common\"

''dataBaseRoot = "z:\wwwroot\Data\mailing\"

dataBaseRoot = "\\MSS-0135F8\pbyers\atest\ReConstituted_wwwroot\Data\common\"

DBCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & dataBaseRoot &
"data\org_data.mdb"
''Response.Write("<P>" & DBCon)
''Response.end

set my_conn = CreateObject("ADODB.Connection")
my_Conn.Open DBCon

WScript.Echo "Worked OK"


*********** The Error Message ****************************

---------------------------
Windows Script Host
---------------------------
Script: C:\Inetpub\wwwroot\test\testshare.vbs
Line: 16
Char: 1
Error:
'\\MSS-0135F8\pbyers\atest\ReConstituted_wwwroot\Data\common\data\org_data.mdb'
is not a valid path. Make sure that the path name is spelled correctly and that
you are connected to the server on which the file resides.
Code: 80004005
Source: Microsoft JET Database Engine
 
A

Anthony Jones

p byers said:
Anthony

Added the line to the 'hosts' file

The 'ping' did work OK as you expected.

Created VBS file shown below.

Tried it with the database on the 'C:' drive just to prove the script
It Worhed OK

Tried it with the UNC file source.
It failed - Error message shown below

Pete (Northolt UK)



************* The VBS file *********************************

''dataBaseRoot = "c:\inetpub\wwwroot\Data\common\"

''dataBaseRoot = "s:\atest\ReConstituted_wwwroot\Data\common\"

''dataBaseRoot = "z:\wwwroot\Data\mailing\"

dataBaseRoot = "\\MSS-0135F8\pbyers\atest\ReConstituted_wwwroot\Data\common\"

DBCon = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & dataBaseRoot &
"data\org_data.mdb"
''Response.Write("<P>" & DBCon)
''Response.end

set my_conn = CreateObject("ADODB.Connection")
my_Conn.Open DBCon

WScript.Echo "Worked OK"


*********** The Error Message ****************************

---------------------------
Windows Script Host
---------------------------
Script: C:\Inetpub\wwwroot\test\testshare.vbs
Line: 16
Char: 1
Error:
'\\MSS-0135F8\pbyers\atest\ReConstituted_wwwroot\Data\common\data\org_data.m
db'
is not a valid path. Make sure that the path name is spelled correctly and that
you are connected to the server on which the file resides.
Code: 80004005
Source: Microsoft JET Database Engine

Did you do the windows explorer test?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top