entityframework架构不是有效的异常

7fyelxc5  于 2021-06-18  发布在  Mysql
关注(0)|答案(0)|浏览(273)

尝试在生产环境中运行代码时,出现以下异常:
服务器在处理请求时遇到错误。异常消息为“指定的架构无效”。错误:(0,0):错误0175:具有固定名称“mysql.data.mysqlclient”的ado.net提供程序未在计算机或应用程序配置文件中注册,或者无法加载。有关详细信息,请参见内部异常。有关详细信息,请参阅服务器日志。异常堆栈跟踪是:在system.data.entity.core.metadata.edm.storeitemcollection.loader.throwonnonwarningerrors()在system.data.entity.core.metadata.edm.storeitemcollection.loader.loadeItems(ienumerable 1 xmlReaders, IEnumerable 1 sourcefilepaths)位于system.data.entity.core.metadata.edm.storeitemcollection.init(ienumerable) 1 xmlReaders, IEnumerable system.data.entity.core.metadata.edm.storeitemcollection..ctor(ienumerable)中的1个文件路径、boolean throwonerror、idbdependencyresolver resolver、dbprovidermanifest和providermanifest、string和ProviderVariantName、string和providermanifesttoken、memoizer'2和CachedTypeFunction 1 xmlReaders) at System.Data.Entity.Utilities.XDocumentExtensions.GetStorageMappingItemCollection(XDocument model, DbProviderInfo& providerInfo) at System.Data.Entity.Migrations.Infrastructure.EdmModelDiffer.Diff(XDocument sourceModel, XDocument targetModel, Lazy 1 modificationcommandtreegenerator,migrationsqlgenerator migrationsqlgenerator,string sourcemodelversion,string targetmodelversion),位于system.data.entity.internalcontext.modelmatches(versionedmodel model),位于system.data.entity.internalcontext.compatiblewithmodel(布尔ThrowFnometadata,databaseexistencestate existencestate)位于rawct.pss.webservices.database.sql.psscontext..ctor(),位于e:\onedrive\projects\pss\rawct.pss.webservices\rawct.pss.webservices\database\sql\psscontext.cs:rawct.pss.webservices.controllers.accountcontroller.createaccount(int32 payrollid,字符串username,字符串password,字符串firstname,字符串lastname,字符串phonenumber,boolean approved,boolean joblog,boolean photoapp)在e:\onedrive\projects\pss\rawct.pss.webservices\rawct.pss.webservices\controllers\accountcontroller.cs:rawct.pss.webservices.account.newaccount的第35行(字符串payrollid,字符串username,字符串password,字符串firstname,字符串lastname,字符串phonenumber,字符串approved,字符串joblog,字符串photoapp)位于e:\onedrive\projects\pss\rawct.pss.webservices\rawct.pss.webservices\account.svc.cs:system.servicemodel.dispatcher.syncmethodinvoker.invoke(object instance,object[]inputs)的syncinvokenewaccount(object,object[],object[])的第58行,位于system.servicemodel.dispatcher.dispatcher.DispatcheOperationRuntime.InvokeBigin(messagerpc&rpc)的system.servicemodel.dispatcher.ImmutableDispatcheRuntime.processmessage5(messagerpc&rpc)的system.servicemodel.dispatcher.ImmutableDispatcheRuntime.processmessage11(messagerpc&rpc)的对象[]和输出system.servicemodel.dispatcher.messagerpc.process(布尔IsoOperationContextSet)
问题是我没有使用mysql的这个项目在所有只有mssql,所以我不知道它是从哪里得到我?这在测试服务器上运行良好。这是我的web.config

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>

    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
  </configSections>
  <system.serviceModel>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
    <services>
      <service behaviorConfiguration="ServiceBehaviour" name="RAWCT.PSS.WebServices.Account">
        <endpoint address="" behaviorConfiguration="web" binding="webHttpBinding" name="AccountService" contract="RAWCT.PSS.WebServices.Interfaces.IAccount" />
      </service>
      <service behaviorConfiguration="ServiceBehaviour" name="RAWCT.PSS.WebServices.JobLogs">
        <endpoint address="" behaviorConfiguration="web" binding="webHttpBinding" name="JobLogsService" contract="RAWCT.PSS.WebServices.Interfaces.IJobLogs" />
      </service>
      <service behaviorConfiguration="ServiceBehaviour" name="RAWCT.PSS.WebServices.JobSite">
        <endpoint address="" behaviorConfiguration="web" binding="webHttpBinding" name="JobSiteService" contract="RAWCT.PSS.WebServices.Interfaces.IJobSite" />
      </service>
      <service behaviorConfiguration="ServiceBehaviour" name="RAWCT.PSS.WebServices.TimeClock">
        <endpoint address="" behaviorConfiguration="web" binding="webHttpBinding" name="TimeClockService" contract="RAWCT.PSS.WebServices.Interfaces.ITimeClock" />
      </service>
    </services>
    <behaviors>
      <endpointBehaviors>
        <behavior name="web">
          <webHttp />
        </behavior>
      </endpointBehaviors>
      <serviceBehaviors>
        <behavior name="ServiceBehaviour">
          <serviceMetadata httpGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
        <behavior name="">
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
          <serviceDebug includeExceptionDetailInFaults="true" />
        </behavior>
      </serviceBehaviors>
    </behaviors>
  </system.serviceModel>
  <system.web>
    <compilation debug="true" targetFramework="4.7" />
    <customErrors mode="Off" />
  </system.web>
  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework" />
    <providers>
      <provider invariantName="System.Data.SqlClient" type="System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer" />
    </providers>
  </entityFramework>
  <system.data>
    <DbProviderFactories>
      <remove invariant="MySql.Data.MySqlClient" />
    </DbProviderFactories>
  </system.data>
  <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
        <bindingRedirect oldVersion="1.0.0.0-4.5.0.0" newVersion="11.0.0.0" />
      </dependentAssembly>
    </assemblyBinding>
  </runtime>
</configuration>

任何帮助都将不胜感激。

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题