473,386 Members | 1,610 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,386 software developers and data experts.

reference to custom profile provider

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 get default profile provider without
having to know the "name" configured in web.config.

TIA!
Nov 19 '05 #1
2 1952
Hi Param,

Welcome to ASPNET newsgroup.
From your description , you're wantting to programmatically get the current
configured default Profile Provider in aspx page's code?

Not sure what's your detailed scenario and requirement in your application.
Based on my research we can get the most configuration info on ASP.NET 2.0
Profile service through the System.Web.Profile.ProfileManager class. The
below code can help get the current configured default Profile Provider and
all the configured ProileProviders:

=================
protected void Page_Load(object sender, EventArgs e)
{
Response.Write("<br>DefaultProfile: " +
System.Web.Profile.ProfileManager.Provider.Name);

Response.Write("<br>All Profiles: " );

foreach (System.Web.Profile.ProfileProvider pp in
System.Web.Profile.ProfileManager.Providers)
{
Response.Write("<br>" + pp.Name);
}
}

================

In addition, for getting configuration info in web.config or uplevel
configuration, we can also utilize the
System.Configuration
and System.Web.Configuration namespaces' componentns. In .NET 2.0 there's
provide much more strong typed classes for accessing configuration info.

Hope helps. Thanks,

Steven Cheng
Microsoft Online Support

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

--------------------
| From: <pa***@community.nospam>
| Subject: reference to custom profile provider
| Date: Wed, 9 Nov 2005 11:02:37 -0600
| Lines: 10
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
| X-RFC2646: Format=Flowed; Original
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
| Message-ID: <eU**************@TK2MSFTNGP12.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: corp2.lazardgroup.com 70.182.148.88
| Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP12.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:356723
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| 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 get default profile provider without
| having to know the "name" configured in web.config.
|
| TIA!
|
|
|

Nov 19 '05 #2
Hi Param,

Does my last reply helps you on this issue? If there're anything else we
can help, please feel free to post here.

Thanks,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| X-Tomcat-ID: 106616480
| References: <eU**************@TK2MSFTNGP12.phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: st*****@online.microsoft.com (Steven Cheng[MSFT])
| Organization: Microsoft
| Date: Thu, 10 Nov 2005 04:20:17 GMT
| Subject: RE: reference to custom profile provider
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| Message-ID: <dw**************@TK2MSFTNGXA02.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| Lines: 64
| Path: TK2MSFTNGXA02.phx.gbl
| Xref: TK2MSFTNGXA02.phx.gbl
microsoft.public.dotnet.framework.aspnet:356913
| NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
|
| Hi Param,
|
| Welcome to ASPNET newsgroup.
| From your description , you're wantting to programmatically get the
current
| configured default Profile Provider in aspx page's code?
|
| Not sure what's your detailed scenario and requirement in your
application.
| Based on my research we can get the most configuration info on ASP.NET
2.0
| Profile service through the System.Web.Profile.ProfileManager class. The
| below code can help get the current configured default Profile Provider
and
| all the configured ProileProviders:
|
| =================
| protected void Page_Load(object sender, EventArgs e)
| {
| Response.Write("<br>DefaultProfile: " +
| System.Web.Profile.ProfileManager.Provider.Name);
|
| Response.Write("<br>All Profiles: " );
|
| foreach (System.Web.Profile.ProfileProvider pp in
| System.Web.Profile.ProfileManager.Providers)
| {
| Response.Write("<br>" + pp.Name);
| }
| }
|
| ================
|
| In addition, for getting configuration info in web.config or uplevel
| configuration, we can also utilize the
| System.Configuration
| and System.Web.Configuration namespaces' componentns. In .NET 2.0
there's
| provide much more strong typed classes for accessing configuration info.
|
| Hope helps. Thanks,
|
| Steven Cheng
| Microsoft Online Support
|
| Get Secure! www.microsoft.com/security
| (This posting is provided "AS IS", with no warranties, and confers no
| rights.)
|
| --------------------
| | From: <pa***@community.nospam>
| | Subject: reference to custom profile provider
| | Date: Wed, 9 Nov 2005 11:02:37 -0600
| | Lines: 10
| | X-Priority: 3
| | X-MSMail-Priority: Normal
| | X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
| | X-RFC2646: Format=Flowed; Original
| | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
| | Message-ID: <eU**************@TK2MSFTNGP12.phx.gbl>
| | Newsgroups: microsoft.public.dotnet.framework.aspnet
| | NNTP-Posting-Host: corp2.lazardgroup.com 70.182.148.88
| | Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFT NGP12.phx.gbl
| | Xref: TK2MSFTNGXA02.phx.gbl
| microsoft.public.dotnet.framework.aspnet:356723
| | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| |
| | 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 get default profile provider without
| | having to know the "name" configured in web.config.
| |
| | TIA!
| |
| |
| |
|
|

Nov 19 '05 #3

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

Similar topics

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...
3
by: Rich Armstrong | last post by:
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, ...
0
by: Rajesh | last post by:
I am trying to use a simple custom type for saving the profile information of a user. The custom class inherits from the Hashtable. I am serializing the type as "Binary" in the provider sections of...
2
by: Darius | last post by:
Hello I implemented custom profile provider based on the example at http://msdn2.microsoft.com/en-us/library/ta63b872.aspx. It reads Profiles values from tables in Sql Server. Everytime when...
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.