error activating .wsp file in sharepoint server 2010












0















I developed a sample application in visual studio 2010. I created an Empty SharePoint Project and gave the local site url for debugging. Checked "Deploy as Farm" as the trust level of the SharePoint solution. Added a visual webpart and also a class to the solution. I am able to build and successfully run the application using visual studio. In my local machine am using SharePoint foundation 2010 to debug the SharePoint application.
Now i want to deploy this application in the SharePoint server 2010 which is in a virtual machine.
1. I copied the .wsp file of the application i created to the virtual machine.
2. From the central administrator in the VM I created a web application and the site collection.
3. Then using Site Actions -> Site Settings -> Solution(Galleries), choose the .wsp file for uploading. it showed a "Warning: You should only activate this solution if you trust this solution. An activated solution can read, modify and delete your data. " and the activate button is disabled.



Then I tried to do same in my local machine on a different site collection. Here Activate button is enabled but when clicked it threw exception




Server Error in '/' Application.



This solution contains invalid markup or elements that cannot be deployed as part of a sandboxed solution. Solution manifest for solution 'aee60282-765d-4c9f-b67a-5981f18a6d3b' failed validation, file manifest.xml, line 10, character 4: The element 'Solution' in namespace 'http://schemas.microsoft.com/sharepoint/' has invalid child element 'TemplateFiles' in namespace 'http://schemas.microsoft.com/sharepoint/'. List of possible elements expected: 'FeatureManifests, ActivationDependencies' in namespace 'http://schemas.microsoft.com/sharepoint/'.




What could be this error?










