Security :: Custom Profile Data Intellisense Without Using C# Provider?

Jul 19, 2010

I've been experimenting with the ASP.NET profile system and I like how easy it is to add data to the profile programmatically and how to access it again, all in a single line.

However, I've see the input that it sticks in the database and I'm not too keen on it.

I'd really like to create my own separate tables, so everything is nice and logical and easy to access, but I'd still like to be able to access this "profile" data as easily as I could with the ASP.Net profile system.

Should I create some kind of class in a separate class file that does all the hard work, then I can access the information from intellisense?

View 2 Replies


Similar Messages:

Security :: A Custom Profile Provider And Data Disappears?

Aug 6, 2010

The week of torture and confusion at a higher level.I added a custom profile provider.

<profile defaultProvider="MySqlProfileProvider">
<providers>
<remove name="AspNetSqlProfileProvider"/>[code]...

I had to add the <remove name="MySqlProfileProvider"/>as it error with "the entry MySqlProfileProvider has already been made."The problem now is that it will only hold the data the first time I log in and create the account. Everything run find until you close the browser and try to log in the next time. Then the pages that use the profile properties tells me that there is no profile data for the same fields like there name for this user.It was there the first time and save it but the 2nd login it gone. Seems to me that the remove actually removes the data even when you save itI got it to work on the local server by setting MySqlProfileProvider up in using IIS managment tools. My local now rund fine. However my service provider will not make the manual entry for me.

View 14 Replies

Security :: Configuration Error From Custom Profile Provider

Jun 3, 2010

I'm still trying to learn how all of this works, and I apologize if this is a simple fix, but I'm getting frustrated and I could use some help.

I found an XML profile provider that I'm trying to use, and when I set it up, it works fine on my local machine. However when I upload it to the server, I get an error and I don't really know what it means:

Server Error in '/' Application.

Configuration Error
Description:
An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

Parser Error Message: CustomProviders.XmlProfileProvider..ctor()

Source Error:

[Code]....

Source File: E:kundenhomepages28d241331304web.config Line:
38

The full profile section from the web.config file is:

<profile enabled="true" defaultProvider="XmlProfileProvider">
<providers>
<clear/>
<add applicationName="FamilySite" name="XmlProfileProvider" type="CustomProviders.XmlProfileProvider"/>
</providers>
<properties>
<add name="FirstName" />
<add name="LastName" />
<add name="HomeTown" />
<add name="ShowEmail" type="System.Boolean"/>
</properties>
</profile>

View 2 Replies

Security :: Profile Notlist In The Intellisense?

Apr 9, 2010

I could not get the profile work. I add the following profile in web.config

[Code]....

Profile does not list in the intellisense.I did lots of research on it , many said asp.net website template will work, and web application template won't.I am using Visual Studio 2010 and it has only website template.

View 4 Replies

Web Forms :: Custom Table Profile Provider Not Working

Feb 9, 2010

I am trying to use: [URL] I have downloaded the converted to VB files and inserted them in my app_code folder. I created the SQL table and ran both SQL stored procedures Now for the web.config, I already have a connection to my database for the aspnet memberships since I have it on my own database, so I used that for the connection and I did this:

[Code]....

But I get run time errors when I try to set a profile. The error I get is in the SqlTableProfileProvider.vb and it says "Incorrect syntax near ','." Which is really not enough information but that is all what it gives me

<profile defaultProvider="TableProfileProvider">
<providers>
<add name="TableProfileProvider"
type="SqlTableProfileProvider"
connectionStringName="LocalSQLServer"
table="UserProfile"
applicationName="DatabaseProfileProviderTest"/>
<add name="StoredProcedureProfileProvider"
type="SqlStoredProcedureProfileProvider"
connectionStringName="LocalSQLServer"
setProcedure="setCustomProfileData"
readProcedure="getCustomProfileData"........................

View 1 Replies

Web Forms :: Custom Table Profile Provider Has Different UserID?

Feb 11, 2010

