Ask a questionAsk a question
 

AnswerCannot Extend Web Parts

  • Monday, March 23, 2009 3:51 PMCaptainNimmo Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Ok, i'm not sure what everyone else is doing with extending web parts.  But, by following the actual instructions from MS doesn't seem to work.

    Here are the instructions I've followed:  http://msdn.microsoft.com/en-us/library/dd442325.aspx


    This is the error i get after i've hit step number 10 (testing the site): An error occurred during the processing of . The resource object with key 'WebPartZoneTitle_BottomLeft' was not found.



    Yes, i've got my entire solution signed with my new private/public keys.

    I would really like to use this over CS 2007, but if we cannot extend the web parts...the product will be pretty much useless to us.

    Any thoughts?

Answers

All Replies

  • Monday, March 23, 2009 7:49 PMGustavo Frederico Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Please check that
    - You have the defaultSite.resx file in your 12 hive (12\Resources). I think this is done for you when you activate the Commerce Server Default Site Resources feature (step 8).
    - defaultSite.resx has the entry with <data name="WebPartZoneTitle_BottomLeft" ...

  • Monday, March 23, 2009 8:35 PMCaptainNimmo Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
     Thank you for your reply!  Unfortunately, thats not the issue:(  I was hoping though, but i was able to find the resx file just fine as well as the enter within it.  But, I did manage to look at the Event Log to look for more errors (sure enough i found some).  I think CS is having issues with loading the newly signed assemblies?  Here is one of the error messages in the event log:

    Could not load the assembly 'Microsoft.Commerce.Portal.UI.Profiles, Version=1.0.0.0, Culture=neutral, PublicKeyToken=1406b0c644acf79a'. Make sure that it is compiled before accessing the page.

    That is my new publickeytoken that i've created with the assemblies.  Perhap I messed up that process?  Here are the steps i took to change out the publickeytoken:

    CommerceServerExtenstionKit Solution
    1.  Went to properties, signing on all the projects within this solution
    2.  Checked the Sign the assembly checkbox
    3.  Chose <new> for the "Choose a strong name key file"
    4.  Gave it a name.
    5.  Repeated for every project within the solution.
    6.  Then i generated a Public key from that private key.
    7.  Then i went ahead and added the public key file to every solution (just to keep them together in source control).
    8.  Grabed the publickeytoken from my new public key using sn -t newkey.snk
    9.  Replaced all Instances of the old publickeytoken=31bf3856ad364e35 to my new publickeytoken=1406b0c644acf79a
    10.Saved and complied succesfully.

    Adding my extended wep parts instructions
    1.  Followed the instructions on the http://msdn.microsoft.com/en-us/library/dd442325.aspx site.


    Couple of questions that i've asked and never got a repsonse:

    1.  That is the only publickeytoken i need to replace right? publickeytoken=31bf3856ad364e35
    2.  I've tried both approaches (removing just the microsoftcommercewebparts.wsp and removing BOTH microsoftcommercemossdefaultsite.wsp and microsoftcommercewebparts.wsp) neither one made a differnce.  But, i believe the instructions just means to remove the microsoftcommercewebparts.wsp?

    Any thoughts?
  • Wednesday, March 25, 2009 1:37 PMGustavo Frederico Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    By your description, it seems that your new assembly - Microsoft.Commerce.Portal.UI.Profiles with the new key - is not found.
    I believe step 8 in the documentation ("Redeploy the new WSP file (the one with new key) and activate features.") entails generating a new WSP - this time including your newly compiled assemblies.

    "1.  That is the only publickeytoken i need to replace right? publickeytoken=31bf3856ad364e35"
    I believe so.

    "2.  I've tried both approaches (removing just the microsoftcommercewebparts.wsp and removing BOTH microsoftcommercemossdefaultsite.wsp and microsoftcommercewebparts.wsp) neither one made a differnce.  But, i believe the instructions just means to remove the microsoftcommercewebparts.wsp?"
    I believe you would need to remove both. microsoftcommercewebparts.wsp contains the very web parts, including their packaged assemblies. microsoftcommercemossdefaultsite.wsp contains pages and other artifacts that reference these assemblies. So, since you are changing them, you would remove and redeploy both. Step 8, as I understand it, entails the re-deployment of the new WSP. SharePoint will then re-GAC your new assemblies.
    Please check your GAC that after step 8 you have your new assemblies ( with publickeytoken 1406b0c644acf79a) in the GAC.

  • Wednesday, March 25, 2009 11:02 PMCaptainNimmo Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Thank you so much for your reply!  Yes, I have recompiled the actual extensionkit solution and built the new wsp files.  As far as I know that's all i need to deploy into SP right are the wsp's?  Yes, i've tried both of the wsp files (but thats good to know that I need to replace both).  If i need to replace both do i still need to open the site up in SharePoint Designer to change the publickeytoken there(I still did, just thought i'd ask)?  Unfortunately, yes, i do see my new assemblies GAC'd :(

    Any other ideas?

    Once again, thank you so much for your help.
  • Friday, May 15, 2009 1:50 PMLanjouw, Arno Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    hello!

    Just minutes ago I had the same error, with no solution in this post. Fortunately deactivating the web app features and activating them again did the trick for me.

  • Thursday, September 24, 2009 1:43 AMbmiller435 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I did the same solution: "deactivating the web app features and activating them again did the trick for me." and it worked for me too.
  • Monday, November 02, 2009 6:04 PMMorris Djavaheri Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     

    Which "web app" features did you de/activted? I trid following and still get the error.

    stsadm.exe -o deactivatefeature -name CommerceServerDefaultSiteResourceDeployment -url http://localhost:8283  -force
    stsadm.exe -o activatefeature -name CommerceServerDefaultSiteResourceDeployment  -url http://localhost:8283 force

    stsadm.exe -o deactivatefeature -name CommerceServer -url http://localhost:8283 -force
    stsadm.exe -o activatefeature -name CommerceServer -url http://localhost:8283 -force

    stsadm.exe -o deactivatefeature -name Resources -url http://localhost:8283 -force
    stsadm.exe -o activatefeature -name Resources  -url http://localhost:8283 -force

    Regards

  • Tuesday, November 03, 2009 12:12 PMgmurali Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi

    Where you able to resolve the problem in extending the web part. I face similar problem though I'm able to extend I'm not able to store and retrieve the data with an extended web part.  Pls. share your finding if any.