Error accessing the membership profile object

Discussion in 'ASP .Net' started by =?Utf-8?B?QXJnaXJvcA==?=, Nov 7, 2006.

  1. My app is asp.net 2.0. It works fine on my development machine. When I am
    deploying it to the production I get an error.
    ---------------------
    The error is:
    Value cannot be null.
    Parameter name: type
    ------------------------
    The stack trace is:
    [ArgumentNullException: Value cannot be null.
    Parameter name: type]
    System.Activator.CreateInstance(Type type, Boolean nonPublic) +2797139
    System.Web.Profile.ProfileBase.CreateMyInstance(String username, Boolean
    isAuthenticated) +76
    System.Web.Profile.ProfileBase.Create(String username, Boolean
    isAuthenticated) +312
    System.Web.HttpContext.get_Profile() +89
    Epafos.Central.UIL.CentralPage.InitializeCulture() in
    c:\Central\Implementation\Solution\Central\UIL\App_Code\CentralPage.cs:20
    ASP.login_aspx.__BuildControlTree(login_aspx __ctrl) in
    c:\WebApps\Central\login.aspx:1
    ASP.login_aspx.FrameworkInitialize() in
    c:\WINNT\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
    Files\central\48cb4824\70926901\App_Web_u0zezmhj.6.cs:0
    System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint,
    Boolean includeStagesAfterAsyncPoint) +40
    System.Web.UI.Page.ProcessRequest() +86
    System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
    System.Web.UI.Page.ProcessRequest(HttpContext context) +49
    ASP.login_aspx.ProcessRequest(HttpContext context) in
    c:\WINNT\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET
    Files\central\48cb4824\70926901\App_Web_u0zezmhj.6.cs:0

    System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +154
    System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&
    completedSynchronously) +64
    ----------------------------
    Line 20 in
    c:\Central\Implementation\Solution\Central\UIL\App_Code\CentralPage.cs file
    is:
    string languagePreference =
    (string)System.Web.HttpContext.Current.Profile["LanguagePreference"];
    -------------------------------
    My profile related entries in web.config are:
    <connectionStrings>
    <add name="MembersDB"
    connectionString="Database=Central;Server=GILDA\DEVE2005;User
    ID=central;Password=central;Min Pool Size=5;Max Pool Size=50;Packet
    Size=3072;Connection Lifetime=60;Application Name=CentralMemberships;"
    providerName="System.Data.SqlClient"/>
    </connectionStrings>

    <profile defaultProvider="AspNetSqlProfileProvider">
    <providers>
    <clear/>
    <add name="AspNetSqlProfileProvider"
    type="System.Web.Profile.SqlProfileProvider" connectionStringName="MembersDB"
    applicationName="Central"/>
    </providers>
    <properties>
    <add name="LanguagePreference" type="string" defaultValue="el-GR"/>
    <add name="GridPageSize" type="int" defaultValue="15"/>
    </properties>
    </profile>

    Any help is appreciated.

    Thanks
    =?Utf-8?B?QXJnaXJvcA==?=, Nov 7, 2006
    #1
    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. ad
    Replies:
    3
    Views:
    338
    Brock Allen
    Apr 14, 2005
  2. =?Utf-8?B?V29sZmVpdHo=?=

    asp.net 2.0 membership/profile question

    =?Utf-8?B?V29sZmVpdHo=?=, Dec 14, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    427
    =?Utf-8?B?V29sZmVpdHo=?=
    Dec 14, 2005
  3. Brad
    Replies:
    1
    Views:
    1,136
    Roedy Green
    Jul 19, 2005
  4. Andy B
    Replies:
    0
    Views:
    519
    Andy B
    May 3, 2008
  5. Steven
    Replies:
    5
    Views:
    484
    Steven
    Oct 24, 2008
Loading...

Share This Page