At Install: "Object reference not set" on Role Provider

Discussion in 'ASP .Net' started by Monty, Sep 13, 2007.

  1. Monty

    Monty Guest

    I'm installing an ASP.Net 2.0 web applications project (WAP) application on
    a production server (Win 2003). I've installed it on XP test machines before
    and it runs fine. On my production machine I get this error (full error
    screen below) when I attempt to visit the start page. The type
    ("MyCo.Ing.MyAppRoleProvider") is in my main assembly in the \bin folder.
    Can anyone tell me what I'm doing wrong or what I should check? TIA.

    Server Error in '/MyApp' Application.
    --------------------------------------------------------------------------------
    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: Object reference not set to an instance of an object.

    Source Error:
    Line 97: <providers>
    Line 98: <clear/>
    [RED]Line 99: <add name="MyAppRoleProvider"
    type="MyCo.Ing.MyAppRoleProvider" applicationName="My Application"/>[/RED]
    Line 100: </providers>
    Line 101: </roleManager>

    Source File: C:\inetpub\wwwroot\MyApp\web.config Line: 99

    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:2.0.50727.832; ASP.NET
    Version:2.0.50727.
     
    Monty, Sep 13, 2007
    #1
    1. Advertising

  2. Monty

    Monty Guest

    Clarification

    Update: If I put line breaks in my web.config "add" tag, I can identify the
    problem area as the "type" parameter. Line 101 is highlighted:

    Line 99: <add
    Line 100: name="MyAppRoleProvider"
    Line 101: type="MyCo.Ing.MyAppRoleProvider"
    Line 102: applicationName="My Application"/>
    Line 103: </providers>
     
    Monty, Sep 13, 2007
    #2
    1. Advertising

  3. Monty

    Monty Guest

    Ignore

    Please ignore this post, I had an unhandled error in the Initialize()
    function of my custom role provider.
     
    Monty, Sep 13, 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. Jesper Stocholm
    Replies:
    2
    Views:
    8,167
    John Saunders
    Aug 23, 2003
  2. Liet Kynes
    Replies:
    0
    Views:
    515
    Liet Kynes
    Nov 26, 2003
  3. Jay Pondy
    Replies:
    0
    Views:
    578
    Jay Pondy
    Mar 18, 2007
  4. sloan
    Replies:
    1
    Views:
    521
    Chad Scharf
    Jul 3, 2007
  5. Replies:
    1
    Views:
    488
    Mark Rae [MVP]
    Sep 20, 2007
Loading...

Share This Page