2011-02-15 15 views
2

私のサーバーにasp.net 4.0アプリケーションを公開しようとすると、このエラーが発生します。私はエンティティフレームワークとmysqlをデータベースとして使用しています。どんな助けでも大歓迎です。ありがとう!あなたは、サーバー上のMySQLのデータプロバイダをインストールするか、web.configファイルに追加する必要がありますエンティティフレームワークエラー - 要求された.Net Frameworkデータプロバイダを見つけることができません。インストールされていない可能性があります

Unable to find the requested .Net Framework Data Provider. It may not be installed. 

[ArgumentException: Unable to find the requested .Net Framework Data Provider. It may not be installed.] 
    System.Data.EntityClient.EntityConnection.GetFactory(String providerString) +251 

[ArgumentException: The specified store provider cannot be found in the configuration, or is not valid.] 
    System.Data.EntityClient.EntityConnection.GetFactory(String providerString) +10983191 
    System.Data.EntityClient.EntityConnection.ChangeConnectionString(String newConnectionString) +641 
    System.Data.Objects.ObjectContext.CreateEntityConnection(String connectionString) +67 
    Satelite.Dados.sateliteEntities..ctor() in E:\Sites_dotNet4.0\satelite\trunk\Sistema\Dados\Satelite.Designer.cs:64 

[TargetInvocationException: Exception has been thrown by the target of an invocation.] 
    System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0 
    System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache) +117 
    System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean skipCheckThis, Boolean fillCache) +247 
    System.Activator.CreateInstance(Type type, Boolean nonPublic) +106 
    System.Web.DynamicData.<>c__DisplayClass2.<RegisterContext>b__1() +15 
    System.Web.DynamicData.MetaModel.RegisterContext(Func`1 contextFactory, ContextConfiguration configuration) +483 
    Satelite.Global.RegisterRoutes(RouteCollection routes) in E:\Sites_dotNet4.0\satelite\trunk\Sistema\Satelite\Global.asax.cs:35 

[HttpException (0x80004005): Exception has been thrown by the target of an invocation.] 
    System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +3988565 
    System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +191 
    System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +325 
    System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +407 
    System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +375 

[HttpException (0x80004005): Exception has been thrown by the target of an invocation.] 
    System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +11529072 
    System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +141 
    System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +4784373 

答えて

1

このような何か:

<system.data> 
    <DbProviderFactories> 
     <remove invariant="System.Data.SQLite" /> 
     <add name="SQLite Data Provider" invariant="System.Data.SQLite" description=".Net Framework Data Provider for SQLite" type="System.Data.SQLite.SQLiteFactory, System.Data.SQLite, Version=1.0.66.0, Culture=neutral, PublicKeyToken=db937bc2d44ff139" /> 
    </DbProviderFactories> 
    </system.data> 

それSQLiteのデータベースのためのプロバイダを追加するサンプル。 次に、MySQLデータプロバイダのDllがサーバのBinフォルダにあることを確認する必要があります。

0

データプロバイダが必要です。私はOracle 11gで同じ問題を抱えていました。私はいくつかのWebアプリケーションを再起動する必要があったが、最初のショットで動作しませんでした。

関連する問題