locked
MapPath to talk to MDB database which is on the other server? RRS feed

  • Question

  • User886888583 posted

    hi All

    i am developing one web in asp.net application which talks with mdb database on the server other than the server where the application is hosted.

     say i am developed one app. and hosted on server a, and this app. has to talk with mdb access database which is on the server b.

     how to right connection string?

     

    the following is not working

    "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Request.MapPath(ConfigurationManager.AppSettings("ConnectionString"))     where  ConnectionString= "\\servername\foldername\*.mdb"

     how to accomplish above situation?

     waiting for reply

    Regards

    Oersla Afroze Ahmed

    Thursday, October 23, 2008 11:30 AM

Answers

  • User-821857111 posted

    Is the server that the mdb file is on within the same network where the web app is running?  Or is it completely remote?  Either way, you will likely get rubbish performance and problems.  Access just simply is not designed for this kind of thing.  Upgrade to SQL Server Express, or if you can't, try these tips: http://databases.aspfaq.com/database/why-can-t-i-access-a-database-or-text-file-on-another-server.html.  Bear in mind that the user account for ASP.NET is NETWORK SERVICE in Win 2k3, not the IUSR_machinename account.

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, October 24, 2008 2:25 AM

All replies

  • User-442214108 posted

    So, is the MDB file on another server, separate from the server that the webserver is located?

    Thursday, October 23, 2008 12:33 PM
  • User886888583 posted

    yes

    Thursday, October 23, 2008 12:34 PM
  • User2143493965 posted

     That may present some type of security issues.Try creating a virtual directory on your webserver that points to that folder  as a share.

     You should be able to  map a path, then.

     i.e.  Server.MapPath("//localhost/virtualdir/")

     Unfortunately, I don't have time to test this suggestion.

     

    Thursday, October 23, 2008 4:40 PM
  • User-821857111 posted

    Is the server that the mdb file is on within the same network where the web app is running?  Or is it completely remote?  Either way, you will likely get rubbish performance and problems.  Access just simply is not designed for this kind of thing.  Upgrade to SQL Server Express, or if you can't, try these tips: http://databases.aspfaq.com/database/why-can-t-i-access-a-database-or-text-file-on-another-server.html.  Bear in mind that the user account for ASP.NET is NETWORK SERVICE in Win 2k3, not the IUSR_machinename account.

     

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, October 24, 2008 2:25 AM