Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Laurence Gillian 600 posts 1219 karma points
    Jun 13, 2016 @ 13:35
    Laurence Gillian
    0

    Website YSOD's on Azure on Startup

    Umbraco 7.4.3
    YSOD's on Azure, but works perfectly with IIS Express.
    Have double checked the /bin directory is identical.
    Have tried deleting everything on Azure and doing a fresh deployment.

    When running locally it works connected to the same database.

    Any ideas!

     Exception type: TargetInvocationException
    
        Exception message: Exception has been thrown by the target of an invocation.
       at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
       at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
       at Owin.Loader.DefaultLoader.<>c__DisplayClass12.<MakeDelegate>b__b(IAppBuilder builder)
       at Owin.Loader.DefaultLoader.<>c__DisplayClass1.<LoadImplementation>b__0(IAppBuilder builder)
       at Microsoft.Owin.Host.SystemWeb.OwinHttpModule.<>c__DisplayClass2.<InitializeBlueprint>b__0(IAppBuilder builder)
       at Microsoft.Owin.Host.SystemWeb.OwinAppContext.Initialize(Action`1 startup)
       at Microsoft.Owin.Host.SystemWeb.OwinBuilder.Build(Action`1 startup)
       at Microsoft.Owin.Host.SystemWeb.OwinHttpModule.InitializeBlueprint()
       at System.Threading.LazyInitializer.EnsureInitializedCore[T](T& target, Boolean& initialized, Object& syncLock, Func`1 valueFactory)
       at Microsoft.Owin.Host.SystemWeb.OwinHttpModule.Init(HttpApplication context)
       at System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers)
       at System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context)
       at System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context)
       at System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext)
    
    Unable to find the requested .Net Framework Data Provider.  It may not be installed.
       at System.Data.Common.DbProviderFactories.GetFactory(String providerInvariantName)
       at Umbraco.Core.Persistence.Database.CommonConstruct()
       at Umbraco.Core.Persistence.Database..ctor(String connectionString, String providerName)
       at Umbraco.Core.DatabaseContext.ValidateDatabaseSchema()
       at Umbraco.Core.ApplicationContext.get_IsUpgrading()
       at Umbraco.Web.Security.Identity.AppBuilderExtensions.UseUmbracoBackOfficeCookieAuthentication(IAppBuilder app, CookieAuthenticationOptions options, ApplicationContext appContext, PipelineStage stage)
       at Umbraco.Web.Security.Identity.AppBuilderExtensions.UseUmbracoBackOfficeCookieAuthentication(IAppBuilder app, ApplicationContext appContext, PipelineStage stage)
       at Umbraco.Web.UmbracoDefaultOwinStartup.ConfigureMiddleware(IAppBuilder app)
       at Umbraco.Web.UmbracoDefaultOwinStartup.Configuration(IAppBuilder app)
    
  • Tim 1193 posts 2675 karma points MVP 4x c-trib
    Jun 13, 2016 @ 14:47
    Tim
    1

    Hiya,

    What type of database is it? It looks like the database Provider isn't on your Azure instance.

  • Laurence Gillian 600 posts 1219 karma points
    Jun 13, 2016 @ 15:20
    Laurence Gillian
    0

    The DB (Cloud MS SQL) is in the same Azure subscription and the same connection string works locally. The /bin directory is identical, and the DB provider is contained inside there right? Very strange!

  • Laurence Gillian 600 posts 1219 karma points
    Jun 13, 2016 @ 16:04
    Laurence Gillian
    100

    Figured it out! Dodgy merge during an upgrade, the

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Jan 17, 2017 @ 16:07
    Dan Diplo
    1

    In case it helps anyone, I had the same issue with Azure, but I solved it by commenting out the MySQL Data Provider from the <DbProviderFactories> element in web.config.

    So in web.config I had this (which worked):

      <system.data>
        <DbProviderFactories>
          <remove invariant="System.Data.SqlServerCe.4.0" />
          <add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe" />
          <!--
          <add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data" />
          <remove invariant="MySql.Data.MySqlClient" />
          -->
        </DbProviderFactories>
      </system.data>
    
  • Emma Garland 41 posts 123 karma points MVP 7x c-trib
    Jul 10, 2017 @ 20:57
    Emma Garland
    0

    Agree with the above - on Azure, suddenly complaining of the above DbProviderFactory from the web.config (was fine before and locally).

    The error was showing as "Unable to find the requested .Net Framework Data Provider. It may not be installed."

    The exact error in the logs was:

     Column 'InvariantName' is constrained to be unique.  Value 'MySql.Data.MySqlClient' is already present. ...System.Data.ConstraintException: Column 'InvariantName' is constrained to be unique.  Value 'MySql.Data.MySqlClient' is already present.
    

    Commented out and it is happier now.

    I'll update when I find out what changed.

    Thanks!

Please Sign in or register to post replies

Write your reply to:

Draft