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


Similar Messages:

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

Forms Data Controls :: How To Add New Table To Profile Provider

Mar 5, 2010

Compared to the use of session variables or query string variables, I'm convinced that profile variables are the slick and easy way to go.

I have a profile provider that's been working great but now I have another page on which I'd like to use more profile variables, which would be based on another table. Is there any way to add another table to the profile provider? I tried creating an additional provider and found out very quickly that only one such section in web.config is allowed. I then attempted to add a new section in the AddName section under Providers but when I tried to use the profile variables in the page, I received an error message that they weren't in the table (referring to the table in the first provider).

View 1 Replies

Web Forms :: Table Profile Provider Writes UserID Twice In Query - Causes Error

May 21, 2010

I get this error while trying to run my project: "Column name 'UserID' appears more than once in the result column list." Indeed, the query generated in my SqlTableProfileProvider.vb is the following (text in brackets [] has been changed):

"IF EXISTS (SELECT 1 FROM [table] WHERE UserId = @UserId) BEGIN UPDATE [table] SET UserID=@Value0, LastUpdatedDate=@LastUpdatedDate WHERE UserId = '[Guid]'END ELSE BEGIN INSERT [table] (UserId, UserID, LastUpdatedDate ) VALUES ('[Guid]', @Value0,
@LastUpdatedDate) END"

I'll emphasize that the above statement is generated in SqlTableProfileProvider.vb, which was written by .Net people. While I have little control over its source, I've apparently given the fodder whereby the mistake can be generated. Any clues as to why UserID is being written twice in the statement?

View 2 Replies

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

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

Web Forms :: Work With Custom Profile Data Table?

Aug 30, 2010

I would like to insert a user's selection of their organization (from a drpt down list) int their profile during the "Create new user" process. Unfortunately, when I tried to do it, I got an error saying that profile columns could not be inserted for anonymous users. The following code doesn't work:

[Web.Config]
[Code]....

[VB]
[Code]....

View 4 Replies

Databases :: Pulling Profile Information From Custom Oracle Table

Jun 4, 2010

I am using asp.net 3.5 and Oracle Providers for membership and roles. Now, using CreateUserWizard i can make user register here but for storing custom information like First name, last name, address etc. i am using couple of custom oracle tables instead of Oracle Profile Provider. In this case, i am using the USERID field which is of GUID type as primary key. Now, my problem is that i dont know how to draw information from my custom oracle tables for those users who are currently logged in. I have searched a lot in this forum and elsewhere where there are many topics relating to it but i failed to follow any of them. So, i would request you to kindly guide me to solve the issue. Oracle Membership

Table(ORA_ASPNET_USERS) USERID=xxxxxxxxxxxxxxx(some guid value) Username=abc and so on.. My Custom Table(UserProfile): USERID RAW(16), --> referenced to USERID field of ORA_ASPNET_USERS table fname varchar2(20) lname varchar2(20) I've the profiles of username "abc" having some userid stored in Userprofile table So, how can i fetch data from UserProfile table for the user "abc" when he is logged in?

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

Web Forms :: Provider Model And Profile DB Tables And SP In SQL Server 2000

Feb 10, 2010

I am using Profile properties in my application... ASP.Net 2.0 , and SQL Server 2005 at my end... well DB production server is SQL Server 2000.. My friend said, 'aspnet_regsql A -p' won't work for SQL Server 2000... I can't check if will work or not...

View 1 Replies

VS 2008 Implement Custom Role Provider And Membership Provider

Sep 27, 2010

I have watched the how to video on Creating a Custom Membership provider. So far it works great. My login control interacts well with it etc. Now i've created a Custom Role Provider. I've created a class that inherits the RoleProvider base class and i've added code to each Sub. My question is, what is the best way to implement the role provider, considering I get the Roles etc from the database?

View 11 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

Web Forms :: Sync Data Between Web And Local Version Of Application - Profile Provider Crashed

Jun 26, 2010

