<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>How to use ASP.NET 2.0 Profile object from web service code</title><link>http://msmvps.com/blogs/omar/archive/2006/08/18/how-to-use-asp-net-2-0-profile-object-from-web-service-code.aspx</link><description>You have started to use ASP.NET 2.0 Profile Provider and you are very happy with it. All your .aspx pages are full of &amp;quot;Profile.Something&amp;quot;. You also introduced a lot of new properties on the profile object via web.config. Then you added a new</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>ASP.NET profile grouping, based on role</title><link>http://msmvps.com/blogs/omar/archive/2006/08/18/how-to-use-asp-net-2-0-profile-object-from-web-service-code.aspx#1667863</link><pubDate>Sun, 01 Feb 2009 17:30:54 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1667863</guid><dc:creator>David Ross</dc:creator><description>&lt;p&gt;Jim - not just Galloway, and Omar here, but also K Scott Allen:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://odetocode.com/Blogs/scott/archive/2005/12/27/2653.aspx"&gt;odetocode.com/.../2653.aspx&lt;/a&gt; [comments blocked]&lt;/p&gt;
&lt;p&gt;I use profile groups for stuff that is specific to membership role. I understand that &amp;quot;multiple profiles based on role&amp;quot; is ILLEGAL in ASP.NET, but we can use groups for this encapsulation. I ended up doing away with my custom groups and going back to web.config just for these groups.&lt;/p&gt;
&lt;p&gt;But I also have role-specific static members (to fill in ObjectDataSource and the like). Since I can no longer rely on my own profile grouping classes, I created a new class inheriting from ProfileCommon for these static members.&lt;/p&gt;
&lt;p&gt;I would much rather have stuck them in the same class as the profile groups.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1667863" width="1" height="1"&gt;</description></item><item><title>re: How to use ASP.NET 2.0 Profile object from web service code</title><link>http://msmvps.com/blogs/omar/archive/2006/08/18/how-to-use-asp-net-2-0-profile-object-from-web-service-code.aspx#1656694</link><pubDate>Sat, 13 Dec 2008 22:30:49 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1656694</guid><dc:creator>Jim Black</dc:creator><description>&lt;p&gt;Note that there is a similar blog with a similar group of people &amp;quot;stuck&amp;quot; on this issue at Jon Galloway&amp;#39;s blog:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://weblogs.asp.net/jgalloway/archive/2008/01/19/writing-a-custom-asp-net-profile-class.aspx"&gt;weblogs.asp.net/.../writing-a-custom-asp-net-profile-class.aspx&lt;/a&gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1656694" width="1" height="1"&gt;</description></item><item><title>re: How to use ASP.NET 2.0 Profile object from web service code</title><link>http://msmvps.com/blogs/omar/archive/2006/08/18/how-to-use-asp-net-2-0-profile-object-from-web-service-code.aspx#1656693</link><pubDate>Sat, 13 Dec 2008 22:28:30 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1656693</guid><dc:creator>Jim Black</dc:creator><description>&lt;p&gt;I&amp;#39;m having the same problem on groups. &amp;nbsp; My definition of the group looks like this:&lt;/p&gt;
&lt;p&gt;Public Class CG_ProfGrpWorkPhone : Inherits System.Web.Profile.ProfileGroupBase&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;#39; Defines business object layer component for the WorkPhone number&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Public Overridable Property CountryCode() As String&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Get&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Return CType(Me.GetPropertyValue(&amp;quot;CountryCode&amp;quot;), String)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End Get&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Set(ByVal value As String)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Me.SetPropertyValue(&amp;quot;CountryCode&amp;quot;, value)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End Set&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;End Property&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Public Overridable Property AreaCode() As String&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Get&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Return CType(Me.GetPropertyValue(&amp;quot;AreaCode&amp;quot;), String)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End Get&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Set(ByVal value As String)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Me.SetPropertyValue(&amp;quot;AreaCode&amp;quot;, value)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End Set&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;End Property&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Public Overridable Property Phone1() As Integer&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Get&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Return CType(Me.GetPropertyValue(&amp;quot;Phone1&amp;quot;), Integer)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End Get&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Set(ByVal value As Integer)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Me.SetPropertyValue(&amp;quot;Phone1&amp;quot;, value)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End Set&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;End Property&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Public Overridable Property Phone2() As Integer&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Get&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Return CType(Me.GetPropertyValue(&amp;quot;Phone2&amp;quot;), Integer)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End Get&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Set(ByVal value As Integer)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Me.SetPropertyValue(&amp;quot;Phone2&amp;quot;, value)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End Set&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;End Property&lt;/p&gt;
&lt;p&gt;End Class&lt;/p&gt;
&lt;p&gt;... and my attempt to include this group in my custom profile object looks like this:&lt;/p&gt;
&lt;p&gt; Public Overridable ReadOnly Property WorkPhone() As CG_ProfGrpWorkPhone&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Get&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Return CType(Me.GetProfileGroup(&amp;quot;WorkPhone&amp;quot;), CG_ProfGrpWorkPhone)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End Get&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;End Property&lt;/p&gt;
&lt;p&gt;Whenever I run this, I get the error message: &lt;/p&gt;
&lt;p&gt;The profile group &amp;#39;WorkPhone&amp;#39; has not been defined.&lt;/p&gt;
&lt;p&gt;When I run it in the debugger right before I hit the exception, I see that all of my non-group properties are returning values but the group property has an error System.Web.Profile.ProfileBase.GetProfileGroup(String groupName).&lt;/p&gt;
&lt;p&gt;So it look like ASP.NET is ignoring my group class definition. &amp;nbsp; Is there some trick in web.config to tell it to pay attention to that class. &amp;nbsp;I played around with the &amp;quot;inherits&amp;quot; key word in the &amp;lt;profile&amp;gt; tag, but that didn&amp;#39;t work.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1656693" width="1" height="1"&gt;</description></item><item><title>re: How to use ASP.NET 2.0 Profile object from web service code</title><link>http://msmvps.com/blogs/omar/archive/2006/08/18/how-to-use-asp-net-2-0-profile-object-from-web-service-code.aspx#1650348</link><pubDate>Thu, 09 Oct 2008 16:44:37 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1650348</guid><dc:creator>Scott</dc:creator><description>&lt;p&gt;I also am having the same problem using the Profile groups&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1650348" width="1" height="1"&gt;</description></item><item><title>re: How to use ASP.NET 2.0 Profile object from web service code</title><link>http://msmvps.com/blogs/omar/archive/2006/08/18/how-to-use-asp-net-2-0-profile-object-from-web-service-code.aspx#1647282</link><pubDate>Tue, 09 Sep 2008 20:31:20 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1647282</guid><dc:creator>chad</dc:creator><description>&lt;p&gt;Im having the same issue with the profile groups. Has anyone had any luck figuring it out?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1647282" width="1" height="1"&gt;</description></item><item><title>re: How to use ASP.NET 2.0 Profile object from web service code</title><link>http://msmvps.com/blogs/omar/archive/2006/08/18/how-to-use-asp-net-2-0-profile-object-from-web-service-code.aspx#1639997</link><pubDate>Wed, 09 Jul 2008 16:46:36 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1639997</guid><dc:creator>ray</dc:creator><description>&lt;p&gt;Same problem as mei and kevin- &amp;nbsp;any other thoughts on the ProfileGroup issue? &amp;nbsp;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1639997" width="1" height="1"&gt;</description></item><item><title>re: How to use ASP.NET 2.0 Profile object from web service code</title><link>http://msmvps.com/blogs/omar/archive/2006/08/18/how-to-use-asp-net-2-0-profile-object-from-web-service-code.aspx#1638958</link><pubDate>Tue, 01 Jul 2008 05:41:17 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1638958</guid><dc:creator>Santosh Kumar</dc:creator><description>&lt;p&gt;Hi Omar,&lt;/p&gt;
&lt;p&gt;thanks, giveing the great article for Asp.net Profile, this is the best way to access the Profile properties from a web service?&lt;/p&gt;
&lt;p&gt;Santosh Kumar&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://www.operativesystems.com"&gt;www.operativesystems.com&lt;/a&gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1638958" width="1" height="1"&gt;</description></item><item><title>re: How to use ASP.NET 2.0 Profile object from web service code</title><link>http://msmvps.com/blogs/omar/archive/2006/08/18/how-to-use-asp-net-2-0-profile-object-from-web-service-code.aspx#1634388</link><pubDate>Thu, 12 Jun 2008 12:04:49 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1634388</guid><dc:creator>Hari Krishna</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;If I run my application from IIS the why HttpContext.Current.Profile value is null. If I run from IDE the value is not null. Is it the problem with IIS or SQl Server. SQLExpress is running on my machine. Please let me know the problem. Thanks in advance. &lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1634388" width="1" height="1"&gt;</description></item><item><title>re: How to use ASP.NET 2.0 Profile object from web service code</title><link>http://msmvps.com/blogs/omar/archive/2006/08/18/how-to-use-asp-net-2-0-profile-object-from-web-service-code.aspx#1626101</link><pubDate>Thu, 22 May 2008 20:31:15 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1626101</guid><dc:creator>mei</dc:creator><description>&lt;p&gt;Having the same problem as Kevin. Looking for solution.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1626101" width="1" height="1"&gt;</description></item><item><title>re: How to use ASP.NET 2.0 Profile object from web service code</title><link>http://msmvps.com/blogs/omar/archive/2006/08/18/how-to-use-asp-net-2-0-profile-object-from-web-service-code.aspx#1621954</link><pubDate>Tue, 13 May 2008 17:28:46 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1621954</guid><dc:creator>Kevin</dc:creator><description>&lt;p&gt;I am having an issue with attempting to use Profile groups in my custom user profile object. &amp;nbsp;When I attempt to access a property from the group, I get the following exception:&lt;/p&gt;
&lt;p&gt;System.Configuration.Provider.ProviderException was unhandled by user code&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Message=&amp;quot;The profile group &amp;#39;Preferences&amp;#39; has not been defined.&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Source=&amp;quot;System.Web&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp;StackTrace:&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at System.Web.Profile.ProfileBase.GetProfileGroup(String groupName)&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at TODv2.Core.Profile.TODUserProfile.get_Preferences() in C:\Programming\Projects2008\TODv2\TODv2.Core\Profile\TODUserProfile.cs:line 40&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at TODv2.Core.Base.BasePage.OnPreInit(EventArgs e) in C:\Programming\Projects2008\TODv2\TODv2.Core\Base\BasePage.cs:line 75&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)&lt;/p&gt;
&lt;p&gt;I have scoured Google, but there doesn&amp;#39;t seem to be much information on this configuration. &amp;nbsp;Or I need to brush up on my Googling skills.&lt;/p&gt;
&lt;p&gt;Can anyone point out what I&amp;#39;m missing? &amp;nbsp;Below is the code for the profile group and profile itself.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;
&lt;p&gt;public class TODUserProfilePreferencesGroup : ProfileGroupBase {&lt;/p&gt;
&lt;p&gt; &amp;nbsp;[SettingsAllowAnonymous(false)]&lt;/p&gt;
&lt;p&gt; &amp;nbsp;public virtual string Theme {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;get { return (string)this.GetPropertyValue(&amp;quot;Theme&amp;quot;); }&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;set { this.SetPropertyValue(&amp;quot;Theme&amp;quot;, value); }&lt;/p&gt;
&lt;p&gt; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp;[SettingsAllowAnonymous(false)]&lt;/p&gt;
&lt;p&gt; &amp;nbsp;public virtual int Timezone {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;get { return (int)this.GetPropertyValue(&amp;quot;Timezone&amp;quot;); }&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;set { this.SetPropertyValue(&amp;quot;Timezone&amp;quot;, value); }&lt;/p&gt;
&lt;p&gt; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;public class TODUserProfile : ProfileBase {&lt;/p&gt;
&lt;p&gt; &amp;nbsp;public virtual TODUserProfilePreferencesGroup Preferences {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;get { return (TODUserProfilePreferencesGroup)(this.GetProfileGroup(&amp;quot;Preferences&amp;quot;)); }&lt;/p&gt;
&lt;p&gt; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp;public virtual TODUserProfile GetProfile(string username) {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;return (TODUserProfile)ProfileBase.Create(username);&lt;/p&gt;
&lt;p&gt; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1621954" width="1" height="1"&gt;</description></item><item><title>re: How to use ASP.NET 2.0 Profile object from web service code</title><link>http://msmvps.com/blogs/omar/archive/2006/08/18/how-to-use-asp-net-2-0-profile-object-from-web-service-code.aspx#1593810</link><pubDate>Fri, 18 Apr 2008 10:53:45 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1593810</guid><dc:creator>shakeel</dc:creator><description>&lt;p&gt;All discussion is very good. I am facing a problem regarding the implementation of the Custom Profiler.&lt;/p&gt;
&lt;p&gt;I created a OracleProfileProvider: ProfileProvider in a web project app(not a web site), overrides all required functions and properties (ApplicationName, Initialize, GetPropertyValues, SetPropertyValues, DeleteInactiveProfiles, DeleteProfiles, FindInactiveProfilesByUserName, FindProfilesByUserName, GetAllInactiveProfiles, GetAllProfiles, GetNumberOfInactiveProfiles) and also create a class for the properties of the User (UserProfile: ProfileBase). Both of these classes are defined in a namespace (abc.def). I insert the following tags in the web.config&lt;/p&gt;
&lt;p&gt; &amp;lt;authentication mode=&amp;quot;Forms&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;forms loginUrl=&amp;quot;Logon.aspx&amp;quot; defaultUrl=&amp;quot;Forms/Default.aspx&amp;quot; name=&amp;quot;.ASPXAUTH&amp;quot; timeout =&amp;quot;5&amp;quot;&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/forms&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/authentication&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;authorization&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;deny users=&amp;quot;?&amp;quot; /&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/authorization&amp;gt; &lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;profile enabled=&amp;quot;true&amp;quot; defaultProvider=&amp;quot;OracleProfileProvider&amp;quot; inherits=&amp;quot;abc.def.UserProfile&amp;quot; &amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;providers&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;clear /&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;add name=&amp;quot;OracleProfileProvider&amp;quot; type=&amp;quot;abc.def.OracleProfileProvider, Web&amp;quot; description=&amp;quot;Profile Provider&amp;quot;/&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;/providers&amp;gt;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;lt;/profile&amp;gt;&lt;/p&gt;
&lt;p&gt;I didn&amp;#39;t find the Profile property in aspx page, After reading this article, I declared a Profile object (protected abc.def.UserProfile Profile = System.Web.HttpContext.Current.Profile as abc.def.UserProfile;) in MyPage class which is inherited from the System.Web.UI.Page, and When I tried to access the Profile object in the aspx page (inherited from MyPage) I got that Profile object has null value. Please tell me what&amp;#39;s is wrong in it or what I have to do to overcome this problem.&lt;/p&gt;
&lt;p&gt;Thanks a lot.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1593810" width="1" height="1"&gt;</description></item><item><title>re: How to use ASP.NET 2.0 Profile object from web service code</title><link>http://msmvps.com/blogs/omar/archive/2006/08/18/how-to-use-asp-net-2-0-profile-object-from-web-service-code.aspx#1286105</link><pubDate>Wed, 07 Nov 2007 11:29:29 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1286105</guid><dc:creator>Hanno</dc:creator><description>&lt;p&gt;My problem was quite similar to that of the first paragraph, except that I wanted to use my Profile in a normal class library. I'm not sure if this is relevent to webservices too, but I'm just placing the solution here, incase someone else needs it too:&lt;/p&gt;
&lt;p&gt;System.Web.HttpContext.Current.Profile&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1286105" width="1" height="1"&gt;</description></item><item><title>re: How to use ASP.NET 2.0 Profile object from web service code</title><link>http://msmvps.com/blogs/omar/archive/2006/08/18/how-to-use-asp-net-2-0-profile-object-from-web-service-code.aspx#1220028</link><pubDate>Thu, 27 Sep 2007 21:32:03 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1220028</guid><dc:creator>Nathaniel D. Holcomb</dc:creator><description>&lt;p&gt;Um? Where is this ProfileCommon class defined? I am soooo confused. Did I miss something?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1220028" width="1" height="1"&gt;</description></item><item><title>re: How to use ASP.NET 2.0 Profile object from web service code</title><link>http://msmvps.com/blogs/omar/archive/2006/08/18/how-to-use-asp-net-2-0-profile-object-from-web-service-code.aspx#1006692</link><pubDate>Sat, 07 Jul 2007 08:25:02 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1006692</guid><dc:creator>omar</dc:creator><description>&lt;p&gt;Very good question. I have always struggled with ASP.NET Membership and Provider having a 2-tier model. The solution is to build your own custom provider which uses your standard business layer on middle tier.&lt;/p&gt;
&lt;p&gt;Here's how to make custom providers:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://msdn2.microsoft.com/en-us/library/0580x1f5.aspx"&gt;msdn2.microsoft.com/.../0580x1f5.aspx&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You can also learn from ASP.NET default membership provider source code:&lt;/p&gt;
&lt;p&gt;&lt;a rel="nofollow" target="_new" href="http://weblogs.asp.net/scottgu/archive/2006/04/13/442772.aspx"&gt;weblogs.asp.net/.../442772.aspx&lt;/a&gt;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1006692" width="1" height="1"&gt;</description></item><item><title>re: How to use ASP.NET 2.0 Profile object from web service code</title><link>http://msmvps.com/blogs/omar/archive/2006/08/18/how-to-use-asp-net-2-0-profile-object-from-web-service-code.aspx#999608</link><pubDate>Tue, 03 Jul 2007 22:17:25 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:999608</guid><dc:creator>Antonio</dc:creator><description>&lt;p&gt;How would i architect a 3-Tier application that is physically located on different servers. &amp;nbsp;So I want the Profile object in my presentation layer, but that will not work since I can not call the database directly. &amp;nbsp;I need to create a Profile object on the web services layer that can call the database. &amp;nbsp;I am having a hard time trying to figure this out. &amp;nbsp;Can anyone help on this? Every example i see always uses 3 layer that sits on one physical server??? &amp;nbsp;&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=999608" width="1" height="1"&gt;</description></item><item><title>re: How to use ASP.NET 2.0 Profile object from web service code</title><link>http://msmvps.com/blogs/omar/archive/2006/08/18/how-to-use-asp-net-2-0-profile-object-from-web-service-code.aspx#948613</link><pubDate>Thu, 07 Jun 2007 16:06:08 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:948613</guid><dc:creator>vidapura</dc:creator><description>&lt;p&gt;&amp;quot;Also after making your own custom class, you will have to remove all the custom properties declared inside &amp;lt;properties&amp;gt; node in the web.config.&amp;quot;&lt;/p&gt;
&lt;p&gt;In which web.config? The one in the web service or the one in the client using the web service?&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;p&gt;Vida&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=948613" width="1" height="1"&gt;</description></item><item><title>re: How to use ASP.NET 2.0 Profile object from web service code</title><link>http://msmvps.com/blogs/omar/archive/2006/08/18/how-to-use-asp-net-2-0-profile-object-from-web-service-code.aspx#942545</link><pubDate>Mon, 04 Jun 2007 18:34:10 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:942545</guid><dc:creator>D</dc:creator><description>&lt;p&gt;There is another way to avoid hand-coding the custom profile class, without having to run your application with breakpoints or disable the database, as long as you're using Visual Studio (like me :). In a page that uses your profile, or defines a variable of type ProfileCommon, just right-click on the &amp;quot;ProfileCommon&amp;quot; type identifier and select &amp;quot;Go To Definition.&amp;quot; As long as your site is compiled, the IDE should open up a page like App_Code/profile.abcde123.cs. &lt;/p&gt;
&lt;p&gt;Also, to answer Shamim's question, a ProfileGroup has to be implemented as a separate class in the file that inherits from ProfileGroupBase. The ProfileGroupBase contains the get &amp;amp; set properties, and then the ProfileBase contains a get method for the group, like so:&lt;/p&gt;
&lt;p&gt;public class MyProfileGroup : System.Web.Profile.ProfileGroupBase {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;public virtual object GroupProperty1 {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;get {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return ((object)(this.GetPropertyValue(&amp;quot;GroupProperty1&amp;quot;)));&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;set {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.SetPropertyValue(&amp;quot;GroupProperty1&amp;quot;, value);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;public virtual object GroupProperty2{&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;get {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return ((object)(this.GetPropertyValue(&amp;quot;GroupProperty2&amp;quot;)));&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;set {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;this.SetPropertyValue(&amp;quot;GroupProperty2&amp;quot;, value);&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;public class MyProfileCommon : System.Web.Profile.ProfileBase {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;public virtual MyProfileGroup MyGroup {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;get {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return ((MyProfileGroup)(this.GetProfileGroup(&amp;quot;MyGroup&amp;quot;)));&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;public virtual MyProfileCommon GetProfile(string username) {&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;return ((MyProfileCommon)(ProfileBase.Create(username)));&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;}&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=942545" width="1" height="1"&gt;</description></item><item><title>re: How to use ASP.NET 2.0 Profile object from web service code</title><link>http://msmvps.com/blogs/omar/archive/2006/08/18/how-to-use-asp-net-2-0-profile-object-from-web-service-code.aspx#913721</link><pubDate>Sat, 19 May 2007 16:17:06 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:913721</guid><dc:creator>omar</dc:creator><description>&lt;p&gt;You will have to parse content of aspnet_profile row for the user from Script component.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=913721" width="1" height="1"&gt;</description></item><item><title>re: How to use ASP.NET 2.0 Profile object from web service code</title><link>http://msmvps.com/blogs/omar/archive/2006/08/18/how-to-use-asp-net-2-0-profile-object-from-web-service-code.aspx#907440</link><pubDate>Wed, 16 May 2007 15:14:01 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:907440</guid><dc:creator>Mikey D.</dc:creator><description>&lt;p&gt;Excellent article, and nice feedback - all very helpful. I have a challenge to throw out to the group here - I need to actually get a reference to a user and profile (and use these methods as a foundation) BUT I am actually doing this processing from a SQL Server Integration Services package (Script Component) that doesn't even have a HTTPContext to hook into :) &lt;/p&gt;
&lt;p&gt;This is a text file upload of users into my web application.&lt;/p&gt;
&lt;p&gt;Anyone have any thoughts on a way to tackle this? I am *this* close.. but can't see the way...&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=907440" width="1" height="1"&gt;</description></item><item><title>re: How to use ASP.NET 2.0 Profile object from web service code</title><link>http://msmvps.com/blogs/omar/archive/2006/08/18/how-to-use-asp-net-2-0-profile-object-from-web-service-code.aspx#897468</link><pubDate>Thu, 10 May 2007 23:41:01 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:897468</guid><dc:creator>Mahesh</dc:creator><description>&lt;p&gt;We have an existing Authentication Service, which drops an &amp;quot;AUTH&amp;quot; cookie once user is authenticated. And I want to use this cookie to identify if an user is anonymous or authenticated. I did not find any way to add this information (username and the IsAuthenticated flag) into the Profile SettingsContext.&lt;/p&gt;
&lt;p&gt;Is there a way to do it ?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=897468" width="1" height="1"&gt;</description></item></channel></rss>