2

I get this error when I try to publish a asp.net 4.0 application on my server. I am using entity framework and mysql as the database. Any help will be much appreciated. Thanks !

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
asked Feb 15, 2011 at 13:55

2 Answers 2

1

You should install mysql data provider on server or add in web.config something like this:

<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>

It sample of adding provider for SQLite database. Then you should check that MySQL data provider Dll is in Bin folder on server.

answered Feb 15, 2011 at 14:39
0

You simply need the data provider. I had the same problem with Oracle 11g and after installing their data provider it worked. Didn't work on the first shot though I had to restart the web app a few times.

answered Jun 6, 2014 at 13:07

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.