connection strings for ms-access membership provider

Discussion in 'ASP.NET / ASP.NET Core' started by elikater, May 1, 2012.

  1. I am deploying a website that has two ms-access databases, one that contains membership provider data and the other contains user data.
    My connection string on my machine works perfectly, however, naturally, it will not work when I try to use the same string on the server.

    Talking to support to give me the details of how should I reference the folder where my database is, I was surprised to learn from them that such question should be posted to this forum. Can anyone help please in showing me what should I use for a connection string? Here's what I have on my machine:


    <connectionStrings>
    <add name="LocalAccessDatabase" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source='D:/dev/App_data/ASPNetDB.mdb'" providerName="System.Data.OleDb"/>
    <add name="dbConn" connectionString="Provider=Microsoft.Jet.OLEDB.4.0;Data Source='D:/_database/dbInfo.mdb'" providerName="System.Data.OleDb" />
    </connectionStrings>
     
  2. all web pages on the root directory are displaying fine but any web pages inside a folder such as admin receive the error below. I have checked the roles, users, and access privileges and they are all fine, and they all work fine on my computer.

    Server Error in '/' Application.

    Access is denied.

    Description: An error occurred while accessing the resources required to serve this request. The server may not be configured for access to the requested URL.

    Error message 401.2.: Unauthorized: Logon failed due to server configuration. Verify that you have permission to view this directory or page based on the credentials you supplied and the authentication methods enabled on the Web server. Contact the Web server's administrator for additional assistance.

    Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.272[/COLOR][/B][/B]
     
  3. RayH

    RayH DiscountASP.NET Lackey DiscountASP.NET Staff

  4. Thank you. I now have it working. I get the home page to display, then I click on a link from the home page to take me to a login page found on a folder on the root directory. however, when I enter username and password in order to query the ASPNetDB.mdb database, I get the following error: AccessFile is not valid:
     
  5. RayH

    RayH DiscountASP.NET Lackey DiscountASP.NET Staff

Share This Page