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 ...
随机推荐
- BZOJ 1053 反素数 题解
题面 引理1: 1~n中的最大反质数,就是1~n中约数个数最多的数中最小的一个(因为要严格保证g(x)>g(i)): 引理2:1~n中任何数的不同因子不会超过10个,因为他们的乘积大于2,00 ...
- [Codeforces 1005F]Berland and the Shortest Paths(最短路树+dfs)
[Codeforces 1005F]Berland and the Shortest Paths(最短路树+dfs) 题面 题意:给你一个无向图,1为起点,求生成树让起点到其他个点的距离最小,距离最小 ...
- python 列表操作-切片
- Gym 101466(完整)
题目链接 :点击此处 ## Problem A 题意: 给你n个数,重定义两个数之间的加法不进位,求这些数中两个数相加的最大值和最小值. 题解: 字典树.我们首先将前i-1为放入字典树中,然后在查询第 ...
- vue video.js使用
插件github地址:https://github.com/videojs/video.js 这边做一个切换视频vue url的解决记录 this.$nextTick(() => { let u ...
- js将时间戳转化为年月日时分秒
export const dateFormatter = (nows) => { if (!nows) return '' var now = new Date(nows) var year = ...
- Python 列表元素里面含有字典或者列表进行排序
示例1:列表里面含有列表进行排序 s = [[1, 2], [100, 2], [33, 3], [25, 6]] s.sort(key=lambda k: k[0]) print(s) 结果: [[ ...
- 接口开发中 遇到的坑——Java byte与C# byte 数据转换问题
前提: 公司与其他公司进行接口对接 需要使用Byte[]数据流传输数据 原本想法如下:直接IO生成就ok了 using System; using System.IO; using System.Te ...
- 2>&1的含义解释
某次想将adb的help信息保存起来 F:\android系统\AndroidTool_Release_v2.\bin>adb >help.txt 结果 F:\android系统\Andr ...
- id 显示用户与用户组的信息
id 显示用户与用户组的信息 1.命令功能 id显示指定用户的用户ID和组ID等信息. 2.语法格式 id option username 参数说明 选项 选项说明 -gx 显示用户组ID -G ...