Data Access Pages

Saturday, November 09, 2002 01:00:22
home

There is a link to this at Microsoft's Knowledge Base

Q264080 ACC2000: How to Deploy Data Access Pages over the Internet

http://support.microsoft.com/support/kb/articles/q264/0/80.asp
(There is also a local copy of that page here)

Here is some more information on this topic I derived from a Google search in the newsgroups:


To make things more understandable I have pulled out the steps you need to take
for deploying on a Windows 2000 Server (Basically this is just verbatim from the article, I
cannot stress enough the importance of these steps, if you want to sucessfully deploy data Access pages.)

  1. First Create an Anonymous user

    ~Click Start , point to Programs , point to Administrative Tools , and then click Computer Management .

    ~Expand Local Users and Groups , and then click the Users folder.

    ~On the Action menu, click New User .

    ~Type DAPInternetAccount in the User name box.

    ~Click to clear the User must change password at next logon check box, click to select the User cannot change password check box, click to select the Password never expires check box, and then click Create .

    ~Click Close to close the New User dialog box, and then close the Microsoft Management Console.

  2. Now you must set folder and file permissions

    ~Double-click My Computer on the desktop.

    ~Browse to the C:\Program Files\Common Files\System folder. If your operating system is installed on a different logical drive, use that drive letter.

    ~Right-click the MSADC folder, click Properties , click the Security tab in the Msadc Properties dialog box, and then click Add .

    ~Replace <<Type names separated by semicolons or choose from list>> with <ServerName>\DAPInternetAccount , where <ServerName> is the computer name of the Web server, and then click OK to close the dialog box.

    ~Make sure DAPInternetAccount is selected, and then click to clear the List Folder Contents check box for the MSADC folder. This will result in Read permissions being assigned to the subdirectory. Click OK to close the Msadc Properties dialog box, and then close the folder.

    ~Repeat steps 1 through 6, but this time, select the folder where the database is located, and then assign Full Control permissions to this folder. <<<VERY IMPORTANT>>>>

    ~Repeat steps 1 through 6 again, but this time, select the database file itself, and assign Full Control permissions to this file. <<VERY IMPORTANT>>>

  3. Configuring the Web Server

    ~ click Start , point to Programs , point to Administrative Tools , and then click Internet Services Manager

    ~Expand the Default Web Site.

    ~Right-click the MSADC virtual directory, and then click Properties .

    ~Click the Directory Security tab in the Msadc Properties dialog box.

    ~Click Edit under Anonymous Access and Authentication Control .

    ~Make sure that the Allow Anonymous Access check box is selected, and then click the Edit button beside Account used for Anonymous Access .

    ~Type DAPInternetAccount .

    ~click to select the Allow IIS to Control Password check box.

    ~Click OK to close the dialog boxes and return to the Internet Services Manager.

    <<<VERY IMPORTANT NOTE BELOW>>>> Windows 2000 Server Only: On a clean installation of Windows 2000 Server, the MSADC virtual directory defaults to access denied for all IP addresses and domain names. For additional information about configuring RDS on Windows 2000, click the article number below to view the article in the Microsoft Knowledge Base:

    Q250536 HOWTO: Configure RDS for Windows 2000
    http://support.microsoft.com/support/kb/articles/q250/5/36.asp
  4. Modifying the Msdfmap.ini file

    The Msdfmap.ini file on the Web server is used to allow data connections to the server. You can modify this file in a variety of ways to allow any data connection or limit connections to a particular database. On the Web server, open the Msdfmap.ini file in Notepad. This file is found in the \WINNT folder.

    In the [connect default] section, change: Access=NoAccess to read: Access=ReadWrite This allows read and write connections to all data connections on the server.

    In the [sql default] section, change: sql=" " to: ;sql=" " This allows for any SQL statement against any data source on the Web server.

    Save and close the Msdfmap.ini file.

  5. Where to Place the Database and Data Access Pages

    Although not a requirement, storing the database on the Web server with the data access pages is the simplest means of deployment. For security purposes, however, place the database in a folder other than the Web site folder. By default, when installing IIS, this is C:\Inetpub\wwwroot. Because the wwwroot folder is typically open to the public, a malicious user could potentially download the database. For added security, place the database in a different folder on the Web server, such as C:\Inetpub.

  6. Modifying the Data Access Page Because data access pages look on the client side to find the data source, routine deployment of a page would not work over the Internet. Instead, you must configure 3-tier data access using the UseRemoteProvider property of the page. While certain steps of this article may be modified, depending upon the security settings you choose, this section must be completed to successfully deploy 3-tier data access pages. Open the data access page in Design view.

    ~If the property sheet is not displayed, on the View menu, click Properties

    ~On the Edit menu, click Select Page .

    ~On the Data tab, change the UseRemoteProvider property to True .

    ~If the field list is not displayed, on the View menu, click Field List .

    ~Right-click the name of the database at the top of the field list, and then click Connection .

    ~Verify that the connection string is pointing to a path that can be seen from the Web server.

    ~Click OK to close the Data Link Properties dialog box.

    ~Close and save the page.

    IMPORTANT : If you are not hosting the Web site, you may not be able to save changes to data access pages that are opened directly in Access 2000 by using the URL for the page. Instead, open the page in Microsoft FrontPage 2000, and edit the connection string manually as follows. Be sure to change the UseRemoteProvider property to True in Access before you open the page in FrontPage 2000. Start FrontPage 2000, and then click Open on the File menu.

    ~Type the URL for your data access page on the Web server, and then click OK .

    ~Click the HTML tab at the lower-right side of the screen.

    ~On the Edit menu, click Find .

    ~Type ConnectionString , and then click Find Next .

    ~Edit the Data Source portion of the connection string to the path of the database on the Web server.

    Once again Matthew if you want to successfully deploy data Access Pages, you really need to follow all the steps from the article, step by step.

    I hope that this is helpful.

    Thank you for working with Microsoft Developer Support for Access,

    Jeff MacLeod, MCP Microsoft Technical Support

    Of course, this posting wouldn&#146;t be complete without a nice, juicy disclaimer from our lawyers: This posting is provided &#147;AS IS&#148; with no warranties, and confers no rights. You assume all risk for your use. © 2001 Microsoft Corporation. All rights reserved.


Data access pages are a pretty straight-forward way to create data-bound web pages using Access 2000 or 2002. They use OLE DB to connect to data in an Access or SQL Server database. They are pretty easy to create, but there do require the Office Web Components and IE 5.0 or later.

> Is it possible to store an access MDB on a server > somewhere, and using a data access page (say on my home > pc) gain access to those tables to view data from > home...If so, that is great, and is it the same in 2000 > and 2002? Thanks.... This could be great!

Yes. This would likely require that you deploy your pages for three-tier data access. There are many steps to do this, but they would be the same for Access 2000 or 2002. For more information, have a look at the following:

ID: Q264080
ACC2000: How to Deploy Data Access Pages over the Internet http://support.microsoft.com/support/kb/Articles/q264/0/80.asp

ID: Q253754
ACC2000: Deploy Pages on Internet/intranet White Paper on MSDN http://support.microsoft.com/support/kb/Articles/q253/7/54.asp

ID: Q291783
ACC2002: How to Deploy Data Access Pages over the Internet http://support.microsoft.com/support/kb/Articles/q291/7/83.asp

Thank you for using Microsoft newsgroups!

Sincerely,

Rob Cooper, MCP
Microsoft Access Technical Support

This posting is provided &#147;AS IS&#148; with no warranties, and confers no rights. You assume all risk for your use. © 2001 Microsoft Corporation. All rights reserved.