Click here to Skip to main content
Click here to Skip to main content

Entity Framework: ProviderManifestToken not valid

, 8 Jan 2013
Rate this:
Please Sign up or sign in to vote.
This tip attempts to solve ProviderManifestToken issue

Introduction

Recently I've been working with Oracle database and Entity Framework.

Testing my ASP.NET MVC application was going fine until I had to deploy it to a remote server. When launching the application an unexpected error came out: 

System.Data.ProviderIncompatibleException: The provider did not return a ProviderManifest instance.

System.ArgumentException: ProviderManifestToken not valid! 

Why did this fail on a different machine? I was sure that Oracle was installed but I didn't thought about the version. 

It turns out, in fact, that different versions of Oracle database need different ProviderManifestTokens.  

Using the code

When I figured out the problem I had just to switch this line in the .edmx file: 

<Schema Namespace="foo" Alias="Self" Provider="Oracle.DataAccess.Client" ProviderManifestToken="11.2" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator">

To this:

<Schema Namespace="foo" Alias="Self" Provider="Oracle.DataAccess.Client" ProviderManifestToken="11g" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator">   

Remember always to build after making the change (and to switch back to the previous ProviderManifestToken when developing your application).  

Conclusion 

Never forget to check whether the server and your machine have equal installations of database, etc.

I hope this trick can help somebody out there. Cheers! 

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

as-cii

Italy Italy
No Biography provided

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Mobile
Web03 | 2.8.140721.1 | Last Updated 8 Jan 2013
Article Copyright 2013 by as-cii
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid