Microsoft Developer Network > Forums Home > Commerce Server Forums > Commerce Server 2009 > Error during Creating New Profile Definition
Ask a questionAsk a question
 

AnswerError during Creating New Profile Definition

  • Thursday, November 05, 2009 8:48 AMVanshVijaySagar Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Hi All,

    I have create a new profile definition for RetailerInformation . I have follow these steps properly:

    1 Create table for RetailerInfo under the mysiteprofile database

    2 Create DataObject  underGlobalResource --> Profiles(mysiteprofile)-->ProfileCatalog-->DataSource-->profileservice_SQLSource-->DataObjects for RetailerInfo in the Commerce server manager

    3 Also define the New Data Members under RetailerInfo Dataobject and map with datacoulmn which I have define in the ReatilerInfo Table.

    4 Under profile Definition I create a new Profile defnition for RetailerInfo

    5 Add proerties and give proper attributes to properties, under advance attribute map the data with respective datamember, checked exported and serachable checkboxes for each.

    6 Also add this profile RetailerInfo in the PresentationFile

    7 for athurization run azman and add New Scope for RetailerInfo in profilesystem under the ProfileAthurizationStore.xml

    6 Also define Roles (under Role Definition) ProfileWriter_CSR,ProfileWriter_Adapter,ProfileWriter_BussinessManager and define the definition for each role as Profile_Authoring(for ProfileWriter_CSR),ProfileAdvanced authoring(ProfileWriter_Adapter) and Profile authoring (for ProfileWriter_BussinessManager)

    7 close the azman.
    8 reset the IIs
    9 On open the customer and Order manager under profiles it show RetailerInfo and when I try to create the New profile for RetailerInfo it shows window for add the data.
    10 when I cicking on Save Button , It show an error message

    "An error occured on the server during your operation. Trythe operation again or contact your administrator if the error persists. The details of the error are captured in the event log on the server.

    11 when i look into event viewer the following is the description about error.
     

    Description:
    Microsoft.CommerceServer.ServerFaultException: Permission denied.
     ---> System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Permission denied.
     ---> Microsoft.CommerceServer.ServerFaultException: Permission denied.

       --- End of inner exception stack trace ---
       at Microsoft.CommerceServer.Profiles.WebService.ProfilesWebService.PropagateOrLogExceptionInternal(Exception ex)
       at Microsoft.CommerceServer.Profiles.WebService.ProfilesWebService.PropagateOrLogException(Exception ex)
       at Microsoft.CommerceServer.Profiles.WebService.ProfilesWebService.CreateProfile(XmlElement& profileXml, Boolean inAdapterContext)
       at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
       at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
       at Microsoft.CommerceServer.Internal.Profiles.ProfilesServiceProxy.AuthorizedInvoke(String methodName, Object[] parameters)
       --- End of inner exception stack trace ---
       at Microsoft.CommerceServer.ServiceAgent.TryHandleWebMethodException(Exception ex, SoapHttpClientProtocol serviceProxy)
       at Microsoft.CommerceServer.Internal.Profiles.ProfilesServiceProxy.AuthorizedInvoke(String methodName, Object[] parameters)
       at Microsoft.CommerceServer.Internal.Profiles.ProfilesServiceProxy.CreateProfile(XmlElement& profileXml, Boolean inAdapterContext)
       at Microsoft.CommerceServer.Profiles.ProfileManagementContext.CreateProfile(XmlElement profileXml, Boolean inAdapterContext)
       at Microsoft.CommerceServer.Profiles.ProfileManagementContext.CreateProfile(XmlElement profileXml)
       at Microsoft.CommerceServer.UI.CustomerAndOrdersManager.ProfilesManagementProxy.TryCreateProfile(XmlElement profileXml)

     


    Vijay Sagar

Answers

  • Thursday, November 19, 2009 8:53 AMVanshVijaySagar Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi Bradley,

    Thanks for your kind help...!

    Yes , I have find the solution....

    I have miss to asign the permissions to the new created table.


    Thanks Once Again
    Vijay Sagar

