Remote Access Database ado.net connectionstring

G

Guest

Hi All,

I have an asp.net app connecting to an Access database. I
can connect to a local copy of the database using this
conncetionstring :
dbconn = new OleDbConnectio
(@"Provider=Microsoft.Jet.OLEDB.4.0;data
source=C:\MyDB.mdb");

this works fine - afer giving the local asp.net account
permission on this database.

Can anyone tell me how to connect to an access database
on a remote server?

Cheers,
Richard
 
M

Miha Markic [MVP C#]

Hi,

I think that aspnet windows account has no privileges to access network.
You might run your app under another account or give aspnet account enough
privileges.
Both options will increase security risk.
 
R

rbutch

the way i have to do it here, is to map that drive, or server.
and include that info in the connection string.
i do that quite a bit.
i work in downtown houston, but the remote server is 18miles away
at the airport.
hopefully, that same thing will work for you.
thanks
rik


**********************************************************************
Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
Comprehensive, categorised, searchable collection of links to ASP & ASP.NET resources...
 
P

Paul Clement

¤ Hi All,
¤
¤ I have an asp.net app connecting to an Access database. I
¤ can connect to a local copy of the database using this
¤ conncetionstring :
¤ dbconn = new OleDbConnectio
¤ (@"Provider=Microsoft.Jet.OLEDB.4.0;data
¤ source=C:\MyDB.mdb");
¤
¤ this works fine - afer giving the local asp.net account
¤ permission on this database.
¤
¤ Can anyone tell me how to connect to an access database
¤ on a remote server?

That depends upon your network configuration. If you can access it via a network
share or UNC path this will require impersonation *and* delegation, which will
then depend upon the web app security mechanism you are using.

http://msdn.microsoft.com/library/d...y/en-us/vsent7/html/vxconaspnetdelegation.asp

If the database is only available via http then it becomes a much more
complicated problem.


Paul ~~~ (e-mail address removed)
Microsoft MVP (Visual Basic)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top