gpt4 book ai didi

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

转载 作者:太空狗 更新时间:2023-10-30 01:02:11 26 4
gpt4 key购买 nike

我在 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# - 安装客户站点umbraco 7 站点后首次运行时出现 owin 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34856662/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com