I created the Table Profile Provider with the VB.NET and it works perfectly but I have one issue with it.. My Table (UserProfile) can't be linked with any other tables because the UserID on userprofile is different than any other table yet when I do profile.firstname on the vb code it works perfectly. Say for example I have a username called john If I do select * from aspnet_users where username = 'john' The results would come to 2 rows, 1 which has a userid and applicationid that is used on ALL the tables in my database EXCEPT for userprofile The second one would have a applicationid and userid that is only use on my userprofile table.

View 1 Replies

Security :: Get User Info With Custom Provider - Use Provider With Profilecommon?

Apr 16, 2010

I try to get the user profile settings with this code. But all items in it are empty, in the database they are not empty. So there is going something wrong. First of oll how can i add a provider to the ProfileCommon ? Maybe i'm there then... the usrInfo is filled well...

MembershipUser usrInfo = Membership.Providers["MyMembershipProvider"].GetUser(UserName,false);
ProfileCommon prf = (ProfileCommon)Profile.GetProfile(UserName);
LitNaam.Text = prf.Voorletters.ToString() + " " + prf.Achternaam.ToString();

View 2 Replies

Security :: Implement custom Role Provider And Membership Provider?

Dec 1, 2010

i have implemented custom role provider and membership provider .

login page : SignIn.aspx

on successful login it redirects to (index-Homepage.aspx)

now PROBLEM is when it successfully logged in ,and redirects to 'index-Homepage.aspx' it gives Anornymoustemplate ..while its verifying the role correctly in index-Homepage.aspx.cs

View 1 Replies

Security :: How To Use Profile Provider In WebForm Application

Dec 2, 2010

i want to use profile provider in webformapplication

i hear that profile provider can only be used by website

is there some way to use it also in webform application?

i try to useProfileCommon method but i got an error

View 2 Replies

Security :: Using The SQL Table Profile Provider In C# 4 Web Applications?

Sep 6, 2010

Just an FYI for those trying to use the SqlTableProfileProvider in a Web application project. Here's my article:

