Connecting to an Access DB on another server

cashdesk

New member
Local time
Today, 06:45
Joined
Jan 5, 2010
Messages
6
Hi guys,

I am new to Access (came into programming a few years ago and went straight to SQL - don't hold it against me).

I have an Access DB on a remote server which serves as the datasource for my website. The website is hosted on server A and I debug and create the website on server B.

When I run the application from server B (Using Visual Studio .NET 2008) it works fine. If I open IE and enter the URL (effectively launching it from server A) it falls over with the message:

The Microsoft Jet database engine cannot open the file '\\servername\staff\database\myDB.mdb'. It is already opened exclusively by another user, or you need permission to view its data.

Due to the fact that it works from one server but not the other, is there anything that needs to be installed on server A to make it able to talk to an Access DB on another server?

Oh, and if you are interested in why I chose Access if I only know SQL, it is something I have just inherited at work.

Additional: on server B I have looked in Component Services under DCOM Config and have the component 'Microsoft Office Access Application'. This is not listed on Server A. Could this be what is missing?
 
Last edited:
Hi

might be way off but does the remote server file have the correct Internet user permissions set for Internet access?

I think it's IEUser or something like that.

I had a very similar problem and when I set the permissions correctly, it worked fine


Regards

nige
 
Thanks Nigel, but I already tried adding the EVERYONE group to the file permissions and gave that group full control. It still only worked when I accessed it from Server B; Server A still didn't work.
 
Hi,

try going into the IIS manager and -

select the file
right click & select properties
select "File Security" tab
click the "edit" button in "Authentication & access control"
tick "Enable anonymous access"
Click Browse
and add IUSR_SERVER as a user

you can also add the same user to a file within your web folder to allow access to the folder or file across the internet.


HTH


Nigel
 
The mdb file is not in the web application folder.

What we had was an ASP web application based on one server (Server C). The administrator has their own page to update the database. We were then tasked with re-writing the pages in ASP.NET and placing them in a new web application on a new server (Server A). Due to the fact that the administrator has to be able to update the database (and the new web page simply displays information from it) we are leaving it on Server C.

So, Website hosted on Server A, database on Server C and my terminal is Server B. B to C is no problem, but A to C is.
 
Hi

then I think your problem lays with the iis settings on server A. In the iis settings, have you set the folder location if the mdb folder on server C as a web or root folder? I think the problem is here.

You can add the folder as a location that enables iis to include the folder as a web location.

Let ne know if the settings are not there and if you don't know how to do it, I'll post some images for you


Regs

nigel
 
Hi Nigel,

I will come out and say it - I don't know how to do that. If you can give me the steps it would be greatly appreciated.

Regards,

Cash
 
One other thing I have noticed.

if I add the following line to the top of the page load:

Response.Write(Context.User.Identity.Name);

and run it from Server B it shows my Active Directory username. If I run it from Server A it shows nothing at all. I have tried setting Identity Impersonate to True in the web.config file but that hasn't helped either.

 
Hi

I don't know anything you said there!! However I do know that iis will display web items linked only via a web folder.

I'll post some screen shots to let you do a check but in the meantime, you could open iis and see if the location of the folder is there. It should be in the left hand pane under websites tab.

Nigel
 
Thanks for your help so far, Nigel, but I have decided to re-write the back end in SQL.
 

Users who are viewing this thread

Back
Top Bottom