none
System.ArgumentException: File or arguments not valid for site template RRS feed

  • Question

  • when create a team site through workflow, I am getting this error

    System.ArgumentException: File or arguments not valid for site template 'Test'. at Microsoft.SharePoint.SPWebTemplateCollection.get_Item(String strKey) at Microsoft.SharePoint.SPWeb.ApplyWebTemplate(String strWebTemplate) at Microsoft.SharePoint.Administration.SPSiteCollection.Add(SPContentDatabase database, String siteUrl, String title, String description, UInt32 nLCID, String webTemplate, String ownerLogin, String ownerName, String ownerEmail, String secondaryContactLogin, String secondaryContactName, String secondaryContactEmail, String quotaTemplate, String sscRootWebUrl, Boolean useHostHeaderAsSiteName) at Microsoft.SharePoint.Administration.SPSiteCollection.Add(String siteUrl, String title, String description, UInt32 nLCID, String webTemplate, String ownerLogin, String ownerName, String ownerEmail, String secondaryContactLogin, String secondaryContactName, String secondaryContactEmail, Boolean useHostHeaderAsSiteName) at Microsoft.SharePoint.Administration.SPSiteCollection.Add(String siteUrl, String title, String description, UInt32 nLCID, String webTemplate, String ownerLogin, String ownerName, String ownerEmail, String secondaryContactLogin, String secondaryContactName, String secondaryContactEmail) at WMP.KNET.ProjectSite.ProjectSiteActions.CreateTeamSiteAction.<>c__DisplayClass1.b__0()

    Help me to reslove it

    Tuesday, April 2, 2013 6:04 AM

Answers

  • Hi Hemendra...

    sorry for delay reply...

    Now I have missing template .stp file...

    so can I able to upload into sharepoint site and resolve the issue

    Thanks!!.

    Tuesday, April 30, 2013 12:38 PM

All replies

  • Hi,

    You might be missing LOCAL ID in your code so try belwo code to create site:

    http://www.sharepointkings.com/2009/02/create-site-programmatically-in-moss.html

    http://blah.winsmarts.com/2007-5-Programatically_create_a_SharePoint_site_based_on_a_site_definition.aspx

    Let us know your result


    Hemendra: "Yesterday is just a memory,Tomorrow we may never see"

    Whenever you see a reply and if you think is helpful, click "Alternate TextVote As Helpful"! And whenever you see a reply being an answer to the question of the thread, click "Alternate TextMark As Answer

    Please feel free to unmark answer if does not resolves your problem.

    Thursday, April 11, 2013 6:59 AM
    Moderator
  • Thanks for your reply...

    Previously it is working fine but now I couldn't see my template name under the custom site template menu.

     

    Thursday, April 11, 2013 7:45 AM
  • Hi,

    If you have WSP package then first retract and uninstall the package then install it again on server and make sure that your feature is activated.

    Here is technet to upgrade or deploy site definition in proper way:

    http://technet.microsoft.com/en-in/library/cc263228%28v=office.12%29.aspx

    Let us know your result


    Hemendra: "Yesterday is just a memory,Tomorrow we may never see"

    Whenever you see a reply and if you think is helpful, click "Alternate TextVote As Helpful"! And whenever you see a reply being an answer to the question of the thread, click "Alternate TextMark As Answer

    Please feel free to unmark answer if does not resolves your problem.

    Thursday, April 11, 2013 8:21 AM
    Moderator
  • LNagammai.

    Does above solution works for you? If yes then please close this thread by marking a post as answer and you can also share your resolution to help other.

    {Moderator}


    Hemendra: "Yesterday is just a memory,Tomorrow we may never see"

    Whenever you see a reply and if you think is helpful, click "Alternate TextVote As Helpful"! And whenever you see a reply being an answer to the question of the thread, click "Alternate TextMark As Answer

    Please feel free to unmark answer if does not resolves your problem.

    Monday, April 22, 2013 7:50 AM
    Moderator
  • Hi Hemendra...

    sorry for delay reply...

    Now I have missing template .stp file...

    so can I able to upload into sharepoint site and resolve the issue

    Thanks!!.

    Tuesday, April 30, 2013 12:38 PM
  • I've fix this error ...

    set_webTemplate("{4B4ADECC-7352-49CC-AB81-9B627E7618F8}#Client Template");

    webTemplate require system name so you have to enter custom template ID also ...with this you can fix this issue .

    Saturday, July 13, 2019 11:06 PM