Using the SQL Table Profile Provider in ASP.NET 4 Web Applications (C# & VB)

[URL]

The complete projects are here:

[URL]

View 2 Replies

Security :: Consume Profile Provider Other Than DefaultProvider?

Apr 3, 2010

I am trying to use two different applications on my website: YAF and GSP(gallery server pro).

This is part of my web.config file:

<profile enabled="true" defaultProvider="YafProfileProvider" inherits="YAF.Classes.Utils.YafUserProfile">
<providers>
<clear/>
<add connectionStringName="yafnet" applicationName="YetAnotherForum" name="YafProfileProvider"

[Code]....

I can access YAF without any problem but I can't access GSP, it says: Anonymous Identification is not supported..

and error source is from YAF profile provider. I don't know why GSP is trying to consume YAF profile provider where it's explicitly show to use SqlProfileProvider..

<profile enabled="true" defaultProvider="YafProfileProvider" inherits="YAF.Classes.Utils.YafUserProfile">

View 1 Replies

Security :: Big Extension Of Membership Provider - Should Use A New Custom Provider

Mar 27, 2010

i'm building an application and i need to manage roles, users and more things so i tought to use the membership provider but i have some questions about it: can i full extend it and can i override the functions to use a database table to store infos about config or i need to build my own provider?

View 4 Replies

Security :: Programmatically Changing The Profile Provider At Runtime?

Aug 25, 2010

I'm using one application but have multiple providers in my web.config for memberships, roles and profiles to allow my application to be used by different groups of users who need to connect to different databases.

This means I'm having to change the membership, role and profile providers on-the-fly in my code-behind files. So far I've taken care of the membership and roles a bit like this:

[Code]....

However, I'm having trouble finding out how to do the same sort of thing for Profiles. I've looked at ProfileProvider and ProfileManager but I can't work it out how to access my the profile property that I've created in my web.config file called "ScreenSize". Normally you would just write Profile.ScreenSize to read or write to the property.

View 12 Replies

Security :: Remove Fields From The C# Profile Provider And Database?

Mar 25, 2010

I have an issue where I am running out of database space on my hosting provider. As it turns out, the aspnetdb database is more than 6x our application database. We are using anonymous profiles and there are 21 fields stored in each user profile.

Upon analysis, most of this data is not required to be stored - it is simply wasting space. The part that is wasting the most space (5 binary objects) are not even used by any of the public users. I would like to remove these binary objects from all of the user's profiles without deleting the profiles, but I can't seem to find any documentation on how to do this.

I can remove the fields, which will take care of users going forward, but I need to retroactively delete these fields from the aspnetdb database to free up space. Since each user manages their own profiles, I am unsure how to create an automated procedure to delete these fields out each anonymous user's profile.

View 1 Replies

Security :: Customer Profile Provider Using Multiple SQL Tables?

Mar 22, 2010

I am trying to create a custom profile provider using multiple sql tables.1. I currently have 3 groups in my profiles (Customer, Employee, Applicant)2. Each group has separate tables for data. Do I need to write one (profile provider) for each group3. As new users are created, do I use the profile provider to store the info, or can I just write the info to the tables, then use the profile select to read and use?4. Anyone have any articles, and tutorials on creating a Custom Profile Provider using Tables that shows how to insert and update into each table?

View 1 Replies

Security :: Table Profile Provider Samples Created By Hao Kung?

Jul 1, 2010

I created a table named Thread to store logged-on users' comments. It has CommentId, Topic, Comment, CreatedTime and UserId columns. I made CommentId as the primary key and UserId as the foreign key to the UnserId in the Membership table aspnet_Users.But when I insert those data into table Thread, I get an error "Cannot insert the value NULL into column 'UserId', table 'ASPNETDB.dbo.Thread'; column does not allow nulls. INSERT fails.The statement has been terminated." I have tried different ways to resolve this, but could not make the UserId in the table Thread match the UserId in table aspnet_Users. Yesterday, I found the Table Profile Provider Samples created by Hao Kung at http://www.asp.net/downloads/sandbox/table-profile-provider-samples. It should be be able to solve my problem. But the code was written in C#. Is there anybody who knows a VB version of this code, or a better way to solve my problem?

View 2 Replies

Security :: Creating A Custom Membership Data Provider?

Apr 18, 2010

so after a short talk with some people around ASP.NET MVC forum I took a huge step and chose to create my own Custom Membership Data provider.. so I logged into sweet google and started searching , it doesnt look that hard and seems totally possible for me , that's what i thought...

So now I opened visual studio , and started to think on few things .. So before I would start typing code , I would like to ask those questionsSo i would know better

1. when I build an SQL object , or XML or w.e object, how do I know which fields I need for my table ? should i just copy them from aspnetdb or is there somewhere it is written?

2. how the heck do I copy lines from webconfig ? and should I get those lines like "reset password" from web config or not?

3. I saw some parameters in "create User" called providerKey or something like that, and also MembershipState ? what exacly are those ?

4. last question: the functions get username , and password and stuff like that , but what If i want to create my own User Entity , is there a way to change what the function gets ? or should i just make another class that get my custom UserEntity and let the first class to send her the userentity as repository ?

View 1 Replies

Security :: Can Implement Custom MembershipUser/custom Roles And Membership Provider

Oct 13, 2010

I create custom principal for implement logic for users. In identity I store Id, Name. But it abnormally - this classes must use for authenticate and authorize.

I can implement custom MembershipUser, custom Roles and Membership provider.

How to do it? What best practices are?

View 5 Replies

Security :: Custom Membership Provider With Custom Controls?

Mar 21, 2010

I'm new to ASP.NET and I don't exactly understand some features.

I have a custom membership provider TestMembershipProvider which inherits from MembershipProvider. It has the following CreateUser method:

[Code]....

It's absolutely simple code.Then I have two text boxes (login, password) and the button to register a new user. I thas a following code:

[Code]....

[Code]....

Authentication in web.config is set like this:

[Code]....

No matter what I write into textboxes, following error is being returned:

The password retrieval question provided is invalid.

I don't know why. Either in web.config or in get RequiresQuestionAndAnswer I have false value. When I instantiate my TestMembershipProvider and call CreateUser directly instead of using static Membership.CreateUser, it works fine. Do I have to use instance of my TestMembershipProvider or did I missed anything?

View 1 Replies

Security :: Accessing Custom Profile Properties?

Mar 5, 2010

We have added some custom profile properties to the web.config - what we want to do is have the code access them once (when user logs in) and cache this so that the code doesn't have to hit the database each time we call Profile.<our custom profile property name>

What we see is a call to GetProperties or GetProfile each time we access Profile. <our custom profile property name> - whats the recommended way to do this?

View 4 Replies

Security :: Save Custom Property Into Member Using Profile?

Jan 14, 2011

I have been struggling to save custom property data into member using createuserwizard. I add some extra fields into createuserwizard using wizardsteps and What I would like to accomplish is to save extra data of that fields and see that data on admin backend of member section of umbraco cms.

What I have done so far in brief:

Created a user control using asp.net createuserwizard and save it to umbraco.

I also added a macro into usercontrol which pulls its data from dropdown list multiple render control data type which has some prevalues.

After selecting values and creating user, none of the selected values of dropdown list multiple render control data type are selected on admin backend but address are successfully saved.

Code behind file:Roles.AddUserToRole(UserName.Text, "BasicUsers");var profile = System.Web.Profile.ProfileBase.Create(UserName.Text);profile["sector"] = Sector.SelectedItem.Value;profile["address"] = Address.Text;profile.Save();

That relevant code snippet above works well like profile["address"] = Address.Text; but I am unable to save with other renders controls as Dropdown list multiple.

View 4 Replies

Security :: Displaying Profile Properties Using Custom SqlTableProfileProvider?

Mar 19, 2010

We've been using the custom SQL table profile provider offered on the MSDN site.No problem configuring the new provider and saving profile values into our custom table while using the Create User Wizard.However, we cannot seem to be able to display the profile properties, using

[Code]....

The user is logged in, and there are no problems displaying all membership values and role values.

View 1 Replies

Visual Studio :: Profile Intellisense Not Working?

Mar 18, 2010

I thought I would try this forum first, but it may be an ASP.NET general question.

I have setup profile in a web.config like the following:

[Code]....

However when I try and reference the profile in a code behind using the "Profile.blah-balh" the intellisense does not pick up the elements I have defined in the web.config.

Intellisense is generally working and does sport the Profile() starting point when typed.

View 1 Replies

Security :: MVC With Custom Membership-Provider?

Oct 27, 2010

i'm new to the mvc framework but i used forms authentification in an asp.net webapplication. Because im forced to use Sybase SQL Anywhere server i use membership / profile / role provider from sybase.Why i can't login in the MVC Application? When i create a user via mvc web control i'm logged in. But when i logout and try to login i get a error that username or password is not correct.Maybe someone has an idea? Could it be a problem with the application name? Both have the applicationname " / " ?Both applications has these web.config entries:

[Code]....

View 3 Replies

Security :: Extend Default Profile Fields Into Second Custom Table

Apr 23, 2010

I am trying to use a second (custom) table to extend my users profile info. This table is in the same database as the 'aspnet_Users' table but has a different name. I create a FK relationship between the 'aspnet_Users' table and my custom table. Here is my web.config code:

<profile defaultProvider="AspNetSqlMembershipProvider">
<providers>
<clear />
<add name="AspNetSqlMembershipProvider"
type="System.Web.Profile.SqlProfileProvider"
connectionStringName="ConString_SQLConnectionString"
applicationName="/" />
<add name="MyCustomProfile"
type="System.Web.Profile.SqlProfileProvider"
connectionStringName="ConString_SQLConnectionString"
applicationName="/"
table="MyProfileTable_Employees" />
</providers>
<properties>
<group name ="MyProfileInfo">
<add name="FirstName" type="string" defaultValue="[null]" customProviderData="FirstName;nvarchar" provider="MyCustomProfile" />
<add name="LastName" type="string" defaultValue="[null]" customProviderData="LastName;nvarchar" provider="MyCustomProfile" />
<add name="EmployeeNumber" type="int" defaultValue="[null]" customProviderData="EmployeeNumber;int" provider="MyCustomProfile" />
</group>
</properties>
</profile>

I have the table "MyProfileTable_Employees" poplulated with data the 'userid' matches to the aspnet_Users table. In my web application (vb), when I type in Profile.MyProfileInfo, there are no custom fields. Actually, when I type profile., there are no profile related entries. What am I missing here? Am I miss-interpting what a custom profile provider is?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved