Copied to clipboard

Flag this post as spam?

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


  • Chris Wilson 100 posts 377 karma points
    Mar 14, 2016 @ 15:12
    Chris Wilson
    0

    7.4.1 Upgrade results in: 'UmbracoDefaultOwinStartup' does not match the given value ''

    Upon upgrading a project from 7.2.8 -> 7.4.1 via NuGet, compiling and reloading, we received the following error message:

    The following errors occurred while attempting to load the app.
    - The OwinStartupAttribute.FriendlyName value 'UmbracoDefaultOwinStartup' does not match the given value '' in Assembly 'umbraco, Version=1.0.5891.23243, Culture=neutral, PublicKeyToken=null'.
    - No assembly found containing a Startup or [AssemblyName].Startup class.
    To disable OWIN startup discovery, add the appSetting owin:AutomaticAppStartup with a value of "false" in your web.config.
    To specify the OWIN startup Assembly, Class, or Method, add the appSetting owin:AppStartup with the fully qualified startup class or configuration method name in your web.config.`
    

    I managed to kick this into gear by adding the following entries to the App Settings:

    <add key="owin:AutomaticAppStartup" value="true" />
    <add key="owin:appStartup" value="UmbracoDefaultOwinStartup" />
    

    After this, the compiler threw up a dependency version mismatch; claiming that 'umbraco' was attempting to use Microsoft.Owin 2.1.0.0, despite the NuGet package manager automatically pulling Microsoft.Owin 3.0.1.0 when I upgraded to Umbraco 7.4.1.

    The following Assembly Bindings fixed that:

    <dependentAssembly>
       <assemblyIdentity name="Microsoft.Owin" publicKeyToken="31bf3856ad364e35" culture="neutral" />
       <bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
    </dependentAssembly>
    <dependentAssembly>
        <assemblyIdentity name="Microsoft.Owin.Security.OAuth" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
    </dependentAssembly>
    <dependentAssembly>
       <assemblyIdentity name="Microsoft.Owin.Security" publicKeyToken="31bf3856ad364e35" culture="neutral" />
       <bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
    </dependentAssembly>
    <dependentAssembly>
       <assemblyIdentity name="Microsoft.Owin.Security.Cookies" publicKeyToken="31bf3856ad364e35" culture="neutral" />
       <bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
    </dependentAssembly>
    

    At which point the compiler then claimed it could not find System.Object. This was fixed by adding this key to the Assemblies section:

    <add assembly="System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
    

    This is the highest number of errors I've encountered during an upgrade, particularly one which appeared to be so smooth. There were no breaking changes listed.

    The thing which got me under way initially was this Stack Overflow post from January.

    I can't seem to find many reports of this, is it a known issue?

    /Chris

  • Chris Wilson 100 posts 377 karma points
    Mar 14, 2016 @ 15:45
    Chris Wilson
    0

    I just came across an Umbraco Forms form which was not loading; the error log indicated that it could not find a type:

    error CS0012: The type 'System.Collections.Generic.Dictionary`2<T0,T1>' is defined in an assembly that is not referenced.
    You must add a reference to assembly 'System.Collections, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
    

    Adding this reference resolved the issue. It's rather disconcerting to have these thrown up however.

    /Chris

Please Sign in or register to post replies

Write your reply to:

Draft