ASP access to Data on Remote devices

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • p byers

    #1

    ASP access to Data on Remote devices

    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)



  • Anthony Jones

    #2
    Re: ASP access to Data on Remote devices

    "p byers" <pb@sst-ltd.co.ukwrote in message
    news:48B26545.3 B05D32C@sst-ltd.co.uk...
    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_<machinena memachine 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.




    --
    Anthony Jones - MVP ASP/ASP.NET


    Comment

    • p byers

      #3
      Re: ASP access to Data on Remote devices

      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)

      Anthony Jones wrote:
      "p byers" <pb@sst-ltd.co.ukwrote in message
      news:48B26545.3 B05D32C@sst-ltd.co.uk...
      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_<machinena memachine 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.
      >
      --
      Anthony Jones - MVP ASP/ASP.NET

      Comment

      • Bob Milutinovic

        #4
        Re: ASP access to Data on Remote devices

        "p byers" <pb@sst-ltd.co.ukwrote in message
        news:48B2CCAE.9 2E14D6@sst-ltd.co.uk...
        >
        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.



        - Bob.


        Comment

        • p byers

          #5
          Re: ASP access to Data on Remote devices

          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 "dataBaseRo ot" 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\ReCon stituted_wwwroo t\Data\common\d ata\org_data.md b' 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\Re Constituted_www root\Data\commo n\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\www root\Data\commo n\"

          ''dataBaseRoot = "s:\atest\ReCon stituted_wwwroo t\Data\common\"

          ''dataBaseRoot = "\\MSS-0135F8\atest\Re Constituted_www root\Data\commo n\"

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

          set my_conn = Server.CreateOb ject("ADODB.Con nection")
          my_Conn.Open DBCon

          %>



          Bob Milutinovic wrote:
          >
          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.
          >

          >
          - Bob.

          Comment

          • Anthony Jones

            #6
            Re: ASP access to Data on Remote devices

            "p byers" <pb@sst-ltd.co.ukwrote in message
            news:48B2CCAE.9 2E14D6@sst-ltd.co.uk...
            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_<machinena mewhere 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).

            --
            Anthony Jones - MVP ASP/ASP.NET



            Comment

            • p byers

              #7
              Re: ASP access to Data on Remote devices

              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)

              Anthony Jones wrote:
              "p byers" <pb@sst-ltd.co.ukwrote in message
              news:48B2CCAE.9 2E14D6@sst-ltd.co.uk...
              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_<machinena mewhere 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).
              >
              --
              Anthony Jones - MVP ASP/ASP.NET

              Comment

              • Anthony Jones

                #8
                Re: ASP access to Data on Remote devices

                "p byers" <pb@sst-ltd.co.ukwrote in message
                news:48B3C4FD.D A3F061B@sst-ltd.co.uk...
                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.
                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
                !!
                >
                >



                --
                Anthony Jones - MVP ASP/ASP.NET


                Comment

                • Chris Hohmann

                  #9
                  Re: ASP access to Data on Remote devices

                  "p byers" <pb@sst-ltd.co.ukwrote in message
                  news:48B3A115.1 51A059B@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 "dataBaseRo ot" 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\ReCon stituted_wwwroo t\Data\common\d ata\org_data.md b' 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\Re Constituted_www root\Data\commo n\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\www root\Data\commo n\"
                  >
                  ''dataBaseRoot = "s:\atest\ReCon stituted_wwwroo t\Data\common\"
                  >
                  ''dataBaseRoot = "\\MSS-0135F8\atest\Re Constituted_www root\Data\commo n\"
                  >
                  DBCon = "Provider=Micro soft.Jet.OLEDB. 4.0; Data Source=" & dataBaseRoot &
                  "data\org_data. mdb"
                  ''Response.Writ e("<P>" & DBCon)
                  ''Response.end
                  >
                  set my_conn = Server.CreateOb ject("ADODB.Con nection")
                  my_Conn.Open DBCon
                  >
                  %>
                  >
                  >
                  >
                  Bob Milutinovic wrote:
                  >
                  >>
                  >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_(c...ing_Convention
                  >>
                  >- Bob.
                  >
                  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\myfilesh are\atest\ReCon stituted_wwwroo t\Data\common



                  Comment

                  • Bob Milutinovic

                    #10
                    Re: ASP access to Data on Remote devices

                    "p byers" <pb@sst-ltd.co.ukwrote in message
                    news:48B3A115.1 51A059B@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 "dataBaseRo ot" 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\ReCon stituted_wwwroo t\Data\common\d ata\org_data.md b' 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\ReCons tituted_wwwroot \Data\common\da ta\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.FileS ystemObject 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.


                    Comment

                    • p byers

                      #11
                      Re: ASP access to Data on Remote devices

                      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\ReCons tituted_wwwroot \Data\common\da ta\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/t...itywarning.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\a test\ReConstitu ted_wwwroot\Dat a\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 "strFileNam e" statements.

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

                      The other three fail !!


                      I pasted "S:\atest\ReCon stituted_wwwroo t\test\testshar e.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 TristateUseDefa ult = -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.Cr eateObject("Scr ipting.FileSyst emObject")
                      strFileName= "c:\inetpub\www root\test\tests hare.txt"
                      ''strFileName=
                      "\\mss-0135F8\pbyers\a test\ReConstitu ted_wwwroot\tes t\testshare.txt "
                      ''strFileName= "\\mss-0135F8\atest\Re Constituted_www root\test\tests hare.txt"
                      ''strFileName= "S:\atest\ReCon stituted_wwwroo t\test\testshar e.txt"


                      If objFS.FileExist s(strFileName) = True Then
                      Set objTextS = objFS.OpenTextF ile(strFileName , ForReading, False,
                      TristateFalse)

                      textRead = objTextS.ReadAl l

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

                      %>




                      Comment

                      • p byers

                        #12
                        Re: ASP access to Data on Remote devices

                        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\ReCons tituted_wwwroot \Data\common\da ta\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/t...itywarning.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\a test\ReConstitu ted_wwwroot\Dat a\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 "strFileNam e" statements.

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

                        The other three fail !!


                        I pasted "S:\atest\ReCon stituted_wwwroo t\test\testshar e.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 TristateUseDefa ult = -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.Cr eateObject("Scr ipting.FileSyst emObject")
                        strFileName= "c:\inetpub\www root\test\tests hare.txt"
                        ''strFileName=
                        "\\mss-0135F8\pbyers\a test\ReConstitu ted_wwwroot\tes t\testshare.txt "
                        ''strFileName= "\\mss-0135F8\atest\Re Constituted_www root\test\tests hare.txt"
                        ''strFileName= "S:\atest\ReCon stituted_wwwroo t\test\testshar e.txt"


                        If objFS.FileExist s(strFileName) = True Then
                        Set objTextS = objFS.OpenTextF ile(strFileName , ForReading, False,
                        TristateFalse)

                        textRead = objTextS.ReadAl l

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

                        %>




                        Comment

                        • Anthony Jones

                          #13
                          Re: ASP access to Data on Remote devices

                          "Bob Milutinovic" <cognicom@gmail .comwrote in message
                          news:efiZGY$BJH A.4384@TK2MSFTN GP04.phx.gbl...
                          "p byers" <pb@sst-ltd.co.ukwrote in message
                          news:48B3A115.1 51A059B@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 "dataBaseRo ot" 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\ReCon stituted_wwwroo t\Data\common\d ata\org_data.md b' 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\ReCons tituted_wwwroot \Data\common\da ta\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


                          Comment

                          • Anthony Jones

                            #14
                            Re: ASP access to Data on Remote devices

                            "p byers" <pb@sst-ltd.co.ukwrote in message
                            news:48B4F61D.4 5538B62@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\ReCons tituted_wwwroot \Data\common\da ta\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/t...itywarning.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\a test\ReConstitu ted_wwwroot\Dat a\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 "strFileNam e" 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\ReCon stituted_wwwroo t\test\testshar e.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 TristateUseDefa ult = -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.Cr eateObject("Scr ipting.FileSyst emObject")
                            strFileName= "c:\inetpub\www root\test\tests hare.txt"
                            ''strFileName=
                            "\\mss-0135F8\pbyers\a test\ReConstitu ted_wwwroot\tes t\testshare.txt "
                            ''strFileName=
                            "\\mss-0135F8\atest\Re Constituted_www root\test\tests hare.txt"
                            ''strFileName= "S:\atest\ReCon stituted_wwwroo t\test\testshar e.txt"
                            >
                            >
                            If objFS.FileExist s(strFileName) = True Then
                            Set objTextS = objFS.OpenTextF ile(strFileName , ForReading, False,
                            TristateFalse)
                            >
                            textRead = objTextS.ReadAl l
                            >
                            Response.Write textRead
                            else
                            Response.Write "File Not found"
                            end if
                            >
                            %>



                            --
                            Anthony Jones - MVP ASP/ASP.NET


                            Comment

                            • Bob Barrows [MVP]

                              #15
                              Re: ASP access to Data on Remote devices

                              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\ReCons tituted_wwwroot \Data\common\da ta\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\a test\ReConstitu ted_wwwroot\Dat a\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\ReCon stituted_wwwroo t\test\testshar e.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.


                              Comment

                              Working...