Unable to Connect to Database on IIS

access on iis , asp.net iis , hosting on iis Toronto, Canada
  • 11 years ago


    I have hosted my web application(asp.net with C#) on IIS on my system. The database is in access. When I try to login, it doesn't connect to the database. My Connection String is in web.config and database is in App_Data.

    After googling, I got some solutions which suggested to change the connection string through code. The main idea is to get the physical path of the database. but still it doesn't work.

    Any suggestion?



  • 11 years ago

    Hi, can you share with us on the error message that you get from accessing the database. Suggest to use Sever.MapPath that refer to database in AppData. Eg. Server.MapPath("../db.mdb"). And if this is not working, can you share with us the information of the path of your application and AppData?

Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Walking on water and developing software from a specification are easy if both are frozen.” - Edward V Berard