Connect to MS Access DB on different server

Ask a Question related to ASP.NET Security, Design and Development.

  1. #1

    Default Connect to MS Access DB on different server

    I am trying to connect to a Microsoft Access database, located on a different
    server. I am using ASP.NET and the code I am using works when run from my
    local IIS, but it does not work when I deploy the project to the web server.
    The database is not on the web server or my local machine. I am currently
    using a DSN, which is setup on both machines through a mapped drive.

    I disabled Anonymous Authentication on the IIS directory and enabled
    "Integrated Windows Authentication". In my web.config settings, I set the
    following:

    <authentication mode="Windows"/>
    <identity impersonate="true"/>

    <authorization>
    <allow users="IS-Users"/>
    <deny users="?"/>
    </authorization>

    Here is the first part of the error I receive:

    Data Retrieval Error. System.Data.Odbc.OdbcException: ERROR [HY024]
    [Microsoft][ODBC Microsoft Access Driver] '(unknown)' is not a valid path.
    Make sure that the path name is spelled correctly and that you are connected
    to the server on which the file resides.

    The security of the web page works correctly, but I don't think it's
    delegating the credentials properly. I thought it would by setting the
    Impersonate property to true.

    I have the option of using OleDB if that is a possible solution. Any ideas
    would be appreciated.

    Thanks,
    Roby2222
    Roby2222 Guest

  2. Similar Questions and Discussions

    1. Connect to a MS Access or MS SQL Server database
      How can i connect and perform select, insert, update and delete commands to an Access or SQL Server database without using ODBC DSNs?
    2. I have a flash movie running a http server but it needsto connect to another server in https.
      I have a flash movie running a http server but it needs to connect to another server in https. I am having problems when trying to open the url in...
    3. I have a flash movie running a http server but it needsto connect to another server in https
      I have a flash movie running a http server but it needs to connect to another server in https. I am having problems when trying to open the url in...
    4. could not connect to SMTP server from sql server using JMail, xp_smtp_sendmail or sp_send_cdosysmail
      I am trying to send an email message from sql server using the JMail component from dimac.net. I was able to use the stored procudure sp_send_mail...
    5. How to use “RDS.Connect” to connect to a MS Access database?
      The example I am working from uses the following code which does not work: RDS.Connect = "Provider='sqloledb';Integrated Security='SSPI';Initial ...
  3. #2

    Default RE: Connect to MS Access DB on different server

    Hello Roby,

    Is the account "IS-Users" a local user or a domain user? If you logon as
    this user and access the web app, it will use this account to permission to
    open the access database file. If it is local account, we need to create a
    same account with on the remote server; if it is a domain account, it
    should be enough pemission on the remote server. For more info about
    ASP.NET impersonate, you may refer to this article:

    INFO: Implementing Impersonation in an ASP.NET Application
    [url]http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q306158[/url]

    Luke

    [MSFT] Guest

  4. #3

    Default RE: Connect to MS Access DB on different server

    Thanks for the reply. The "IS-Users" account is a domain group, and it has
    permissions to the folder where the Access database resides. Could it be
    this user does not have visibility to the mapped drive on the web server?

    Thanks,
    Roby2222

    "[MSFT]" wrote:
    > Hello Roby,
    >
    > Is the account "IS-Users" a local user or a domain user? If you logon as
    > this user and access the web app, it will use this account to permission to
    > open the access database file. If it is local account, we need to create a
    > same account with on the remote server; if it is a domain account, it
    > should be enough pemission on the remote server. For more info about
    > ASP.NET impersonate, you may refer to this article:
    >
    > INFO: Implementing Impersonation in an ASP.NET Application
    > [url]http://support.microsoft.com/default.aspx?scid=KB;EN-US;Q306158[/url]
    >
    > Luke
    >
    >
    Roby2222 Guest

  5. #4

    Default Re: Connect to MS Access DB on different server

    On Tue, 2 Nov 2004 06:26:01 -0800, "Roby2222" <roby2222@community.nospam> wrote:

    ¤ Thanks for the reply. The "IS-Users" account is a domain group, and it has
    ¤ permissions to the folder where the Access database resides. Could it be
    ¤ this user does not have visibility to the mapped drive on the web server?
    ¤

    That would be my guess. Can you use an UNC path instead?


    Paul ~~~ [email]pclement@ameritech.net[/email]
    Microsoft MVP (Visual Basic)
    Paul Clement Guest

  6. #5

    Default Re: Connect to MS Access DB on different server

    I don't think you can use UNC with DSNs, but I'll give it a try with OleDB.

    Thanks,
    Roby2222

    "Paul Clement" wrote:
    > On Tue, 2 Nov 2004 06:26:01 -0800, "Roby2222" <roby2222@community.nospam> wrote:
    >
    > ¤ Thanks for the reply. The "IS-Users" account is a domain group, and it has
    > ¤ permissions to the folder where the Access database resides. Could it be
    > ¤ this user does not have visibility to the mapped drive on the web server?
    > ¤
    >
    > That would be my guess. Can you use an UNC path instead?
    >
    >
    > Paul ~~~ [email]pclement@ameritech.net[/email]
    > Microsoft MVP (Visual Basic)
    >
    Roby2222 Guest

  7. #6

    Default Re: Connect to MS Access DB on different server

    On Tue, 2 Nov 2004 06:50:03 -0800, "Roby2222" <roby2222@community.nospam> wrote:

    ¤ I don't think you can use UNC with DSNs, but I'll give it a try with OleDB.
    ¤

    If you're using a DSN that means you're using the MS Access ODBC driver. I would highly recommend
    you use a DSN-less connection with the Jet OLEDB driver instead.

    [url]http://www.able-consulting.com/MDAC/ADO/Connection/OLEDB_Providers.htm#OLEDBProviderForMicrosoftJet[/url]


    Paul ~~~ [email]pclement@ameritech.net[/email]
    Microsoft MVP (Visual Basic)
    Paul Clement Guest

  8. #7

    Default RE: Connect to MS Access DB on different server

    Hello,

    Since it is a user group, I think you may use Roles instead of Users. For
    example:

    <authorization>
    <deny users="*"/>
    <allow roles="IS-Users" />
    </authorization>


    Luke

    [MSFT] Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139