Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/http/4.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# 使用IIS6使用自定义角色提供程序时要考虑的事项_C#_.net_Asp.net Mvc_Iis 6_Roleprovider - Fatal编程技术网

C# 使用IIS6使用自定义角色提供程序时要考虑的事项

C# 使用IIS6使用自定义角色提供程序时要考虑的事项,c#,.net,asp.net-mvc,iis-6,roleprovider,C#,.net,Asp.net Mvc,Iis 6,Roleprovider,我在IIS7.5上部署了一个网站。它工作得很好。当我试图在IIS6上部署它时,我遇到了一个关于CustomRoleProvider的“配置错误”(*第65行*)。有什么问题吗 <roleManager enabled="true" defaultProvider="CustomRoleProvider"> <providers> <clear /> Line 65: <add name="CustomRoleProvider

我在IIS7.5上部署了一个网站。它工作得很好。当我试图在IIS6上部署它时,我遇到了一个关于CustomRoleProvider的“配置错误”(*第65行*)。有什么问题吗

 <roleManager enabled="true" defaultProvider="CustomRoleProvider">
      <providers>
        <clear />
Line 65: <add name="CustomRoleProvider" type="A.B.CustomRoleProvider, A" connectionStringName="MyConnectionString" />
      </providers>
 </roleManager>


确切的错误消息是什么?@SimonSvensson我已经更新了问题。“异常已由调用的目标引发”是TargetInvocationException,我猜您的CustomRoleProvider在初始化期间引发了异常。附加调试器以查找错误,或执行大量日志记录以进一步锁定有问题的代码。@SimonSvensson
public override void Initialize(字符串名称,System.Collections.Specialized.NameValueCollection config)
config为null;但我不知道为什么:)我有它;我有自己的CustomRoleProvider构造函数。我没有给基构造函数打电话。
Configuration Error 
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. 

Parser Error Message: Exception has been thrown by the target of an invocation.
<add name="CustomRoleProvider" type="A.B.CustomRoleProvider, CustomRoleProvider.Web.Security" applicationName="/" connectionStringName="MyConnectionString" />