Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6940839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T12:48:18+00:00 2026-05-27T12:48:18+00:00

I have developed a Web Application using ASP.Net with Microsoft Access as database. Now

  • 0

I have developed a Web Application using ASP.Net with Microsoft Access as database. Now i have connected to the database using OleDB connection. The problem is when i give the database source in Connection String Source="C:/WebApp/DB/data.mdb". The connection throws an error stating the path is invalid and there is no such file.

I tried using

Server.MapPath("~/DB/data.mdb") 

which gives the path as “C:/WebApp/DB/data.mdb” but throws the same error

Colud not locate file 'C:/WebApp/DB/data.mdb'

What should be the problem, even though if it works good in loalhost when i publish it to the server using Plesk, it shows the same error stating “C:/inetpub/xyx.com/httpdocs/…” not found

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T12:48:18+00:00Added an answer on May 27, 2026 at 12:48 pm

    Try using the wndows path (backslash rather than forward slash).

    If you are shipping an access database with a web application, you can also investigate putting it in the App_Data folder. Read here for more info.

    A fully worked example is here

    Note that in your current example, if DB is a folder under the web root, anyone could potentially download your database if they know the file name. By default, items stored in App_Data will NOT be served to clients.

    Also note that, usefully, when you store the item in App_Data, your connection string becomes:

    "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\data.mdb;Persist Security Info=False;" 
    

    (plus any user/password details). ASP.Net will resolve the |DataDirectory| path at runtime.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ASP.net 3.5 web application developed in VB.net I am using iTextsharp
I have developed an web application using Asp.net ( .Net Framework 3.0). In this
I have developed a MVC web application with ASP.NET MVC and im just wondering
We have a wonderful ASP.NET MVC 2 web application using MS SQL 2008 and
I have developed a web application in ASP.NET 3.5 and C#. When I deploy
I have developed an asp.net web application containing 40-50 pages. I have implemented logger
I have a web application developed in asp.net 3.5. The application is used in
I have an ASP.NET application that is installed using a Web Deployment Project. I'd
I have a web application developed with ASP.net and C# that is running on
I am working on the web application developed in ASP.Net using C#. Allong with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.