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!
| |
| |
| |
|
|