An MDB database is just another file on the hard disk, so it will encounter the same file access permission issues as other files. What the question means is that in order to read (and write, as you'll see later in this book) a database file, the application running in the page must have the relevant permissions to read (and write) in Windows write) to the file.
The reason the pages in the examples so far "just work" is that you are using the VWD Web Server, a lightweight program that runs under the identity of the user running VWD. That is, the VWD Web Server is running for you, and you have been allowed to read and write the MDB file of the page connection.
However, when running the page under IIS, the situation is a bit more complicated. At this point, the ASP.NET page runs under the identity of a user account with specific permission restrictions. Under IIS 5.1, this account is "ASPNET". Under IIS 6.0 or later, this account is "Network Service" and belongs to a Windows user group called IIS_WPG ("worker process group"). In order to use an Access database under IIS, these accounts must be granted read permission and, as appropriate, write permission to the directory containing the MDB file.
To help you create these permissions, VWD will take additional steps and automatically grant this permission to the ASPNET or Network Service account when the database is in the App_Data subdirectory under the application root directory. If you are using VWD to develop pages on your machine, this particular directory will always be granted the correct permissions. The App_Data directory has additional benefits, such as preventing any files within it from responding to the requesting web browser. This means that by placing the MDB files in the application's local App_Data directory, you can protect these files from being accidentally or intentionally downloaded by the application's clients. Therefore, we highly recommend saving the MDB file to the App_Data directory.
If you must save the MDB file elsewhere, or you need to manually specify permissions for the database directory (for example, you are working on a remote Web server), you can use Windows to configure permissions for the ASP.NET and/or Network Service account .
If you need to manually set the permission, please follow the steps below:
(1) Use Windows Explorer to browse the folder where the MDB file is located.
(2) Right-click the directory and select Properties.
(3) Select the Security tab and click the Add button.
(4) Add a local ASP.NET account (IIS 5.1) or IIS_WPG group (IIS 6).
(5) Click OK; then apply the relevant permissions to this directory.
For more information, see the white paper titled "Running ASP.NET 1.1 and IIS 6.0," available from the ASP.NET Web site: http://www.asp.net/faq/AspNetAndIIS6.aspx This white paper.