Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

trying to compile a customprofile.cs asp.net 3.5

Posted on 2009-04-19
2
Medium Priority
?
411 Views
Last Modified: 2013-11-08

http://lazyloading.blogspot.com/2007/05/fixing-up-systemwebprofile.html

I get the following error:
using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Caching;
using System.Xml;
using log4net;
using System.Collections;
using System.Configuration;
using System.Web.Profile;

namespace OmegaLove.Web.UI
{

    public enum EnumType : int
    {
        Example1,
        Example2
    }

    /// <summary>
    /// Class includes examples of three property types - primitive, class and enum
    /// </summary>
    public partial class CustomProfile
    {

        public static CustomProfile CreateProfile(string username)
        {
            return new CustomProfile(System.Web.Profile.ProfileBase.Create(username));
        }


        [SettingsAllowAnonymous(false)]
        public virtual string StringProperty
        {
            get
            {
                return ((string)(this.GetPropertyValue("StringProperty")));
            }
            set
            {
                this.SetPropertyValue("StringProperty", value);
            }
        }

        [SettingsAllowAnonymous(false)]
        [SettingsSerializeAs(SettingsSerializeAs.Binary)]
        public virtual CustomType ClassPeoperty
        {
            get
            {
                return (CustomType)(this.GetPropertyValue("ClassPeoperty"));
            }
            set
            {
                this.SetPropertyValue("ClassPeoperty", value);
            }
        }

        [SettingsAllowAnonymous(false)]
        public virtual EnumType EnumProperty
        {
            get
            {
                return ((EnumType)(this.GetPropertyValue("EnumProperty")));
            }
            set
            {
                this.SetPropertyValue("EnumProperty", value);
                Save();
            }
        }
    }

    /// <summary>
    /// Better do not change it manually. This part was generated by WebProfile Generator Add-On
    /// http://www.gotdotnet.com/workspaces/workspace.aspx?id=406eefba-2dd9-4d80-a48c-b4f135df4127
    /// Class was made partial and inherited from ProfileBase after that
    /// </summary>
    public partial class CustomProfile : ProfileBase
    {

        private System.Web.Profile.ProfileBase _profileBase;

        public CustomProfile()
        {
            this._profileBase = new System.Web.Profile.ProfileBase();
        }

        public CustomProfile(System.Web.Profile.ProfileBase profileBase)
        {
            this._profileBase = profileBase;
        }

        public static CustomProfile Current
        {
            get
            {
                return new CustomProfile(System.Web.HttpContext.Current.Profile);
            }
        }

        public virtual System.Web.Profile.ProfileBase ProfileBase
        {
            get
            {
                return this._profileBase;
            }
        }

        public virtual object this[string propertyName]
        {
            get
            {
                return this._profileBase[propertyName];
            }
            set
            {
                this._profileBase[propertyName] = value;
            }
        }

        public virtual string UserName
        {
            get
            {
                return this._profileBase.UserName;
            }
        }

        public virtual bool IsAnonymous
        {
            get
            {
                return this._profileBase.IsAnonymous;
            }
        }

        public virtual bool IsDirty
        {
            get
            {
                return this._profileBase.IsDirty;
            }
        }

        public virtual System.DateTime LastActivityDate
        {
            get
            {
                return this._profileBase.LastActivityDate;
            }
        }

        public virtual System.DateTime LastUpdatedDate
        {
            get
            {
                return this._profileBase.LastUpdatedDate;
            }
        }

        public virtual System.Configuration.SettingsProviderCollection Providers
        {
            get
            {
                return this._profileBase.Providers;
            }
        }

        public virtual System.Configuration.SettingsPropertyValueCollection PropertyValues
        {
            get
            {
                return this._profileBase.PropertyValues;
            }
        }

        public virtual System.Configuration.SettingsContext Context
        {
            get
            {
                return this._profileBase.Context;
            }
        }

        public virtual bool IsSynchronized
        {
            get
            {
                return this._profileBase.IsSynchronized;
            }
        }

        public static System.Configuration.SettingsPropertyCollection Properties
        {
            get
            {
                return System.Web.Profile.ProfileBase.Properties;
            }
        }

        public virtual CustomProfile GetProfile(string username)
        {
            return new CustomProfile(System.Web.Profile.ProfileBase.Create(username));
        }

        public virtual object GetPropertyValue(string propertyName)
        {
            return this._profileBase.GetPropertyValue(propertyName);
        }

        public virtual void SetPropertyValue(string propertyName, object propertyValue)
        {
            this._profileBase.SetPropertyValue(propertyName, propertyValue);
        }

        public virtual System.Web.Profile.ProfileGroupBase GetProfileGroup(string groupName)
        {
            return this._profileBase.GetProfileGroup(groupName);
        }

        public virtual void Initialize(string username, bool isAuthenticated)
        {
            this._profileBase.Initialize(username, isAuthenticated);
        }

        public virtual void Save()
        {
            this._profileBase.Save();
        }

        public virtual void Initialize(System.Configuration.SettingsContext context, System.Configuration.SettingsPropertyCollection properties, System.Configuration.SettingsProviderCollection providers)
        {
            this._profileBase.Initialize(context, properties, providers);
        }

        public static System.Configuration.SettingsBase Synchronized(System.Configuration.SettingsBase settingsBase)
        {
            return System.Web.Profile.ProfileBase.Synchronized(settingsBase);
        }

        public static System.Web.Profile.ProfileBase Create(string userName)
        {
            return System.Web.Profile.ProfileBase.Create(userName);
        }

        public static System.Web.Profile.ProfileBase Create(string userName, bool isAuthenticated)
        {
            return System.Web.Profile.ProfileBase.Create(userName, isAuthenticated);
        }
    }
}

0
Comment
Question by:mathieu_cupryk
2 Comments
 
LVL 14

Accepted Solution

by:
GiftsonDJohn earned 2000 total points
ID: 24182428
Hi,

What is the error message?
0
 

Author Comment

by:mathieu_cupryk
ID: 24184606
The namespace is required for CustomType ?
Wierd.
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
Integration Management Part 2

571 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question