473,729 Members | 2,353 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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.cur rent.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 1976
Hi Param,

Welcome to ASPNET newsgroup.
From your description , you're wantting to programmaticall y 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.Prof ile.ProfileMana ger class. The
below code can help get the current configured default Profile Provider and
all the configured ProileProviders :

=============== ==
protected void Page_Load(objec t sender, EventArgs e)
{
Response.Write( "<br>DefaultPro file: " +
System.Web.Prof ile.ProfileMana ger.Provider.Na me);

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

foreach (System.Web.Pro file.ProfilePro vider pp in
System.Web.Prof ile.ProfileMana ger.Providers)
{
Response.Write( "<br>" + pp.Name);
}
}

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

In addition, for getting configuration info in web.config or uplevel
configuration, we can also utilize the
System.Configur ation
and System.Web.Conf iguration 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***@communit y.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.publi c.dotnet.framew ork.aspnet
| NNTP-Posting-Host: corp2.lazardgro up.com 70.182.148.88
| Path: TK2MSFTNGXA02.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGP12.phx. gbl
| Xref: TK2MSFTNGXA02.p hx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:3567 23
| X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
|
| Hi all,
|
| How can I get a reference to my custom profile provider in my .aspx page?
I
| have looked at httpcontext.cur rent.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.publi c.dotnet.framew ork.aspnet
| Message-ID: <dw************ **@TK2MSFTNGXA0 2.phx.gbl>
| Newsgroups: microsoft.publi c.dotnet.framew ork.aspnet
| Lines: 64
| Path: TK2MSFTNGXA02.p hx.gbl
| Xref: TK2MSFTNGXA02.p hx.gbl
microsoft.publi c.dotnet.framew ork.aspnet:3569 13
| NNTP-Posting-Host: TOMCATIMPORT1 10.201.218.122
|
| Hi Param,
|
| Welcome to ASPNET newsgroup.
| From your description , you're wantting to programmaticall y 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.Prof ile.ProfileMana ger class. The
| below code can help get the current configured default Profile Provider
and
| all the configured ProileProviders :
|
| =============== ==
| protected void Page_Load(objec t sender, EventArgs e)
| {
| Response.Write( "<br>DefaultPro file: " +
| System.Web.Prof ile.ProfileMana ger.Provider.Na me);
|
| Response.Write( "<br>All Profiles: " );
|
| foreach (System.Web.Pro file.ProfilePro vider pp in
| System.Web.Prof ile.ProfileMana ger.Providers)
| {
| Response.Write( "<br>" + pp.Name);
| }
| }
|
| =============== =
|
| In addition, for getting configuration info in web.config or uplevel
| configuration, we can also utilize the
| System.Configur ation
| and System.Web.Conf iguration 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***@communit y.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.publi c.dotnet.framew ork.aspnet
| | NNTP-Posting-Host: corp2.lazardgro up.com 70.182.148.88
| | Path: TK2MSFTNGXA02.p hx.gbl!TK2MSFTN GP08.phx.gbl!TK 2MSFTNGP12.phx. gbl
| | Xref: TK2MSFTNGXA02.p hx.gbl
| microsoft.publi c.dotnet.framew ork.aspnet:3567 23
| | X-Tomcat-NG: microsoft.publi c.dotnet.framew ork.aspnet
| |
| | Hi all,
| |
| | How can I get a reference to my custom profile provider in my .aspx
page?
| I
| | have looked at httpcontext.cur rent.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
2237
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 2.0 such as Login, Loginuser, Loginview, etc. The ASP.NET provider model requires entries in the web.config for a 'connectionStringName', which I understand is utilized to connect to the data source. Problem is the client machine (machine A)...
0
1684
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 specified date. - DeleteProfile. Enables you to delete a profile associated with a specified username. - DeleteProfiles. Enables you to delete a set of profiles. - FindInactiveProfilesByUserName. Returns a collection of ProfileInfo
0
2570
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 than a specified date. - DeleteProfile. Enables you to delete a profile associated with a
0
1155
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 date/time for the profile using Profile.LastUpdatedDate I receive the following error. Invalid column name 'PropertyNames'. Invalid column name 'PropertyValuesString'. Invalid column name 'PropertyValuesBinary'.
3
1913
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, ProfileCommon profile = this.Profile; in my Page_Load method, profile is always null. My web.config file contains the following section:
0
1425
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 the web.config. When I add a key-value to the custom type, I can see that its being saved in the database (aspnet_profiles table - PropertyValuesBinary column). But, when I want to read the information in the profile, my custom type object is...
2
1674
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 I read Profile property (e.g. string Name = Profile.FirstName) GetPropertyValues function is called. However after this function SetPropertyValues is also called. It does not make sense why this method should be called even if I do not update...
10
7246
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 to using an exising SQL 2000 database, which works for the basic fields (username, pw, email, etc). However, I need to add more information (phone number, age, etc). In reading the existing discussions, I can see the valid reasons for storing...
9
3270
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 these are similar: Create a new class (MyMembershipProvider and MyProfileProvider). Add the "Inherits..." value to the provider (MembershipProvider and ProfileProvider). Modify the web.config file to assign this class and it's connection...
0
8917
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8761
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9281
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9200
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8148
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6022
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3238
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2680
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.