none
Sharepoint 2010: Create web pages programmatically of multiple solutions RRS feed

  • Pregunta

  • My problem goes, as the title says, create web pages programmatically of multiple solutions on SharePoint 2010; because when I do deploy one solution the program recognize my site templates and I can create without problems, but when I do deploy two solutions the program not recognize second site templates. Normally I have 50 site templates on 1033 and each solution add 3 templates to 1033, but at the end I only find 53.

    this.webTemplates = site.RootWeb.GetAvailableWebTemplates(1033);
    
    int a = this.webTemplates.Count;
    
    //a = 53    =(
    

    When I re-run the application I find the 56 templates but I need to make deployment both solutions in one and found all templates. So, there some service I have to restart or update some element?

    Thanks in advance!


    • Editado Vale Tejada miércoles, 10 de octubre de 2012 19:39
    martes, 9 de octubre de 2012 22:29

Todas las respuestas

  • Hi,

    When you run your applicattion both solutions are marked as deployed in the farm solutions?

    Regards.

    • Marcado como respuesta Vale Tejada miércoles, 10 de octubre de 2012 19:34
    • Desmarcado como respuesta Vale Tejada miércoles, 10 de octubre de 2012 19:34
    miércoles, 10 de octubre de 2012 14:54
  • Yes, both solutions are marked as deployed in the farm solutions. And as additional info, features are scoped as Site.

    • Editado Vale Tejada miércoles, 10 de octubre de 2012 19:51
    miércoles, 10 de octubre de 2012 19:36
  • Hi Vale.

    Have you look for any error reported in the SharePoint's log?


    "En los momentos de crisis, sólo la imaginación es más importante que el conocimiento"

    lunes, 15 de octubre de 2012 10:06
    Moderador
  • Hi Santiago,

    Yes, but there's no error.

    lunes, 15 de octubre de 2012 19:04
  • It could be a problem as simple as strange, I think the problem is the first solution is blocking the folder and the second solution can't access there at the same time. So, the first time you deploy both solutions, the first solution blocks the folder to deploy templates, and the second solution can't access to that folder. The second time you deploy the solution, the first solution doesn't block the folder because templates exists and the second solution can block the folder to deploy templates.

    Can you try this? 

    • Deploy both solutions (for the firs time), so you will have 53 templates. (Now, if you deploy both solutions again, you may have 56, but, try my second step to test the behaviour)
    • Make some changes to the templates of the first solutions. Those templates are the 3 installed and, if you make changes, they would be updated.
    • Deploy both solutions again. I think, with these steps, templates of the second solution won't be installed
    • Can you tell what's the result?

    "En los momentos de crisis, sólo la imaginación es más importante que el conocimiento"

    lunes, 15 de octubre de 2012 23:01
    Moderador
  • Hi Santiago,

    Sorry for not replying sooner, I have a lot of work..

    Well, I've try your solution, but the folder isn't block. The site templates of the second solution copy normally, when I close the application all the site templates are there.

    To understand better, I use this PowerShell Command:

    $siteTemplates = Get-SPWebTemplate
    $siteTemplates.count
    Before to deploy the result is 50, in the process 53 and when I close the application is 56.


    • Editado Vale Tejada lunes, 22 de octubre de 2012 20:25
    lunes, 22 de octubre de 2012 20:15