Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

owin Error on first run after installing a customers site umbraco 7 site

Tags:

c#

owin

umbraco

I get this error on a 7.3 umbraco build:

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.5750.18164, 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.

Any ideas? I've even removed owin.dll from the bin folder and the reference from the solution, also added to the web.config <add key="owin:AutomaticAppStartup" value="false" /> and still get the same error?

Thanks

like image 777
PeteTheGreek Avatar asked Jan 18 '16 14:01

PeteTheGreek


1 Answers

If you insert the following web.config appSettings, it should spring to life:

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

I received this error after upgrading 7.2.8 -> 7.4.1. After performing the above, Umbraco claimed it could not find System.Object. This was resolved by adding the following to the assemblies section:

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

Furthermore; if you receive any dependency mismatches (I received a message that 'umbraco' was attempting to use Microsoft.Owin 2.1.0, despite the latest Umbraco NuGet shipping with 3.0.1.0), you may need to add the following to the assemblyBinding section:

<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>
like image 79
Chris Wilson Avatar answered Sep 28 '22 15:09

Chris Wilson