share|improve this question





























    0















    I developed a sample application in visual studio 2010. I created an Empty SharePoint Project and gave the local site url for debugging. Checked "Deploy as Farm" as the trust level of the SharePoint solution. Added a visual webpart and also a class to the solution. I am able to build and successfully run the application using visual studio. In my local machine am using SharePoint foundation 2010 to debug the SharePoint application.
    Now i want to deploy this application in the SharePoint server 2010 which is in a virtual machine.
    1. I copied the .wsp file of the application i created to the virtual machine.
    2. From the central administrator in the VM I created a web application and the site collection.
    3. Then using Site Actions -> Site Settings -> Solution(Galleries), choose the .wsp file for uploading. it showed a "Warning: You should only activate this solution if you trust this solution. An activated solution can read, modify and delete your data. " and the activate button is disabled.



    Then I tried to do same in my local machine on a different site collection. Here Activate button is enabled but when clicked it threw exception




    Server Error in '/' Application.



    This solution contains invalid markup or elements that cannot be deployed as part of a sandboxed solution. Solution manifest for solution 'aee60282-765d-4c9f-b67a-5981f18a6d3b' failed validation, file manifest.xml, line 10, character 4: The element 'Solution' in namespace 'http://schemas.microsoft.com/sharepoint/' has invalid child element 'TemplateFiles' in namespace 'http://schemas.microsoft.com/sharepoint/'. List of possible elements expected: 'FeatureManifests, ActivationDependencies' in namespace 'http://schemas.microsoft.com/sharepoint/'.




    What could be this error?










    share|improve this question



























      0












      0








      0








      I developed a sample application in visual studio 2010. I created an Empty SharePoint Project and gave the local site url for debugging. Checked "Deploy as Farm" as the trust level of the SharePoint solution. Added a visual webpart and also a class to the solution. I am able to build and successfully run the application using visual studio. In my local machine am using SharePoint foundation 2010 to debug the SharePoint application.
      Now i want to deploy this application in the SharePoint server 2010 which is in a virtual machine.
      1. I copied the .wsp file of the application i created to the virtual machine.
      2. From the central administrator in the VM I created a web application and the site collection.
      3. Then using Site Actions -> Site Settings -> Solution(Galleries), choose the .wsp file for uploading. it showed a "Warning: You should only activate this solution if you trust this solution. An activated solution can read, modify and delete your data. " and the activate button is disabled.



      Then I tried to do same in my local machine on a different site collection. Here Activate button is enabled but when clicked it threw exception




      Server Error in '/' Application.



      This solution contains invalid markup or elements that cannot be deployed as part of a sandboxed solution. Solution manifest for solution 'aee60282-765d-4c9f-b67a-5981f18a6d3b' failed validation, file manifest.xml, line 10, character 4: The element 'Solution' in namespace 'http://schemas.microsoft.com/sharepoint/' has invalid child element 'TemplateFiles' in namespace 'http://schemas.microsoft.com/sharepoint/'. List of possible elements expected: 'FeatureManifests, ActivationDependencies' in namespace 'http://schemas.microsoft.com/sharepoint/'.




      What could be this error?










      share|improve this question
















      I developed a sample application in visual studio 2010. I created an Empty SharePoint Project and gave the local site url for debugging. Checked "Deploy as Farm" as the trust level of the SharePoint solution. Added a visual webpart and also a class to the solution. I am able to build and successfully run the application using visual studio. In my local machine am using SharePoint foundation 2010 to debug the SharePoint application.
      Now i want to deploy this application in the SharePoint server 2010 which is in a virtual machine.
      1. I copied the .wsp file of the application i created to the virtual machine.
      2. From the central administrator in the VM I created a web application and the site collection.
      3. Then using Site Actions -> Site Settings -> Solution(Galleries), choose the .wsp file for uploading. it showed a "Warning: You should only activate this solution if you trust this solution. An activated solution can read, modify and delete your data. " and the activate button is disabled.



      Then I tried to do same in my local machine on a different site collection. Here Activate button is enabled but when clicked it threw exception




      Server Error in '/' Application.



      This solution contains invalid markup or elements that cannot be deployed as part of a sandboxed solution. Solution manifest for solution 'aee60282-765d-4c9f-b67a-5981f18a6d3b' failed validation, file manifest.xml, line 10, character 4: The element 'Solution' in namespace 'http://schemas.microsoft.com/sharepoint/' has invalid child element 'TemplateFiles' in namespace 'http://schemas.microsoft.com/sharepoint/'. List of possible elements expected: 'FeatureManifests, ActivationDependencies' in namespace 'http://schemas.microsoft.com/sharepoint/'.




      What could be this error?







      deployment sharepoint-2010






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jul 12 '12 at 7:53









      Marek Grzenkowicz

      14.1k66893




      14.1k66893










      asked Jul 12 '12 at 7:25









      shyamshyam

      1125




      1125
























          3 Answers
          3






          active

          oldest

          votes


















          0














          The "TemplateFiles" element refers to items that will be copied onto the web server. This is allowed for farm solutions (which are deployed via CentralAdmin), but is not allowed for sandboxed solutions (which are deployed via the Solution Gallery).






          share|improve this answer































            0














            When you deploy your wsp with visual studio, you deploy it as farm solution.
            When you deploy your wsp from site settings into solution galery, you deploy it as user solution (sandbox solution) with some limitations :
            first, avoid using out of the box visual webparts, it's prohibited !
            Deploy your wsp by writing powershell script.
            A good starting point here :
            patrickboom.wordpress.com/2010/05/31/using-powershell-to-deploy-sharepoint-solutions-wsp-2/






            share|improve this answer
























            • I used the PowerShell script to add SPSolution and also install SPSolution(no msg was prompted), But I couldn't find the application in the web application.

              – shyam
              Jul 17 '12 at 10:20



















            0














            Le_Fredo is correct here, when attempting to deploy a WSP file into the site collection directly under the site settings, you won't be able to. I found this article from microsoft to be extermely helpful
            http://technet.microsoft.com/en-us/library/ff607688(v=office.14).aspx






            share|improve this answer























              Your Answer






              StackExchange.ifUsing("editor", function () {
              StackExchange.using("externalEditor", function () {
              StackExchange.using("snippets", function () {
              StackExchange.snippets.init();
              });
              });
              }, "code-snippets");

              StackExchange.ready(function() {
              var channelOptions = {
              tags: "".split(" "),
              id: "1"
              };
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function() {
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled) {
              StackExchange.using("snippets", function() {
              createEditor();
              });
              }
              else {
              createEditor();
              }
              });

              function createEditor() {
              StackExchange.prepareEditor({
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader: {
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              },
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              });


              }
              });














              draft saved

              draft discarded


















              StackExchange.ready(
              function () {
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f11446907%2ferror-activating-wsp-file-in-sharepoint-server-2010%23new-answer', 'question_page');
              }
              );

              Post as a guest















              Required, but never shown

























              3 Answers
              3






              active

              oldest

              votes








              3 Answers
              3






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              0














              The "TemplateFiles" element refers to items that will be copied onto the web server. This is allowed for farm solutions (which are deployed via CentralAdmin), but is not allowed for sandboxed solutions (which are deployed via the Solution Gallery).






              share|improve this answer




























                0














                The "TemplateFiles" element refers to items that will be copied onto the web server. This is allowed for farm solutions (which are deployed via CentralAdmin), but is not allowed for sandboxed solutions (which are deployed via the Solution Gallery).






                share|improve this answer


























                  0












                  0








                  0







                  The "TemplateFiles" element refers to items that will be copied onto the web server. This is allowed for farm solutions (which are deployed via CentralAdmin), but is not allowed for sandboxed solutions (which are deployed via the Solution Gallery).






                  share|improve this answer













                  The "TemplateFiles" element refers to items that will be copied onto the web server. This is allowed for farm solutions (which are deployed via CentralAdmin), but is not allowed for sandboxed solutions (which are deployed via the Solution Gallery).







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Jul 12 '12 at 19:25









                  John HollidayJohn Holliday

                  9231817




                  9231817

























                      0














                      When you deploy your wsp with visual studio, you deploy it as farm solution.
                      When you deploy your wsp from site settings into solution galery, you deploy it as user solution (sandbox solution) with some limitations :
                      first, avoid using out of the box visual webparts, it's prohibited !
                      Deploy your wsp by writing powershell script.
                      A good starting point here :
                      patrickboom.wordpress.com/2010/05/31/using-powershell-to-deploy-sharepoint-solutions-wsp-2/






                      share|improve this answer
























                      • I used the PowerShell script to add SPSolution and also install SPSolution(no msg was prompted), But I couldn't find the application in the web application.

                        – shyam
                        Jul 17 '12 at 10:20
















                      0














                      When you deploy your wsp with visual studio, you deploy it as farm solution.
                      When you deploy your wsp from site settings into solution galery, you deploy it as user solution (sandbox solution) with some limitations :
                      first, avoid using out of the box visual webparts, it's prohibited !
                      Deploy your wsp by writing powershell script.
                      A good starting point here :
                      patrickboom.wordpress.com/2010/05/31/using-powershell-to-deploy-sharepoint-solutions-wsp-2/






                      share|improve this answer
























                      • I used the PowerShell script to add SPSolution and also install SPSolution(no msg was prompted), But I couldn't find the application in the web application.

                        – shyam
                        Jul 17 '12 at 10:20














                      0












                      0








                      0







                      When you deploy your wsp with visual studio, you deploy it as farm solution.
                      When you deploy your wsp from site settings into solution galery, you deploy it as user solution (sandbox solution) with some limitations :
                      first, avoid using out of the box visual webparts, it's prohibited !
                      Deploy your wsp by writing powershell script.
                      A good starting point here :
                      patrickboom.wordpress.com/2010/05/31/using-powershell-to-deploy-sharepoint-solutions-wsp-2/






                      share|improve this answer













                      When you deploy your wsp with visual studio, you deploy it as farm solution.
                      When you deploy your wsp from site settings into solution galery, you deploy it as user solution (sandbox solution) with some limitations :
                      first, avoid using out of the box visual webparts, it's prohibited !
                      Deploy your wsp by writing powershell script.
                      A good starting point here :
                      patrickboom.wordpress.com/2010/05/31/using-powershell-to-deploy-sharepoint-solutions-wsp-2/







                      share|improve this answer












                      share|improve this answer



                      share|improve this answer










                      answered Jul 12 '12 at 21:39









                      Le_FredoLe_Fredo

                      63935




                      63935













                      • I used the PowerShell script to add SPSolution and also install SPSolution(no msg was prompted), But I couldn't find the application in the web application.

                        – shyam
                        Jul 17 '12 at 10:20



















                      • I used the PowerShell script to add SPSolution and also install SPSolution(no msg was prompted), But I couldn't find the application in the web application.

                        – shyam
                        Jul 17 '12 at 10:20

















                      I used the PowerShell script to add SPSolution and also install SPSolution(no msg was prompted), But I couldn't find the application in the web application.

                      – shyam
                      Jul 17 '12 at 10:20





                      I used the PowerShell script to add SPSolution and also install SPSolution(no msg was prompted), But I couldn't find the application in the web application.

                      – shyam
                      Jul 17 '12 at 10:20











                      0














                      Le_Fredo is correct here, when attempting to deploy a WSP file into the site collection directly under the site settings, you won't be able to. I found this article from microsoft to be extermely helpful
                      http://technet.microsoft.com/en-us/library/ff607688(v=office.14).aspx






                      share|improve this answer




























                        0














                        Le_Fredo is correct here, when attempting to deploy a WSP file into the site collection directly under the site settings, you won't be able to. I found this article from microsoft to be extermely helpful
                        http://technet.microsoft.com/en-us/library/ff607688(v=office.14).aspx






                        share|improve this answer


























                          0












                          0








                          0







                          Le_Fredo is correct here, when attempting to deploy a WSP file into the site collection directly under the site settings, you won't be able to. I found this article from microsoft to be extermely helpful
                          http://technet.microsoft.com/en-us/library/ff607688(v=office.14).aspx






                          share|improve this answer













                          Le_Fredo is correct here, when attempting to deploy a WSP file into the site collection directly under the site settings, you won't be able to. I found this article from microsoft to be extermely helpful
                          http://technet.microsoft.com/en-us/library/ff607688(v=office.14).aspx







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered May 15 '13 at 15:33









                          ByronAQByronAQ

                          1




                          1






























                              draft saved

                              draft discarded




















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid



                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.


                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function () {
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f11446907%2ferror-activating-wsp-file-in-sharepoint-server-2010%23new-answer', 'question_page');
                              }
                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Florida Star v. B. J. F.

                              Danny Elfman

                              Retrieve a Users Dashboard in Tumblr with R and TumblR. Oauth Issues