How to create custom profile provider for fba user

Hello Every One
  I have one SharePoint 2010 web application and on this FBA is configured. With help of code how can I get and set custom property for a user in
 “aspnet_Profile” table in Database.
I have also try this config setting in web.config but not able to set or get profile property.
<anonymousIdentification enabled="true" />
<profile defaultProvider="AspNetSqlProfileProvider">
<providers>
<clear />
<!--<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="fbaSQL" applicationName="/"/>-->
<add name="Demo_ProfileProvider" connectionStringName="fbaSQL" applicationName="/" type="System.Web.Profile.SqlProfileProvider,System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
<properties>
<add name="ThemeName" type="String" allowAnonymous="true" />
<add name="NoOfVisits" type="int" allowAnonymous="true" />
</properties>
</profile>
</system.web>
thanks
navaratan
Navaratan Sharma

Solution for this problem is
do following entry in web.config
<anonymousIdentification enabled="true" />
<profile enabled="true" defaultProvider="AspNetSqlProfileProvider">
<providers>
<clear />
<!--<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="fbaSQL" applicationName="/"/>-->
<!--<add name="Demo_ProfileProvider" connectionStringName="fbaSQL" applicationName="/" type="System.Web.Profile.SqlProfileProvider,System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />-->
<add name="AspNetSqlProfileProvider" connectionStringName="fbaSQL" applicationName="/" type="System.Web.Profile.SqlProfileProvider,System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</providers>
<properties>
<add name="ThemeName" type="String" allowAnonymous="true" />
<add name="NoOfVisits" type="int" allowAnonymous="true" />
</properties>
</profile>
</system.web>
code for get and set Profile property is
protected void OnClickbtn(object sender, EventArgs e)
try
ProfileBase profile = System.Web.Profile.ProfileBase.Create(HttpContext.Current.User.Identity.Name);
profile["ThemeName"] = txtTheme.Text;
profile["NoOfVisits"] = int.Parse( txtNoOfVisits.Text);
profile.Save();
catch (Exception ex)
protected void OnClickbtnGet(object sender, EventArgs e)
try
ProfileInfoCollection profiles = ProfileManager.GetAllProfiles(ProfileAuthenticationOption.All);
foreach (ProfileInfo profileInfo in profiles)
ProfileBase profile = ProfileBase.Create(profileInfo.UserName);
// add condition for user
txtTheme.Text = (string)profile.GetPropertyValue("ThemeName");
txtNoOfVisits.Text = Convert.ToString((int)profile.GetPropertyValue("NoOfVisits"));
SPUser user = SPContext.Current.Web.CurrentUser;
catch (Exception ex)
thanks
navaratan
Navaratan Sharma

