From: p byers on
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

%>




From: p byers on
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

%>




From: Anthony Jones on
"Bob Milutinovic" <cognicom(a)gmail.com> wrote in message
news:efiZGY$BJHA.4384(a)TK2MSFTNGP04.phx.gbl...
> "p byers" <pb(a)sst-ltd.co.uk> wrote in message
> news:48B3A115.151A059B(a)sst-ltd.co.uk...
> > 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.


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.

--
Anthony Jones - MVP ASP/ASP.NET


From: Anthony Jones on
"p byers" <pb(a)sst-ltd.co.uk> wrote in message
news:48B4F61D.45538B62(a)sst-ltd.co.uk...
> 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.


>
> ================================================================
>
> 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
>
> %>




--
Anthony Jones - MVP ASP/ASP.NET


From: Bob Barrows [MVP] on
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 byers wrote:
> 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.

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

--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.