I have a web project and 2 class libraries that each contain EntityDiagram.rlinq model.
I reference these libraries from my web project to read and write data etc.
When I run my web project on my local development machine everything is working ok.
When I upload my project to a production server I end up with this error:
Could not load file or assembly 'Telerik.OpenAccess, Version=2012.3.1012.1, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342' or one of its dependencies. The system cannot find the file specified.
and the page will not load.
I have tried referenceing the the orm libs and ftp'ing them to the binaries folder on the server but I still get the same error.
Is there something that I am doing wrong or missing?
6 Answers, 1 is accepted
My best guess about the problem causing the error is that the Telerik.OpenAccess.dll file is not deployed to the server.
The solution is to set the Copy Local property of the assembly reference in Visual Studio to true (how to do it is described in this knowledge base article). In addition, make sure that the following files are available in the bin directory of your project:
In this documentation article you can find more information about the deployment process of the OpenAccess assemblies.
That should be enough for the OpenAccess to run on the server but if you still experience the same error, you can copy / paste the file in the Global Assembly Cache (GAC) folder on the server. However, I do not recommend you this approach.
I hope that works for you. I am looking forward to your feedback.
the Telerik team
Could not load file or assembly 'Telerik.OpenAccess, Version=2012.3.1012.1, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.FileLoadException: Could not load file or assembly 'Telerik.OpenAccess, Version=2012.3.1012.1, Culture=neutral, PublicKeyToken=7ce17eeaf1d59342' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)
I also tried to change web.config with below, but no affect.
<assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
<assemblyIdentity name="Telerik.OpenAccess" publicKeyToken="7ce17eeaf1d59342"/>
<bindingRedirect oldVersion="2011.2.713.3" newVersion="2012.3.1012.1"/>
I manually copied, Telerik.OpenAccess.dll, Config,dll, Runtime.dll, 35.Exentions.dll, 40.Extentions.dll,
No affect at all.
I installed latest version of OpenAccess ORM package in the server, same problem.
However, when I refresh the browser once again, this error disappeared. But whenever reach my page again from different page, this error happened again repeatedly.
What should I do? (Very high priority). About to live now.... Please help.
Thanks for the info.
The information you provided was very helpfull and helped me resolve the problem. Once I got the "Could not load file assembly" resolved I could then change my connection strings.
I had to add some other files (see below) and set the Copy Local properties to True (I added the Config.dll and the Runtime.dll).
This is explained here:
as well as this knowledge base article
all referenced by Doroteya.
Thanks again for your help.
How to find Telerik.OpenAccess.Config.dll .We are using Q2 2012.
Our project is running successfully but in server showing Open access
error at the first instance(startpage) of the project.In some systems
showing this error and i am trying to add the
Telerik.OpenAccess.Config.dl but unable to find the reference.
Generally, the Telerik.OpenAccess.Config.dll file can be found in the folder where Telerik Data Access is installed under the bin folder (~Data Access Installation Folder/bin/).
In case the error you experience persists after you deploy the config assembly, do not hesitate to get back to us.