Converting from Web Site Project to Web Application Project

Topics: Developer Forum
Jun 15, 2007 at 6:40 PM
I'm running into issues regarding profiles after converting to a Web Application Project. I've followed the instructions on http://webproject.scottgu.com/CSharp/Migration2/Migration2.aspx, http://www.gotdotnet.com/workspaces/workspace.aspx?id=406eefba-2dd9-4d80-a48c-b4f135df4127 and http://msdn2.microsoft.com/en-us/library/aa983476(vs.80).aspx but I'm still having problems.

The problems occure in BasePage.cs for setting the culture. I keep getting a NullReferenceException. Has anyone else done this conversion and resolved this issue?

public class BasePage : System.Web.UI.Page
{
protected override void InitializeCulture()
{
string culture = (HttpContext.Current.Profile as ProfileCommon).Preferences.Culture;
this.Culture = culture;
this.UICulture = culture;
}

Thanks,
Joe