All Replies

  • Thursday, November 05, 2009 9:59 AMRavi Kanth KoppalaMVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Proposed Answer
    Vijay,
    Eventhough the steps mentioned above are correct the error is showing that it has happened due to permission issue. Instead of manually creating scope, can you try CreateProfilesAuthorizationStore.exe to update profile authorization policies
    http://msdn.microsoft.com/en-us/library/cc515165.aspx#CreateProfilesAuthorizationStore

    Hope this helps.

    Regards,
    -Ravi Kanth Koppala
    http://techblog.ravikanth.net (If this post answers your question - Either Mark this post as the answer or vote as being useful.)
  • Thursday, November 05, 2009 10:00 AMLewisBenge Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Have you added your domain user/group to the newly created Azman definitions?
    Follow Me on Twitter: @LewisBenge Or check out my blog: http://www.geekswithblogs.com/pointtoshare/
  • Thursday, November 05, 2009 10:12 AMVanshVijaySagar Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi lewis,

    Thanks for sugegstion!

    I have already added the domain user /group.


    Vijay Sagar
  • Thursday, November 05, 2009 10:34 AMVanshVijaySagar Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Ravi,

    Thanks for your suggestions !

    I have tried through  CreateProfilesAuthorizationStore.exe to update profile authorization policies
     but error is same.

    can you suggest me that I have take these fields in the RetailerInfo

    RetailerId ,RetailerName, RetailerAddress,RetailerCity , dt__date_created , dt_date_last_changed and user_id_changed_by

    is there some specific with created date, chnaged date and user .because data in these fileds are insert or updated by CS itself......?

    so, there may be possible that I am missing on very basic level during creation of profile.............! 
    Vijay Sagar
  • Friday, November 06, 2009 4:51 AMMatt Furnari Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vijay,

    I created your Retailers object in my dev database following the steps you posted, with a couple exceptions:

    1. I used CreateProfilesAuthorizationStore.exe to modify the ProfileWebService authorization store, so that there were no typos.
    2. Instead of creating a Profile Definition from scratch, I copied the Address object. Then I removed the Address fields, added the Retailer fields, and changed the Data Source for the dt_date_created, dt_date_last_changed, and user_id_changed_by fields. 
    3. My web service user is a ProfileAdministrator in the ProfileWebService authorization store. The ProfileAdministrator will have permissions to create Retailers automatically.

    Everything worked right away, no problems. Your steps are correct, overall, but there is a permissions misconfiguration somewhere. Obviously, if you can create other Profile's, then SQL is setup correctly. 

    Try 1) deleting the Retailers node from the authorization store, and recreating with the CreateProfilesAuthorizationStore.exe tool, and 2) making your web service user a ProfileAdministrator. If that doesn't fix it, try recreating the Retailer object using the method I outlined above.

    Good Luck,
    Matt Furnari
  • Wednesday, November 11, 2009 6:31 PMVulupe Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hello,

    I am trying to make a profile definition for 4 hours now.  Somehow i am doing something wrong and i don`t see what yet.
    Matt Furnari, i followed some of your steps. I created a table from the address table named ContactPerson.
    I added it to datasources, and then i created a profile definition from it.
    I added the properties in presentationInfo xml:
     <profile name="ContactPerson" displayName="ContactPerson" description="ContactPersont Object">
        <displayArea name="main" displayName="Main">
             <property name="IdPersoana" displayName="IdPersoana" description=" ID persoana contact" autoGenerateId="true" />
             <property name="Nume" displayName="Nume" description="name" displayByDefault="1" />
             <property name="user_id_changed_by" displayName="Changed By" description="dt_last_changed " readOnly="true" />                 
             <property name="date_created" displayName="Date Created" description="dt_last_changed" readOnly="true" displayByDefault="2" />
             <property name="date_last_changed" displayName="Date Last Changed" description="dt_last_changed " readOnly="true" displayByDefault="3" />
             <property name="csadapter_date_last_changed" displayName="Adapter Date Last Changed" description="dt_csadapter_date_last_changed" readOnly="true" hidden="true" />           
        </displayArea>
      </profile>
    i Ran CreateProfilesAuthorizationStore.exe and iisreset
    I opened the Customers and Orders Manager and i tried to create new profile.
    The CotactPerson was indeed there.
    The problem is that it shows me the IdPersoana and when i try to "Save and close" it says that it does not have a value for the id, and without it it cannot save the object.
    I don`t understand, it should have been "autogenerated" and in the presentationInfo it says so.
    Do you have an ideea why is this happening?
    Thank you very much.

    EDIT:
    Sorry... the ID Property from the profile definition was set as active...
    Now i do not have the ID problem anymore...
    but it led me to the problem that started this topic
    "

    Microsoft.CommerceServer.ServerFaultException: Permission denied.

    ---> System.Web.Services.Protocols.SoapException: System.Web.Services.Protocols.SoapException: Permission denied.

    ---> Microsoft.CommerceServer.ServerFaultException: Permission denied.

    "
    I ran CreateProfilesAuthorizationStore.exe
    but it didn`t resolve anything...

    Second Edit:

    I verified the new created table... on permissions i added Profile_Reader and Profile_Runtime, beacause it was empty.
    I now face another error

    "

    An exception occurred in the 'ProfilesWebService' Web service. Exception details follow:

    System.InvalidOperationException: The current operation resulted in a physical storage table constraint violation.

    Profile Type = 'PersoanaContact'

    Primary Key Property Name = 'GeneralInfo.IdPersoana'

    Primary Key Value = '{3fe8aa37-eb1f-4ac0-8d44-1af4a0d4a1a6}'

    ---> System.Runtime.InteropServices.COMException (0x80040E2F): Value violated the integrity constraints for a column or table.

    at Microsoft.CommerceServer.Interop.Profiles.IProfileObject2.Update()

    at Microsoft.CommerceServer.Internal.Profiles.ProfileStorage.UpdateOnProfilePIA(IProfileObject2 piaProfileObject, ProfileErrorContext ctxt)

    --- End of inner exception stack trace ---

    at Microsoft.CommerceServer.Internal.Profiles.ExceptionMapper.MapAndThrow(COMException ex, ProfileErrorContext ctxt)

    at Microsoft.CommerceServer.Internal.Profiles.ProfileStorage.UpdateOnProfilePIA(IProfileObject2 piaProfileObject, ProfileErrorContext ctxt)

    at Microsoft.CommerceServer.Internal.Profiles.ProfileStorage.CreateProfile(XmlElement profileXml, Boolean inAdapterContext)

    at Microsoft.CommerceServer.Profiles.WebService.ProfilesWebService.CreateProfile(XmlElement& profileXml, Boolean inAdapterContext)

    "
    :((


    Third edit...
    Never mind... it was a nullable field i think . That was the inconsisency.
    It Worked!!!

    Marian VULPE
  • Friday, November 13, 2009 2:08 AMBradley Foley Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Vijay,

    Did you ever find a solution for your problem?

    Brad Foley | www.blfoley.com
  • Thursday, November 19, 2009 8:53 AMVanshVijaySagar Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer
    Hi Bradley,

    Thanks for your kind help...!

    Yes , I have find the solution....

    I have miss to asign the permissions to the new created table.


    Thanks Once Again
    Vijay Sagar