sql server - Specified store provider cannot be found in the configuration -


when publish asp.net mvc 4, ef 5.0, code-first project test or production environment following exception occurs:

(error 0175: specified store provider cannot found in configuration, or not valid.)

    [metadataexception: das angegebene schema ist ungültig. fehler:  (0,0) : fehler 0175: der angegebene speicheranbieter kann nicht in der konfiguration gefunden werden oder ist ungültig.]    system.data.metadata.edm.loader.throwonnonwarningerrors() +57    system.data.metadata.edm.storeitemcollection.init(ienumerable`1 xmlreaders, ienumerable`1 filepaths, boolean throwonerror, dbprovidermanifest& providermanifest, dbproviderfactory& providerfactory, string& providermanifesttoken, memoizer`2& cachedctypefunction) +206    system.data.metadata.edm.storeitemcollection..ctor(ienumerable`1 xmlreaders) +368    system.data.entity.migrations.extensions.xdocumentextensions.getstoreitemcollection(xdocument model, dbproviderinfo& providerinfo) +361    system.data.entity.migrations.infrastructure.edmmodeldiffer.diff(xdocument sourcemodel, xdocument targetmodel, string connectionstring) +72    system.data.entity.migrations.dbmigrator.ismodeloutofdate(xdocument model, dbmigration lastmigration) +194    system.data.entity.migrations.dbmigrator.upgrade(ienumerable`1 pendingmigrations, string targetmigrationid, string lastmigrationid) +328    system.data.entity.migratedatabasetolatestversion`2.initializedatabase(tcontext context) +150    system.data.entity.internal.internalcontext.performinitializationaction(action action) +66 

the database on sql server created, , tables in database.

on local dev environment working fine. locally installed same ms sql express 2008 r2 version on test/production. , locally working.

as read on other same error (mostly mysql database), error fixed including binaries. mssql there no special binaries include (i think). , database/tables created, access sql server should fine.

here web.config production/test:

<configuration>   <configsections>     <section name="entityframework" type="system.data.entity.internal.configfile.entityframeworksection, entityframework, version=5.0.0.0, culture=neutral, publickeytoken=b77a5c561934e089" requirepermission="false" />   </configsections>   <connectionstrings>     <add name="nameofcontext" connectionstring="server=servername\mssql;database=databasename;user id=username;password=password" providername="system.data.sqlclient" />   </connectionstrings>   <appsettings>     <add key="webpages:version" value="2.0.0.0" />     <add key="webpages:enabled" value="false" />     <add key="preserveloginurl" value="true" />     <add key="clientvalidationenabled" value="true" />     <add key="unobtrusivejavascriptenabled" value="true" />   </appsettings> ...   <entityframework>     <contexts>       <context type="nameofcontext, application name">         <databaseinitializer type="system.data.entity.migratedatabasetolatestversion`2[[nameofcontext, application name], [name_app.migrations.configuration, application name]], entityframework, publickeytoken=b77a5c561934e089">           <parameters>             <parameter value="nameofcontent" />           </parameters>         </databaseinitializer>       </context>     </contexts>   </entityframework> 

i have "solved" problem: created new project , copied code new project, problem no longer appeared. maybe problem auto-migration. altough run 'update-database -targetmigration:0' , recreate migrations.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -