CodeVerge.Net Beta


   Explore    Item Entry    Members      Register  Login  
NEWSGROUP
.NET
Algorithms-Data Structures
Asp.Net
C Plus Plus
CSharp
Database
HTML
Javascript
Linq
Other
Regular Expressions
VB.Net
XML

Free Download:




Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.security Tags:
Item Type: NewsGroup Date Entered: 1/17/2005 6:04:38 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 1 Views: 12 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
2 Items, 1 Pages 1 |< << Go >> >|
guentherschmidt
Asp.Net User
Getting Profile Connection String1/17/2005 6:04:38 PM

0/0

I'm wondering if there's an easy way to get the value of the connectionStringName attribute of the provider definition. The API seems to expose the name, applicationName and description but not the connectionStringName...

<profile enabled="true" >
<providers>
<add
name="CustomProfileProvider"
type="CustomProfileProvider, CustomProviders.Profile"
connectionStringName="SiteSqlServer"
applicationName="/"
description="Stores and retrieves profile data from the local Microsoft SQL Server database."
/>
</providers>

//properties here
</profile>
Fredrik N
Asp.Net User
Re: Getting Profile Connection String1/17/2005 8:16:51 PM

0/0

No you can't get the conenctionStringName. What you can do it to create your own custom provider where you add a property to get the connection string name.

You can override the Initialize method of the provider and use the config argument passed to the Initialize method to get the connection string name by using the attribute name as a key:



public class MySqlProfileProvider : SqlProfileProvider
{
private string _connectionStringName;

public override void Initialize(string name, NameValueCollection config)
{
this._connectionStringName = config["connectionStringName"];
base.Initialize(name, config);
}

public string ConnectionStringName
{
get { return this._connectionStringName; }
}
}


/Fredrik Norm?n NSQUARED2
Microsoft MVP, MCSD, MCAD, MCT

Cornerstone

My Blog, ASP.Net 2.0 etc
2 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
Beginning ASP.NET 2.0 in VB 2005: From Novice to Professional Authors: Matthew MacDonald, Pages: 1063, Published: 2006
Beginning ASP.NET 2.0 in C# 2005: From Novice to Professional Authors: Matthew MacDonald, Pages: 1148, Published: 2006
Beginning ASP.NET 3.5 in C# 2008: From Novice to Professional Authors: Matthew MacDonald, Pages: 954, Published: 2007
Beginning ASP.NET 3.5 in VB 9.0: From Novice to Professional Authors: Matthew MacDonald, Pages: 1149, Published: 2007
Beginning J2ME: From Novice to Professional Authors: Sing Li, Jonathan Knudsen, Pages: 456, Published: 2005
Pro ASP.NET 2.0 in C# 2005 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1255, Published: 2005
Microsoft Visual C# 2005 Unleashed Authors: Kevin Hoffman, Pages: 692, Published: 2006
Pro ASP.NET 3.5 in C# 2008 Authors: Matthew MacDonald, Mario Szpuszta, Pages: 1498, Published: 2007
Professional ASP.NET 2.0 Security, Membership, and Role Management Authors: Stefan Schackow, Pages: 611, Published: 2006
Professional ASP.NET 3.5: In C# and VB Authors: Bill Evjen, Scott Hanselman, Devin Rader, Pages: 1673, Published: 2008

Web:
Shaykatc's WebLog : VS 2003 Tip #13: Getting a connection string ... VS 2003 Tip #13: Getting a connection string quickly. Often I will be writing some quick code to access a database, and I'll need to add a connection string ...
Profile connection string : Microsoft, Visual Studio 2008, Visual ... Jan 31, 2008 ... Sorry about the cryptic title. I want to use Profile properties in a new web applicaiton. I have it up and running without any significant ...
Setting Membership/Profile/Role provider's connection string at
Setting Membership-Profile-Role provider's connection string at ... May 2, 2008 ... Setting Membership-Profile-Role provider's connection string at runtime. Why would you want to do this? Well perhaps your application uses a ...
Configuring the Profiles Resource Connection String You can use Commerce Server Manager to change the Profiles resource connection string. The Profiles resource connection string is set during the unpacking ...
Path and Connection String Aliases This would be easily accomplished by specifying an alias that maps to an Access connection string for the "Local Webroot" profile, but maps to an SQL Server ...
SQL Server Forums - SSRS ConnectionString Problem In Report Server The other connection string I tried to use in Visual Studio and ... the SQL Server userid "ReadRpt" is not getting authenticated properly. ...
How to get connection string from app.config's But what I want is to be able to use a connection string which is ... configuration to connection string is given with key "quartz. ...
Need help with vb connection string - Digit Online Technology ... can someone please help me with the code below, i am getting error ... Dim ConnectionString As String = "" Dim WorkingDirectory As String ...
Bashir Magomedov's blog: Getting connection string from app.config ... Getting connection string from app.config in .NET 2.0. Suppose, we have following app.config ... Currently live and work in Moscow. View my complete profile ...

Videos:
Mind Power United - Profile Pic - Friends Update http://www.mentaldimension.com (The Mental Gate) http://www.TheLifeAccelerator.com (Silva Mind Method) http://www.MyDivineLife.com (Deepak ...
www.moldytoaster.com lanc and his daughter had just left their seat, and the daughter had taken her father's arm, and both were advancing slowly, towards the middle of ...
Extreme DVLH wrestling sample Classic Luke Hadley wrestling video. http://www.lukehadley.com Hardcore wrestling is a form of professional wrestling that eschews traditional ...
DVLH Classic Classic Luke Hadley wrestling video. http://www.lukehadley.com Hardcore wrestling is a form of professional wrestling that eschews traditional ...
Full Focus: Tax Returns For Sale; New Medicine; Violinist ... new IRS proposal would make this legal with just a signature on a consent form. On Wednesday's Full Focus, it's a marketer's dream -- but could ...
From the DVLH Wrestling vault Classic Luke Hadley wrestling music video from 1997. http://www.lukehadley.com Hardcore wrestling is a form of professional wrestling that eschews ...
Extreme DVLH wrestling sample 2 Classic Luke Hadley wrestling video. http://www.lukehadley.com Hardcore wrestling is a form of professional wrestling that eschews traditional ...
Luke Hadley Wrestling DVD Classic Luke Hadley wrestling video. http://www.lukehadley.com Hardcore wrestling is a form of professional wrestling that eschews traditional ...
Classic Luke Hadley wrestling video (DVLH) Classic Luke Hadley wrestling video. http://www.lukehadley.com Hardcore wrestling is a form of professional wrestling that eschews traditional ...
DVLH volume 1 (WRESTLING) Classic Luke Hadley wrestling video. http://www.lukehadley.com Hardcore wrestling is a form of professional wrestling that eschews traditional ...




Search This Site:









 
All Times Are GMT