views:

20

answers:

0

I have an ASP.NET application written in C# and hosted on IIS6 Win2k3. This web application connects through code to an Access 2007 Database which holds Sharepoint lists in tables.

To get an idea of how this works you can go here:

http://sharepoint.microsoft.com/blogs/GetThePoint/Lists/Posts/Post.aspx?ID=68

The issue is when the Access 2007 Database is set to “Working online with Sharepoint” mode my application cannot connect properly and pull records. If I take the database to “Work Offline” mode then my web application has no problems connecting and pulling records from the database.

Here are some connection strings that work fine in “Work Offline” Mode:

string objConnString = "Provider=Microsoft.ACE.OLEDB.12.0 ;Data Source=" + Server.MapPath("~/App_Data/Application.accdb"); // this works offline mode.

string objConnString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + Server.MapPath("~/App_Data/ Application.accdb ") + ";Persist Security Info=True";

In “Working online with Sharepoint” mode the application will just sit and load all day long. Here are some strings I have tried:

string objConnString = "Provider=Microsoft.ACE.OLEDB.12.0 ;Data Source=" + Server.MapPath("~/App_Data/Application.accdb"); 

 //  No credentials are passed so doesn’t work as expected.

string objConnString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + Server.MapPath("~/App_Data/ Application.accdb") + @"User iD=User; Password=Pass ";

//The username and password are identical to the ones prompted by Access 2007 when opening up the database with “Working online with Sharepoint” mode activated.

I have given the even the regular internet user account and asp.net account full control to this Database so that part shouldn’t be an issue. As I said it works in “Work Offline” mode so that confirms this.

This issue seems to be that when the application passes on the username and password to Access 2007 it still isn’t allowing the records to be pulled. When I open the database in Access 2007 I will be prompted for my credentials; I put in the same credentials as I have in the connections strings that don’t work.

I also wondered if it was possible to just save the username and password in Access 2007 itself so that they wouldn’t be asked for at all.

Anybody have any ideas or connection strings that might make this thing work?

Thanks in advance.