Tracing problems with Custom Role Provider

Discussion in 'ASP .Net' started by James Crosswell, Nov 8, 2007.

  1. I have a custom role provider and custom membership provider in my
    ASP.NET app. These work fine on my local box. When deploying the app I'm
    getting the following 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: The type initializer for 'Tax.Core.TaxService'
    threw an exception.

    Source Error:

    Line 52: <providers>
    Line 53: <clear />
    Line 54: <add name="TaxServiceRoleProvider"
    type="Web.Public.TaxServiceRoleProvider" />
    Line 55: </providers>
    Line 56: </roleManager>

    Source File: c:\inetpub\wwwroot\web.config Line: 54

    So I'm pretty sure it's a problem that's occuring in the constructor of
    the Web.Public.TaxServiceRoleProvider class but I'd like to know exactly
    what the error/exception message is so that I know how to fix it, rather
    than just shooting in the dark.

    Is there any way to grab that information and spit it out to the Windows
    Event Logs or something?

    TIA.

    Best Regards,

    James Crosswell
    Microforge.net LLC
    http://www.microforge.net
     
    James Crosswell, Nov 8, 2007
    #1
    1. Advertising

  2. I"m guessing but in many cases line 54 needs to be all on one line and not
    split up.
    -- Peter
    http://www.eggheadcafe.com
    unBlog: http://petesbloggerama.blogspot.com
    BlogMetaFinder: http://www.blogmetafinder.com



    "James Crosswell" wrote:

    > I have a custom role provider and custom membership provider in my
    > ASP.NET app. These work fine on my local box. When deploying the app I'm
    > getting the following 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: The type initializer for 'Tax.Core.TaxService'
    > threw an exception.
    >
    > Source Error:
    >
    > Line 52: <providers>
    > Line 53: <clear />
    > Line 54: <add name="TaxServiceRoleProvider"
    > type="Web.Public.TaxServiceRoleProvider" />
    > Line 55: </providers>
    > Line 56: </roleManager>
    >
    > Source File: c:\inetpub\wwwroot\web.config Line: 54
    >
    > So I'm pretty sure it's a problem that's occuring in the constructor of
    > the Web.Public.TaxServiceRoleProvider class but I'd like to know exactly
    > what the error/exception message is so that I know how to fix it, rather
    > than just shooting in the dark.
    >
    > Is there any way to grab that information and spit it out to the Windows
    > Event Logs or something?
    >
    > TIA.
    >
    > Best Regards,
    >
    > James Crosswell
    > Microforge.net LLC
    > http://www.microforge.net
    >
     
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=, Nov 8, 2007
    #2
    1. Advertising

  3. Peter Bromberg [C# MVP] wrote:
    > I"m guessing but in many cases line 54 needs to be all on one line and not
    > split up.
    > -- Peter


    Hey Peter,

    Thanks for the reply. The split line didn't matter and I found the
    problem eventually... my real question was, how do I troubleshoot errors
    in the role provider though? How can I capture the underlying
    error/exception that is being raised in the constructor of my role
    provider and spit this out to a log somewhere.

    Best Regards,

    James Crosswell
    Microforge.net LLC
    http://www.microforge.net
     
    James Crosswell, Nov 9, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?QmVuIFIu?=

    debug a custom membership and role provider?

    =?Utf-8?B?QmVuIFIu?=, Mar 27, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    3,890
    =?Utf-8?B?dWxyaWNoIHNjaHVtYWNoZXI=?=
    May 17, 2006
  2. CK

    Custom Role Provider

    CK, Jul 25, 2006, in forum: ASP .Net
    Replies:
    1
    Views:
    5,092
    Winista
    Jul 25, 2006
  3. Alias
    Replies:
    5
    Views:
    700
    =?Utf-8?B?TWlsb3N6IFNrYWxlY2tpIFtNQ0FEXQ==?=
    Feb 18, 2007
  4. Tom Van den Brandt

    Custom role provider not working

    Tom Van den Brandt, May 31, 2007, in forum: ASP .Net
    Replies:
    8
    Views:
    5,600
    rwiethorn
    Jun 11, 2007
  5. sloan
    Replies:
    1
    Views:
    550
    Chad Scharf
    Jul 3, 2007
Loading...

Share This Page