新建MVC4项目的时候

选 Internet 应用程序的话,出来的示例项目就自带了默认的登录认证等功能。如果选空或者基本,就没有。

如果没有,现在又想加进去,怎么办呢?

抄啊。将示例项目的代码原原本本地操过去,包括app_start啦,Models啦,controller啦,Filters啦,global.asax啦,web.config啦,结果一点注册,报错:

异常详细信息: System.Configuration.Provider.ProviderException: 未启用角色管理器功能。

这究竟是为何呢!想来想去,只有bin这个目录没有照搬了。

经过一番对照,示例项目多了两个DLL:

WebMatrix.Data.dll

WebMatrix.WebData.dll

但是,报错那个项目也明明引用了这个类集,只不过BIN里没有出现而已。经网上查资料,将此两个类集的属性设为复制本地,问题解决:

1、鼠标右键点类集

2、设为复制本地

ASP.NET MVC 认证模块报错:“System.Configuration.Provider.ProviderException: 未启用角色管理器功能“的更多相关文章

  1. c#重命名文件,报错“System.NotSupportedException”类型的未经处理的异常在 mscorlib.dll 中发生”

    修改远程服务器的文件名,报错“System.NotSupportedException”类型的未经处理的异常在 mscorlib.dll 中发生”,“System.NotSupportedExcept ...

  2. ansible执行shell模块和command模块报错| FAILED | rc=127 >> /bin/sh: lsof: command not found和| rc=2 >> [Errno 2] No such file or directory

    命令: ansible -i hosts_20 st  -m shell -a 'service zabbix_agentd star'  -K --become ansible -i hosts_2 ...

  3. C# 调用win32 DLL报错 System.BadImageFormatException

    C# 调用win32 DLL报错  System.BadImageFormatException 项目右键属性->项目设计器->生成->平台->把'默认设置(任何 CPU)'改 ...

  4. http协议 put、delete请求asp.net mvc应用,报404错误

    http协议 put.delete请求asp.net mvc应用,报404错误 更改web.config,在<modules>节点中设置 runAllManagedModulesForAl ...

  5. pycharm安装 suds模块报错:AttributeError: module 'pip' has no attribute 'main'

    需求:安装suds模块 遇到的问题: 一.报错信息:[file][Default Settint]---Project Interpreter 点击 搜索suds安装模块报错 解决:依据上图提示找到C ...

  6. python pip安装模块报错 "Can't connect to HTTPS URL because the SSL module is not available."

    在升级python版本为3.6之后,pip安装模块报错. 报错信息如图: 原因是系统自带的openssl版本与python3的版本不匹配,所以这里只要升级openssl版本就可以解决问题. yum - ...

  7. python 安装模块报错 response.py", line 302, in _error_catcher

    python 安装模块报错 Exception:Traceback (most recent call last): File "/usr/share/python-wheels/urlli ...

  8. ASP.NET MVC页面报错System.InvalidOperationException The view found at '~/Views/Home/Index.cshtml' was not created.

    Application Exception System.InvalidOperationException The view found at '~/Views/Home/Index.cshtml' ...

  9. nginx 使用HTTPS协议-SSL证书模块报错解决-附nginx安装 : [emerg] the "ssl" parameter requires ngx_http_ssl_module in nginx.c

    Linux系统下ngnix使用HTTPS协议启动报错: nginx: [emerg] the "ssl" parameter requires ngx_http_ssl_modul ...

随机推荐

  1. Linq学习(四)-联合查询

    一.本将主要介绍 Union.Concat.Intersect.Except的使用操作 1.Union 查询昵称中带有Friend和带有Lee的用户 Linq (from a in Blog_User ...

  2. (转)分布式文件存储FastDFS(六)FastDFS多节点配置

    http://blog.csdn.net/xingjiarong/article/details/50759918 前面几篇关于FastDFS的博客中介绍了如何在一台机器上搭建一个简易的FastDFS ...

  3. What is gradle sync in Android Studio?

    What is it? And what does it do? Gradle sync is a gradle task that looks through all of your depende ...

  4. centos安装指定mysql

    mysql下载地址:http://repo.mysql.com/ nginx下载地址 我下载是这个 http://nginx.org/packages/centos/7/noarch/RPMS/ngi ...

  5. iptables详解(2):iptables实际操作之规则查询

    所属分类:IPtables  Linux基础 在阅读这篇文章之前,请确保你已经阅读了如下文章,如下文章总结了iptables的相关概念,是阅读这篇文章的基础. 图文并茂理解iptables 如果你是一 ...

  6. c++ map迭代器

    #include <stdio.h> #include <map> using namespace std; int main(){ map<int, int> m ...

  7. HDU 3152 Obstacle Course(优先队列,广搜)

    题目 用优先队列优化普通的广搜就可以过了. #include<stdio.h> #include<string.h> #include<algorithm> usi ...

  8. C# Thu Mar 1 00:00:00 UTC+0800 2012 如何转换为2012-03-01

    string s = "Thu Mar 1 00:00:00 UTC+0800 2012"; DateTime dt = DateTime.ParseExact(s, " ...

  9. char如何储存3个字节或者4个字节

    1.char字符存储的是Unicode编码的代码点,也就是存储的是U+FF00这样的数值,然而我们在调试或者输出到输出流的时候,是JVM或者开发工具按照代码点对应的编码字符输出的. 2. 所以虽然UT ...

  10. 使用Flask+uWsgi的方式部署一个blog网站

    本文参考以下文章:https://www.yukunweb.com/2017/12/ubuntu-nginx-uwsgi-flask-app/ 需要学习的地方 nginx+uwsgi部署flask应用 ...