【问题标题】:I am suffering from owin startup issue my Asp.net MVC5 application我的 Asp.net MVC5 应用程序遇到 owin 启动问题
【发布时间】:2016-10-06 02:03:02
【问题描述】:

尝试加载应用时出现以下错误。

在引用启动类型“Search4Expert.Service.WebService.Startup”的程序集“Search4Expert.Service.WebService”中发现的 OwinStartup 属性与引用启动类型“Search4Expert.Web.UI”的程序集“Search4Expert.Web.UI”中的属性冲突.Startup',因为它们具有相同的 FriendlyName ''。删除或重命名属性之一,或直接引用所需的类型。 要禁用 OWIN 启动发现,请在 web.config 中添加值为“false”的 appSetting owin:AutomaticAppStartup。 要指定 OWIN 启动程序集、类或方法,请在 web.config 中添加带有完全限定的启动类或配置方法名称的 appSetting owin:AppStartup。

来源错误:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. 

请任何人帮助我。

【问题讨论】:

  • 阅读并按照错误消息中的说明进行操作。很清楚你需要做什么。它甚至会告诉你去哪里看。

标签: asp.net asp.net-mvc-5 owin


【解决方案1】:

我在新的 ASP.NET 应用程序中经常遇到这个问题。您所要做的就是打开 Web.config 文件并在 <appSettings> 元素下打开以下行:

  <appSettings>
    <add key="owin:AutomaticAppStartup" value="false" />
  </appSettings>

【讨论】:

  • 这会删除错误信息,但我的网页仍然无法正常工作。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2018-06-28
  • 1970-01-01
  • 2012-05-23
  • 2020-08-26
  • 2023-03-27
  • 2014-04-12
  • 2015-01-03
相关资源
最近更新 更多