Accessing databases on servers other than IIS machinehttp://forums.asp.net/t/495324.aspx/1?Accessing+databases+on+servers+other+than+IIS+machineWed, 10 Mar 2004 09:47:42 -0500495324495324http://forums.asp.net/p/495324/495324.aspx/1?Accessing+databases+on+servers+other+than+IIS+machineAccessing databases on servers other than IIS machine Help - I'm a novice so no laughing..... I have a very simple ASP.NET web app running under XP Pro IIS 5.1 on my PC on our company network I have created a web page that needs to display information from an Access database which is on our main server (a different machine to the one running my IIS). I am using simple Oledb connections/adapters and datasets. When I try and fill my dataset with table data I keep getting the error saying that the database table is opened exclusively by another user or I do not have sufficient priveledges to access the table. The table is not opened exclusively by someone else and I do have the proepr priveledges to access it. The problem is that I am running IIS under the machine account IUS_ I have tried running IIS under my network login which has priveledges but still get the error. I changed the account name in the Directory Security tab on the IIS manager. Am I still doing something wrong ? Or is there a simpler way of getting to the data on a different server from my web page ? Any and all help much appreciated. Cheers Chas. 2004-03-04T13:38:23-05:00495340http://forums.asp.net/p/495324/495340.aspx/1?Re+Accessing+databases+on+servers+other+than+IIS+machineRe: Accessing databases on servers other than IIS machine <a href="http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&amp;PostID=154273">This post</a> discusses the issue in general. ASP.NET uses the user ASPNET, not IUSR_. In order to allow this all to work, you will need to change the ASPNET user so that you manually manage the password, and then create an ASPNET user on the other machine with the same password. Alternately, you could change the user ID that ASP.NET runs under to a domain account with rights on both machines, but this is a bad idea for a number of reasons. Using MSDE might be a great deal easier than sharing an Access database that is on a different machine. 2004-03-04T13:47:57-05:00496677http://forums.asp.net/p/495324/496677.aspx/1?Re+Accessing+databases+on+servers+other+than+IIS+machineRe: Accessing databases on servers other than IIS machine I have set my ASPNET user on the IIS machine to have the same password as the ASPNET account on my database server. Do I also need to change the account that IIS is running under on my IIS server ? When I do this - it always sems to go back to the IUSR_ account. 2004-03-05T13:21:56-05:00496695http://forums.asp.net/p/495324/496695.aspx/1?Re+Accessing+databases+on+servers+other+than+IIS+machineRe: Accessing databases on servers other than IIS machine No, you should not have to. The user context should be ASPNET. 2004-03-05T13:35:07-05:00500448http://forums.asp.net/p/495324/500448.aspx/1?Re+Accessing+databases+on+servers+other+than+IIS+machineRe: Accessing databases on servers other than IIS machine This still gives the error that the database is either opened exclusively by another user or I do not have permissions to access it. I have ASPNET users on my PC and my server. The passwords to both accounts are the same. The ASPNet account has permissions to read/write on both machines. I am running IIS on my PC under ASPNET. Is there anything else I should check? 2004-03-09T13:22:10-05:00501652http://forums.asp.net/p/495324/501652.aspx/1?Re+Accessing+databases+on+servers+other+than+IIS+machineRe: Accessing databases on servers other than IIS machine Douglas - I'm gonna buy your book. Hopefully all my questions will be answered in there. Cheers. Chas. 2004-03-10T08:50:02-05:00