The following errors occurred while attempting to load the app.
- No 'Configuration' method was found in class 'WebApp.Startup, WebApp, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null'.
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.

解决办法:

添加Startup 类

    public partial class Startup
{
// 有关配置身份验证的详细信息,请访问 http://go.microsoft.com/fwlink/?LinkId=301864
public void ConfigureAuth(IAppBuilder app)
{
AntiForgeryConfig.UniqueClaimTypeIdentifier = ClaimTypes.Name;
app.UseCookieAuthentication(new CookieAuthenticationOptions
{
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
LoginPath = new PathString(IdentityExtention.AuthUrl)
});
}
}

添加调用

[assembly: OwinStartup(typeof(WebApp.Startup))]

namespace WebApp
{
public partial class Startup
{
public void Configuration(IAppBuilder app)
{
ConfigureAuth(app);
}
}
}

  

最新文章

  1. [Objective-C]关联(objc_setAssociatedObject、objc_getAssociatedObject、objc_removeAssociatedObjects)
  2. 腾讯bugly团队提供的android国内镜像
  3. eclipse+adt+sdk开发环境搭配
  4. 1到n数组,和为指定数所有序列问题
  5. 分享3一个博客HTML5模板
  6. Strategic Game HDU
  7. linux下ffmpeg安装
  8. 你不知道的JavaScript--Item13 理解 prototype, getPrototypeOf 和__proto__
  9. Kafka: Exactly-once Semantics
  10. 51Nod 1001 数组中和等于K的数对
  11. Linux将某目录授权给某组里的某用户
  12. Java编程的逻辑 (28) - 剖析包装类 (下)
  13. MVC4是不是类似于html页+ashx页之间用JSON通过AJAX交换数据这种方式、?
  14. 检测ASP.NET是否是调试模式
  15. flask报错No module named 'flask.ext'
  16. css 页面定位position
  17. 利用media query写响应式布局
  18. chrome不支持字体12px
  19. JS,JQUERY 常用笔记
  20. C# Ftp方式下载文件(无用户认证方式,支持断点续传)

热门文章

  1. Python流程控制与while 循环(day01)
  2. Python基础数据类型int
  3. Vuejs——slot内容分发
  4. Fire Net HDU - 1045 (二分图匹配)
  5. the server responsed width a status of 404 (Not Found)
  6. HTML-复杂动画和变形
  7. vue项目兼容es6语法跟IE浏览器
  8. Echarts-样式简介
  9. lnmp 中的laravel出现白屏的处理办法
  10. java基本类型和包装类型的区别