Error when running ASP.NET site “The Microsoft Office Access database engine cannot open or write to the file '\\server\mydb.accdb'… ”
I've read many questions about that problem but i still can't solve my problem. When I run my website on localhost everything is working. The problem happens when I run my site on SQL Server 2008. I've got an error:
"The Microsoft Office Access database engine cannot open or write to the file '\server\MY_DB.accdb'. It is already opened exclusively by another user, or you need permission to view and write its data."
In my Default.aspx file i have that line:
<asp:AccessDataSource ID="AccessDataSource2" runat="server"
SelectCommand="SELECT * FROM [INOWACJE_REJESTR]"
DataFile="\\tfd054upxe\it\inowacja_dbab.accdb"
DataSourceMode="DataSet"></asp:AccessDataSource>
I've got permission/rights to this database. On localhost works fine and site shows data from database and there is no error. The problem is when i try to receive data on SQL Server 2008. I added ConnectionString in IIS it's something like that:
I also added connection string in my Web.config file:
<connectionStrings>
<add name="myConnectionString"
connectionString="Provider=Microsoft.ACE.OLEDB.12.0;
Data Source=\\tfd054upxe\it\INOWACJA_DB.accdb"
providerName="System.Data.OleDb" />
</connectionStrings>
Can somebody help me? Thanks in advance!