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 ...
随机推荐
- 小记-------linux scp 远程拷贝命令
//phoenix-4.10.0-HBase-1.2-server.jar 要拷贝的文件或文件夹 //root 当前用户 //192.148.21.1 远程机器路径, 也可以是域名. // $ ...
- 【一个蒟蒻的挣扎】LCA (倍增)
#include<cstdio> #include<iostream> #include<cstring> using namespace std; struct ...
- PHP常用代码片段
/** * 高效判断远程文件是否存在 * @param $file * @return bool 存在返回 true 不存在或者其他原因返回false */ function remoteFileEx ...
- 安装运行zookeeper的坑
从官网下载zookeeper的地址中有俩文件 一个是apache-zookeeper-3.5.5.tar.gz ,另一个是apache-zookeeper-3.5.5-bin.tar.gz 若是使用前 ...
- SpringBoot在macOS下启动慢的原因
title: SpringBoot在macOS下启动慢的原因 comments: false date: 2019-07-16 09:48:24 description: 在 macOS + JDk1 ...
- Vue的双向数据绑定的原理
Vue数据双向绑定的原理就是采用数据劫持结合发布者-订阅者模式,通过object.defineProperty()来劫持各个属性的setter,getter,在数据变动时发布消息给订阅者,触发相应的监 ...
- tab栏切换效果案例
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...
- kickstart一键装机部署
1.第一步安装DHCP yum -y install dhcp 1.1配置修改文件 cat >> /etc/dhcp/dhcpd.conf <<END subnet 172.1 ...
- ArrayList知识详解
简介 ArrayList是Java集合常用的数据结构之一,继承自AbstractList,实现了List,RandomAccess.Cloneable.Serializable等一系列接口,支持快速访 ...
- js 代码大全(各种方法、属性)
事件源对象event.srcElement.tagNameevent.srcElement.type捕获释放event.srcElement.setCapture(); event.srcElemen ...