Error accessing the membership profile object

G

Guest

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top