473,320 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Custom Profile provider is null

I've implemented a custom profile provider following the pattern and examples
provided with ASP.NET 2.0, but no Profile object ever appears in my page; that
is, after executing the following,

ProfileCommon profile = this.Profile;

in my Page_Load method, profile is always null. My web.config file contains
the
following section:

<profile enabled="true" defaultProvider="UserProfileProvider">
<properties>
<add name="ShowItems" type="System.Boolean" defaultValue="false" />
</properties>
<providers>
<add name="UserProfileProvider"
type="Utilities.UserProfileProvider, Utilities"
applicationName="/"
description="User profile provider" />
</providers>
</profile>

The Utilities assembly is in place, and Intellisense offers the ShowItems
property of profile as a bool, as expected, so the web.config file is being
parsed. Utilities.UserProfileProvider inherits directly from ProfileProvider;
the only members for which I'm providing any real implementation (at this
point)
are GetPropertyValues and SetPropertyValues.

What else should I be doing? Is anything needed in Global.asax to get things
going?

TIA...

--Rich Armstrong
Mar 30 '06 #1
3 1900
Hi Rich,

Thank you for posting.

As for the profile provider problem, have you checked the web.config to see
whether the profile service for the application is disabled. Also, since
the application dosn't report error at initlize time(parsing the
web.conifig), I think your custom provider class has been correctly
idenitified and loaded. You can use the following code to loop all the
profile providers currently available for the application:

foreach (ProfileProvider pp in ProfileManager.Providers)
{
Response.Write("<br/>" + pp.Name + ": " + pp.Description);
}

this can also help ensure whether the custom provider is correctly
configured.

Please feel free to post here if threre's any other finding.

Regards,

Steven Cheng
Microsoft Online Community Support
==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)




Mar 30 '06 #2
>> ... have you checked the web.config to see whether the profile service for
the application is disabled

Exactly what do you mean by this? As you can see from my original post, my
web.config includes <profile enabled="true"
defaultProvider="UserProfileProvider">. Where else does one modify web.config
so as to see if "the profile service for the application is disabled" or
enabled?
--
Rich Armstrong

May 2 '06 #3
Thanks for the followup Rich,

I just mean that setting, so you've already enabled that. Then, how about
the results you print through the following statement?

foreach (ProfileProvider pp in ProfileManager.Providers)
{
Response.Write("<br/>" + pp.Name + ": " + pp.Description);
}
Regards,

Steven Cheng
Microsoft Online Community Support
==================================================

When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.

==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

May 4 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: | last post by:
Hi all, How can I get a reference to my custom profile provider in my .aspx page? I have looked at httpcontext.current.profile. But from there where do I go? Ideally I would like to be able to...
6
by: Shimon Sim | last post by:
Hi I am working on application that need to hold custom user information - Last and first name, email, some other domain related information. I used to create Base class for all my pages. The base...
4
by: techsupport | last post by:
I have some experience with .NET Remoting, as well as ASP.NET 2.0, and have been wanting to remote a custom membership and profile provider. I want to take advantage of the new controls in ASP.NET...
0
by: george_Martinho | last post by:
It seems that the ASP.NET Microsoft team didn't think about this!! The profilemanager class has the following methods: - DeleteInactiveProfiles. Enables you to delete all profiles older than a...
0
by: Giorgio | last post by:
It seems that the ASP.NET Microsoft team didn't think about this!! The profilemanager class has the following methods: - DeleteInactiveProfiles. Enables you to delete all profiles older...
0
by: Phil | last post by:
I created a custom profile provider based on the example here : http://www.theserverside.net/articles/showarticle.tss?id=CreatingProfileProvider It works ok, but when I try to get the last update...
10
karlr
by: karlr | last post by:
OK, I know this has been discussed in multiple posts. However, I still have not seen a good example. That is, I have a custom Membership provider using the ASP.NET 2.0 controls. I am restricted...
9
by: Kirk | last post by:
I have successfully, implemented a custom Membership Provider to a SQL 2000 table, however, I am having problems doing the same with a Profile Provider. As I understand it, the steps for both of...
4
by: freeflytim | last post by:
I'm trying to implement a custom MembershipProvider (and RoleProvider) together with a custom MembershipUser class in C#, Asp.Net 2.0, MS Visual Studio 2005. Everything has worked fine so far,...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.