I had to restructure my database so I could synch the data between the Web and local version of my application, which I had carelessly let run amok. I finally get all the records and schema into one database but now that I've done that, my Profile system isn't working anymore. I noticed that the relationships between aspnet_Users and _Membership (and my "profile additional items table") don't exist anymore. I ran the aspnet_regsql.exe utility and registered the DB, and I'm surprised that the registration didn't re-establish the foreign key relationships, etc.

Anyway, if someone can give me pointers on how to restore these relationships or direct me to a source that explains it (i.e., what the foreign keys should be named, if there are any other aspnet_ tables that need to be linked together), I'm pretty sure this would take care of my problem. And I just noticed that nothing is in the aspnet_Profile table. Should I start all over with a new database or is this one salvageable?

View 14 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

Does The .NET SQL Profile Provider Use Caching?

Aug 11, 2010

Does the ASP.NET SQL Profile Provider use caching? I mean if I pull data from the profile for a user will it hit the DB for each request?

I'm looking for a setting or any information on this. I had thought I read it would use cookies but I can't find this now.

Edit: http://msdn.microsoft.com/en-us/library/aa478953.aspx describes process as

When called by SqlProfileProvider.GetPropertyValues, aspnet_Profile_GetProperties performs the following actions:

Queries the aspnet_Applications table to convert the application name input to it into an application ID.

Queries the aspnet_Users table to convert the user name input to it into a user ID.

Queries the aspnet_Profile table for the PropertyNames, PropertyValuesString, and PropertyValuesBinary fields for the specified user.

Updates the user's last activity date in the aspnet_Users table with the current date and time.

View 1 Replies

Net SQL Membership Provider Custom Provider Property

Dec 16, 2010

<profile>
<providers>
<clear/>
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
</providers>
<properties>
<add name="FirstName"/>
<add name="LastName"/>
</properties>
</profile>

I have the code snippet above in my webconfig file. I am attempting to set the FirstName property in codebehind on a register.aspx page. Like this:

Profile.FirstName = ((TextBox)RegisterUser.CreateUserStep.ContentTemplateContainer.FindControl("FirstName")).Text;

VS says Profile is in System.Web.Profile Namespace. I then use it like this "System.Web.Profile.FirstName", but says first name does not exist in System.Web.Profile.FirstName namespace.

How do I set the property and later retrieve it?

View 3 Replies

Create Own Profile Provider Based Upon The Tables

Dec 2, 2010

I am trying to create my own profile provider based upon the tables I have made for my website, I have watched the video and read several articles on creating one, but none of them goes very indepth when you have several tables and groups to profile from. First: I have three groups

1. Employees
2. Customers
3. Applicants

PROBLEM: Video and tutorials don't show how to integrate groups into your profile. Based upon the UserId, I want to load only Table ID's into the profile. IE for a customer it would be

CustomerID from [customer_data]
LocationID from [customer_location]
ContactID from [customer_contacts]......................

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

Is It Possible To Persist Two Profiles With The Profile Provider Model

Apr 26, 2010

I have a website that needs to store two sets of user data into separate data stores. The first set of data is used by the SiteCore CMS and holds information about the user. The second set of data is used by a personalisation application that stores its own user data. The reason they aren't stored together in the same profile object is because the personalisation application is used across multiple websites that do not all use SiteCore.

I am able to create multiple Profile Providers - I currently have one from SiteCore and a custom provider that I have written and these both work in isolation. The problem exists when you try to configure both in the same web.config file. It seems you can only specify a single Profile object in the web.config file, rather than one for each provider. This means that regardless of which provider is being used the .Net framework sends through the profile object that is specified in the "inherits" parameter in the profile section of the web.config file.

My questions are - Is it possible to specify a different Profile object for each Profile Provider? If so, how and where is this specified?

-edit-

I should point out that there is no duplication of data in the two data sets, they are mutually exclusive (excluding email address). The SiteCore data is used solely for this website, but we have company wide profile data that spans across all of our applications, hence the need for a separate second profile object.

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







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