0

I deployed a website on IIS7.5. It worked fine. When I tried to deploy it on IIS6 I got a "Configuration Error" regarding the CustomRoleProvider(*Line 65*) . What seems to be the problem?

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

Error Message :

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.
Byronic Coder
  • 84
  • 1
  • 1
  • 8
  • What does the exact error message say? – sisve Apr 15 '13 at 09:14
  • 1
    "Exception has been thrown by the target of an invocation" is a TargetInvocationException, I'm guessing that your CustomRoleProvider throws an exception during initialization. Attach a debugger to find the error, or implement a lot of logging to further pin down the offending code. – sisve Apr 15 '13 at 09:17
  • @SimonSvensson `public override void Initialize(string name, System.Collections.Specialized.NameValueCollection config)` config is null; but i dont know why – Byronic Coder Apr 15 '13 at 16:29
  • :) I've got it; I had a constructor of my own for CustomRoleProvider. I was not calling the base constructor. – Byronic Coder Apr 15 '13 at 16:35

1 Answers1

0
<add name="CustomRoleProvider" type="A.B.CustomRoleProvider, CustomRoleProvider.Web.Security" applicationName="/" connectionStringName="MyConnectionString" />
Black Cloud
  • 471
  • 1
  • 3
  • 14