|
I'm getting a server error in my ASP.NET 2.0 application when trying to access an Access database. This is the error message: "Access to path to the database was denied. The location does not exist or is not accessible because of security settings".
I'm using a GridView control with AccessDataSource. The Access database is on Windows Server 2003 with IIS 6.0, ASP.NET 2.0, and SharePoint 3.0
This is the ASP.NET code:
<asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="~/App_Data/UFR_db.mdb" SelectCommand="SELECT * FROM [Projects] WHERE ([POCID] = ?)" OldValuesParameterFormatString="original_{0}"> <SelectParameters> <asp:SessionParameter Name="POCID" SessionField="User_ID" Type="Int32" /> </SelectParameters> </asp:AccessDataSource>
I've tried each without success, 1. changing the DataFile to the complete path and every other variation 2. changing the "/" in the path to "\" 3. giving folder and file permissions to a. NETWORK SERVICE b. ASPNET c. Internet guest account d. IIS Process Account e. Everyone
I also tried changing the Enable/Disable anonymous access method and turn on/off Integrated Windows authentication in the Web Site properties. None of these fixed the error.
Anyone have a solution to this problem? |