编程语言
首页 > 编程语言> > c# – owin安装客户站点umbraco 7站点后首次运行时出错

c# – owin安装客户站点umbraco 7站点后首次运行时出错

作者:互联网

我在7.3 umbraco版本上遇到此错误:

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.

有任何想法吗?我甚至从bin文件夹和解决方案中删除了owin.dll,也添加到了web.config< add key =“owin:AutomaticAppStartup”value =“false”/>并仍然得到相同的错误?

谢谢

解决方法:

如果您插入以下web.config appSettings,它应该生动:

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

我在升级7.2.8后收到此错误 – > 7.4.1.执行上述操作后,Umbraco声称无法找到System.Object.通过将以下内容添加到程序集部分来解决此问题:

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

此外;如果你收到任何依赖项不匹配(我收到一条消息’umbraco’试图使用Microsoft.Owin 2.1.0,尽管最新的Umbraco NuGet随3.0.1.0发货),您可能需要将以下内容添加到assemblyBinding部分:

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

标签:c,owin,umbraco
来源: https://codeday.me/bug/20190609/1201715.html