Similar Messages

  • How to Create Roaming Profile(s) For Windows Workgroups

    This Tutorial Shows how to create roaming profile(s) for Windows Workgroups.
    Here are the steps in order to do this:
    On the host PC:
    1. Goto 'Folder Options'>'View' and un-tick 'Use Simple File Sharing'.
    2. Goto Network Connections and right click on the 'Local Area Connection' (Ethernet recommended)
    3. Goto Properties>General, and tick 'File and Printer Sharing'.
    Click Apply + Ok.
    4. Goto Control Panel>User Accounts, add a new user.
    5. Logon to this user, and open the profile folder properties.
    5b. Share this folder.
    6. Make the Share permissions so that 'everyone' has: Full Control, Read, Change.
    Click Apply + Ok.
    7. Click on 'Caching' and disable Caching for this Share.
    Click Ok.
    8. Now goto the 'Security' tab and give 'Administrator' and 'SYSTEM' 'Full Control'.
    Click Apply + Ok.
    On the remote PC(s):
    1. Make the same User as on the Host.
    1b.Logon to the account and log back out again. Delete the profile folder from 'Documents and Settings'.
    3. Give 'SYSTEM': 'Read','Read and Execute','List Folder Contents' to the 'Administrators' Profile
    4. Type 'lusrmgr.msc' into run, goto: 'Users', double click on the new user and goto the 'Profile' tab.
    4b. In the 'Profile Path' box, type \\hostPCname\ProfileName.
    Click Apply + Ok
    *Note* Replace the \\path\ accordingly to what names are on your Host PC.
    5. Goto regedit>HKLM\Software\Microsoft\Windows NT\CurrentVersion. Double click
    on 'ProfileList'.
    Find which key is for the new user. (Example S-1-5-21-58435627-18431725-18026167-1003)
    6. Right click that key and goto: 'Permissions' and give 'SYSTEM' 'read'.
    *Note* Once you logon to the roaming profile from the remote PC for the first time you can undo this step.
    7. goto GPEdit>Computer Configuration/Administrative Templates/System/User Profiles:
    Enable these settings:
    'Do not check for user ownership of roaming profile folders'
    'Delete cached copies of roaming profiles'
    'Log users off when roaming profile fails'
    "Add the Administrators security group to roaming profiles'
    'Prevent roaming profile changes from propagating to the server'
    7b. Make 'Timeout for dialog boxes' '1' (seconds)
    8. goto: Computer Configuration/Security Settings/Local Policies/Security Options:
    Make 'Number of previous logons to cache (if server is unavailable) '0'
    Now you're ready to login to the Profile on the remote PC.
    *Note* Sometimes, when windows loads it takes a minute for the profile folder to become shared again.
    Thanks for reading.

    Hi,
    I have replied to the below thread mentioning the FM's to create Profile sets, profiles and also target groups. This may be helpful to you.
    Re: target group creation
    Regards,
    Priyanka

  • How to create customer master data for walking customer in retail

    hi experts !!!!!!
    for retail industry e.g books trading industry
    how to create customer master data for walking customer in retail
    its dummy or one time customer
    if i create one time customer then same customer number can i use for every new order and every new customer how ?????
    thanks

    Dear Hanumant,
    As per my view,,
    You can use one time customer functionality to full fill your requirement.
    When you create sales order with one time customer system take you to the customer data maintanence screen through that you can maintain the one time customer data.
    Same one time customer number you can use for every new order through maintaining different data.
    I hope this will help you,
    Regards,
    Murali.
    Edited by: Murali Mohan.Tallapaneni on Dec 19, 2008 6:08 AM

  • How to create a profile set for a campaign.

    HI  Friends,
    I am working on CRM 7.0.
    My requirement is to create a Batch program for  campaign creation and automation.
    i have used the class 'cl_crm_mktpl_appl_base' to copy the existing campaign .
    It copied the entire target groups,campaign  elements, profile sets.
    My requirement is for the created campaign id, i need to create a profile set in that i need to create target goups.
    Fm : BAPI_PROFILESET_CREATE is not helpful for me in my case.bacause it is asking parent guid ..etc...
    I have ony one guid ,ie. campaign guid . if i give this in parent guid it is thriwing error.
    can any suggest how to create a custom profile set.
    If any one  worked on this batch program please reply to this thread.
    Edited by: jagadheeswara raju on Feb 10, 2010 7:02 PM

    Hi,
    I have replied to the below thread mentioning the FM's to create Profile sets, profiles and also target groups. This may be helpful to you.
    Re: target group creation
    Regards,
    Priyanka

  • How to create custom BOL object for dynamic query in CRM 7.0

    Hi,
    Could anyone please explain me with steps that how to create the custom BOL object for dynamic query in CRM 7.0, I did it in previous version but its throwing exception when i try to create the object of my dynamic query class. I just defined the entry of my in crmv_obj_btil to create the dynamic query BOL object. do i need to do any other thing also to make it work?
    Regards,
    Kamesh Bathla
    Edited by: Kamesh Bathla on Jul 6, 2009 5:12 PM

    Hi Justin,
    First of thanks for your reply, and coming to my requirement, I need to report the list of items which are there in the dynamic select statement what am getting from the DB. The select statement number of columns may vary in my example for different countries the select item columns count is different. For US its '15', for UK it may be 10 ...like so, and some of the column value might be a combination or calculation part of other table columns (The select query contains more than one table in the from clause).
    In order to execute the dynamic select statement and return the result i choose to write a function which will parse the cursor for dynamic query and then iterate the values and construct a Type Object and append it to the pipe row.
    Am relatively very new for these sort of things, welcome in case of any suggestions to make it simple (Instead of the function what i thought to work with) also a sample narrating the new procedure will be appreciated.
    Thanks in Advance,
    mallikj2.

  • How to create a parameter id for a user

    Can anyone tell me how to create a Parameter id. I want to set some parameters for a user for that need to have parameter id.
    Please tell me the steps to create the Parameter id.
    Kiran

    Hi Kiran,
    U can do this using the TCODE SU3.
    1. Goto SU3.
    2. Goto the parameters Tab.
    3. Provide the Parameter ID and Parameter Value.
    4. Save.
    Its done!!!..
    Cheers,
    Krithiga.
    ***Pls reward points if this is useful.

  • How to create different log files for different users in log4j

    I want to create different logs for different users, using different appenders for each user so that logs are created in his file only.
    Confusion:How to direct them to different files in my logger class

    Hi Avi,
    First of all I have given a first reading to log4j and I think there will some more easy way of logging debugging messages than log4j (If you could provide me a detailed explanation of a servlet,jsp,java bean that uses log4j and how to use log4j then it will be very helpful for me). The other easy ways (if I am not using log4j) to my problem i.e creating different log files for each of web applications deployed in oc4j are
    I have created multiple instances of OC4J that are configured to run on different ports and so on each instance I have deployed a single web application . And I started the 2 oc4j instances by transferring thier error/log messages to a file. And the other way is ..
    I have download from jakarta site a package called servhelper . This servhelper is a thread that is started in a startup servlet and stopped in the destroy method of that startup servlet. So this thread will automatically capture all the system.out.println's and will print those to a file. I believe that this thread program is synchronized. So in this method I need not run multiple instances of OC4J instead each deployed web application on single instance of oc4j uses the same thread program (ofcourse a copy of thread program is put in each of the deployed web applications directories) to log messages on to different log files.
    Can you comment on my above 2 approached to logging debugging messages and a compartive explanation to LOG4J and how to use LOG4J using a simple servlet, simple jsp is appreciated ...
    Thanks and Regards,
    Ravi.

  • How to create an encrypted key for a user table

    I have an airshow website where volunteers and vendors can apply online (www.hollisterairshow.com) . The city attorney requires that we have a wet signature on a printed application form so the volunteer/ vendor currently has to print their application at the time they apply online, then sign it and mail it in and this works fine. Unfortunately, we have had a lot of instances where volunteers/ vendors needed to print their application again and the only way we could do this was for an administrator to print their application to a pdf file and e-mail the file to them. So, I'd like to improve this process by automatically sending an e-mail to the applicant when they apply online with a link to a printable page and containing a key pointing to their application. This way, volunteers/ vendors could print and sign their application whenever they want and as many times as they need to. Each volunteer is a single row in a volunteer table and each vendor is a single row in a vendor table.
    The key I use in the tables is a sequential key automatically incremented by MySQL so I would end up sending them a link looking something like www.hollisterairshow.com/printvolunteerapp.php?volunteernumber=27 . This would work, but it wouldn't be hard for a volunteer to change it to a different volunteernumber and so get access to someone else's personal information, which would not be acceptable. So, I'm thinking I need a secondary key that is somehow scrambled and used as an secondary index in the table so I'd be sending a link that mght look like www.hollisterairshow.com/printvolunteerapp.php?volunteerkey=sygew . So I'd really appreciate some advice on how to create a scrambled secondary index for each volunteer or vendor and plug it into the link I send them in the e-mail.
    Thanks for any advice.
    Tony

    Your question is not clear whether you want to create account or you want to create agent.
    For creating local agent you can refer
    http://bhabaniranjan.com/configure-odi-11g-local-agent/
    For creating EE Agent you can refer
    http://bhabaniranjan.com/configure-odi-java-ee-agent-on-windows-server-2008-64-bit/
    For creating account, login to supervisor and then go to security tab. There you can create different user to login to odi Studio. Let me know If i understand you correctly or not.
    Thanks.

  • How to create new groups (list) for storing user's data?

    Hi,
    I'm using cq-5.4 and I was undertaking the campaign management tutorial which explains about how to send out a weekly news letter. As a part of that I was creating a sign up form for subscribers to fill out. So after filling up that form, user's data would get stored somewhere and eventually that data will be used while sending out the weekly news letters to him.
    This was the link I was referring to for that,
    http://dev.day.com/docs/en/cq/5-4/wcm/campaigns.html#Create a Sign Up Form
    So on that link, the 3rd screenshot talks about how to set the form action. They have for example set the form action to 'Create and Update Account' and accordingly under 'Action Configuration', 'geometrixx newsletter' is assigned as the 'Initial Group'. But they never talked about how to create the 'geometrixx-newsletter' group? Where to create that group etc. Hence, after completing the form when I press submit, nothing happens. In reality whatever data I entered should've got stored in the 'geometrixx newsletter' group.
    So that is the place where I'm stuck. Can someone tell me how and where should i create this group?
    Thanks!

    Hi,
    Thank you for posting the screen shots I have been unsuccessful in determining exactly where the problem is coming from. Would it be possible for you to post the actual VI so that I can work with it so see if I can reproduce this issue using your code? In regard to your questions:
    1.    You are correct 1000 samples read should write 1000 samples to the table
    2.    I believe the discrepancy is due to amount of manipulation done between the read and the file write but I cannot be certain, without the code to work with.
    3.     I am unclear as to exactly what is happening. If you are reading empty channels then you may receive erroneous readings this is to be expected. When you connected your accelerometer did you connect in RSE or differential? You can also manipulate the signal range with will affect the gain setting, how off are the readings?
    JaceD
    Signal Sources Product Support Engineer
    National Instruments

  • How to create shortcut desktop icon for all users???

    Hello All,
    I want to know how to create shortcut icon for all users in windows 7. I tried C:\Users\Public but no folder for Desktop.
    Thanks

    C:\users\All users
    JS
    Hi,
    I am just wondering, what is the technically correct location to place say, a shortcut, for all users to access on their desktops on a given machine?
    Is it C:\Users\Public\Desktop ?
    Or is it C:\Users\All Users\Desktop ?
    Would it also be possible to explain the differences as well? Or paste some links to the overview of each one? I am having trouble finding anything from MS.
    Thank you.

  • How to create custom GUI interface for Cisco router?

                       Hello,
    I am working on a Cisco solution and I have my router configured for the solution I need. However, if a non-cisco person needs to use my solution then I think he will need a GUI interface which will have few "buttons" which when clicked will run some Cisco commands on Cisco router to make it work. Is there a way to design such GUI interface which is compatible with Cisco routers? I know Cisco has SDM, but that is too involved and detailed, which is useful only for people who know atleast a little bit about Cisco. Here I am looking at crowd who will have 0 knowledge of Cisco.
    Please let me know if something like this can be done. If yes, how and how easily?
    Thank you.

    There are lots of ways to do this - you can use SNMP or even HTTP to push or pull commands from Cisco devices. How easy it is to create a GUI depends on your programming skills. I would guess a simple web page triggering backend scripts would be the easiest way to do this.

  • How to Create Custom Timer Job for SharePoint 2010 using Visual Studio 2010?

    While creating timer job Visual Studio showing some kind of error and assembly issues.

    Hi Aryav
    Please provide the errors so that we can resolve your issue.
    Meanwhile go through the step by step process of creation of Timer Job in the articles given below.
    Create and Deploy Custom Timer Job Definition in SharePoint Programatically
    Indul Hassan
    Microsoft Community Contributor
    http://www.indulhassan.com
    You Snooze.. You Lose !!

  • How to create custom audit rule for the following in jdeveloper ESDK

    Hi,
    I need customized audit rule which uses Oracle Jdeveloper 11.1.2.0 with ESDK extension. Can any one help me please.
    The following is the audit rule I need.
    I should not use any where "+" for concatenating more than one string in our project.
    How can I achieve this.
    Thanks in advance.
    Lakshmi Narayanan.

    Hi,
    see
    http://blogs.oracle.com/jdevextensions/entry/don_t_fear_the_audit
    http://blogs.oracle.com/jdevextensions/entry/don_t_fear_the_audit1
    Frank

  • How to create custom Data Control for Iterator?

    Hi,
    I have seen somewhere that is possible to customize set of data controls for all iterators in Data Controll Palette e.g. by adding custom data control (I remember JDev uses Velocity to display data controls). Is there any documentation or tutorial how to do it. Meybe any Oracle ACE will write some steps on his blog.
    Kuba

    I'm looking for any documentation or better some examples to customize files:
    jdev/system/oracle.adfm.dt.faces.10.1.3.41.57/jsp_databinding_templates.xml
    jdev/system/oracle.adfm.dt.faces.10.1.3.41.57/faces_creator_configuration.xml
    This customization may be very useful while developing appliations
    Kuba

  • User Profile Synchronization for FBA Users in SharePoint 2010: Any successes?

    Ok, so I've got my user profiles importing using forms authentication and my configured authentication provider (ActiveDirectoryMembershipProvider) and profiles are importing (account name is domain\username).
    However when the user logs in they don't receive this profile. Instead a second one is created in the format i:0#.f|provider|username and is not synced to their AD account (our business requirements require that we use FBA for authentication against Active
    Directory).
    Has anyone tried or had any success in syncing FBA profiles?

    I opened a support case on this issue and talked with Microsoft support (for 5 days).
    What they told me is that you can NOT have both Windows accounts and FBA LDAP accounts both synchronize with the same Active Directory. The reason they say is that the account GUIDs are the same and the UPS will see that as a duplicate so it does not add
    the LDAP account after the same Windows account has been synchronized into the profile database.
    They tell me I have to write a script to synchronize the FBA LDAP accounts. I told them this is a product defect and I shouldn't have to write a script to do what the Profile Service is suppose to do out of the box. Microsoft needs to provide a hotfix for
    this defect.
    Andy Fitch

Maybe you are looking for