Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/281.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# mvc5中的配置错误_C#_Asp.net_Asp.net Mvc 5 - Fatal编程技术网

C# mvc5中的配置错误

C# mvc5中的配置错误,c#,asp.net,asp.net-mvc-5,C#,Asp.net,Asp.net Mvc 5,我正在尝试将身份验证和授权添加到我的网站。我在教程的帮助下完成它。我像教程一样向web.config文件和global.asax文件添加了以下代码。但是,当我尝试运行应用程序时,它会给我一个错误。有人能解释我所做的错误吗..我通过选择“无身份验证”创建了project,并且安装了Microsoft.AspNet.WebHelpers和Microsoft.AspNet.WebPages.Data包..我还添加了WebMatrix.Data和WebMatrix.WebData引用到应用程序 web.

我正在尝试将身份验证和授权添加到我的网站。我在教程的帮助下完成它。我像教程一样向web.config文件和global.asax文件添加了以下代码。但是,当我尝试运行应用程序时,它会给我一个错误。有人能解释我所做的错误吗..我通过选择“无身份验证”创建了project,并且安装了Microsoft.AspNet.WebHelpers和Microsoft.AspNet.WebPages.Data包..我还添加了WebMatrix.Data和WebMatrix.WebData引用到应用程序

web.config文件

<system.web>
<compilation debug="true" targetFramework="4.5" />
<httpRuntime targetFramework="4.5" />


<membership defaultProvider="ePlannerProvider">
<providers>
<clear />
<add name="ePlannerProvider" type="WebMatrix.WebData.ePlannerProvider, WebMatrix.WebData" />
</providers>  
</membership>
<roleManager enabled="true"/>

</system.web>
错误消息:

分析器错误消息:无法从程序集“WebMatrix.WebData”加载类型“WebMatrix.WebData.ePlannerProvider”

源错误:

<providers>
<clear />
<add name="ePlannerProvider" type="WebMatrix.WebData.ePlannerProvider, WebMatrix.WebData" />
</providers>  
</membership>

错误消息表示找不到该类型

尝试查看版本是否正确,并使用对象浏览器查看该类是否存在

同样在参考中,转到“属性”并将“复制本地”设置为true

通常,类名以大写字符开头

<providers>
<clear />
<add name="ePlannerProvider" type="WebMatrix.WebData.ePlannerProvider, WebMatrix.WebData" />
</providers>  
</membership>