No 'Configuration' method was found in class 'WebApp.Startup
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);
}
}
}
No 'Configuration' method was found in class 'WebApp.Startup的更多相关文章
- Spartan-6 FPGA Configuration
These configuration pins serve as the interface for a number of different configuration modes: • JTA ...
- Topshelf Configuration z
Topshelf Configuration While the Quickstart gives you enough to get going, there are many more featu ...
- MySQL 5.6 Reference Manual-14.4 InnoDB Configuration
14.4 InnoDB Configuration 14.4.1 InnoDB Initialization and Startup Configuration 14.4.2 Configuring ...
- The configuration file 'appsettings.json' was not found and is not optional
问: .Net Core: Application startup exception: System.IO.FileNotFoundException: The configuration file ...
- Getting Started with OWIN and Katana(Console 代替iis 制作 web服务的简单方案)
Open Web Interface for .NET (OWIN) defines an abstraction between .NET web servers and web applicati ...
- ssm基础搭建步骤
今天搭建新的项目环境,从网上找了些ssm的搭建步骤,终于找到了一位csdn的大佬,可以说写的特别详细,按照上面步骤搭建即可,为了方便日后参考,转载到本人博客,原文链接:https://blog.csd ...
- 简单读!spring-mvc源码之url的暴露之路
spring中,注册controller的url有多种方式: 1. 你可以啥都不都干,直接使用 @RequestMapping 注解上体路径,然后加上 <component-scan>, ...
- 构建 Owin 中间件 来获取客户端IP地址
Not so long ago, we discussed on this blog the possible ways of retrieving the client’s IP address i ...
- ssh框架配置过程
1.pom.xml配置依赖 <?xml version="1.0" encoding="UTF-8"?> <project xmlns=&qu ...
随机推荐
- poj3252(数位dp)(模板)
题目链接:https://vjudge.net/problem/POJ-3252 题意:求[l,r]之间的Round Number数,RN数即化为二进制后0的个数不少于1的个数的数. 思路:之前用组合 ...
- CentOS7设置集群环境SSH免密访问
1.准备工作 1)通过克隆或者其他方式获得可互相通信的多台节点(本文为3台虚拟机:hadoop101.hadoop102.hadoop103) 2)配置节点的静态IP.hostname.hosts,参 ...
- 在.NET Core 3.0中发布单个Exe文件(PublishSingleFile)
原文:在.NET Core 3.0中发布单个Exe文件(PublishSingleFile) 假设我有一个简单的" Hello World"控制台应用程序,我想发送给朋友来运行.朋 ...
- div css 布局对seo 影响 布局原则
一.代码精简 使用DIV+CSS布局,页面代码精简,这一点相信对XHTML有所了解的都知道.代码精简所带来的直接好处有两点:一是提高蜘蛛爬行效率,能在最短的时间内爬完整个页面,这样对收录质量有一定好处 ...
- vim学习(三)之命令
参考 Linux vi/vim vim常用命令总结
- Struts2对于BigDecimal类型的转换问题
Struts2对常用的数据类型如String.Integer.Double等都添加了转换器进行对应的转换操作. BigDecimal其实也算作是一种常用的数据类型,但Struts2没有对该类型设置转换 ...
- vscode如何使用?常用插件有哪些?
vscode下载 官网下载:https://code.visualstudio.com/ 一.汉化中文(官方下载默认为英文,英文好的小伙伴可直接跳过这步) 点击插件按钮搜索 Chinese, 在弹出的 ...
- ES6拷贝方法
ES6 中对象拷贝方法: 方法一: Object.assign() // 对象浅拷贝, 复制所有可枚举属性 const obj1 = {a: 1}; const obj2 = {b: 2}; // c ...
- Delphi 条件语句和程序的选择结构
- LAMP,LNMP 环境编译参数配置详解
1)查看 web 服务的编译参数 a.查看 nginx 的编译参数: /home/oldboy/run/nginx/sbin/nginx -V 范例 1: [root@VM-001 ~]# /home ...