Site collection creation is slow

I've notice when creating a site collection either manually, with powershell or programmatically with the API, it can take 2-3 minutes to complete. If I compare this to our on-premise SharePoint 2010 solution, we can create site collections in 30 seconds
or less.  Now, I can appreciate that SharePoint online is a far more complex architecture than our on-prem solution, but one would think that the complexity and performance behind SharePoint online would equate an experience the same, if not better
than on-prem. 
We have a custom solution around site creation/document injection to help our sales team with potential leads and deals and they have been accustomed to a 2 min or less wait time and now they are not so excited about having to wait up
to 5x longer as we migrate to SharePoint online.
Anyone from MSFT that would like to chime in on why it takes 2+ minutes to create a site collection and what might be going on behind the scenes that is introducing this delay?  Any hope in the future we can see this wait time improve?  Curious
what has been told to other customers of SharePoint online that have noticed this delay?
To anyone else in the forums who create many site collections programmatically, (perhaps on a daily basis) , do you struggle with the wait time as well with SharePoint online?
thanks.. Jeff

Are you creating a site collection with an out of the box template? Does it take this long to create a Team Site or Publishing Site?
Can you describe your custom solution around creation/document injection? How does this interact with SharePoint? Does it install code within SharePoint?
Jason Warren
@jaspnwarren
jasonwarren.ca
habaneroconsulting.com/Insights

Similar Messages

  • Help needed on Host Named Site Collection creation --- please help

    Hi Friends,
    Question 1
    Can we create Host Named Site Collection following the pattern below?
    We will have three Department head Host Named Site Collections, names –
    HRHead.ourdomain.com
    MarkettingHead.ourdomain.com
    AdminHead.ourdomain.com
    Under each of these department head sites, there will be 3 or 4 Host Named Site Collections. The site structure will be like:
    HRHead.ourdomain.com

    HR1.ourdomain.com

    HR2.ourdomain.com

    HR3.ourdomain.com
    MarkettingHead.ourdomain.com

    MarkettingProduct1.ourdomain.com

    MarkettingProduct2.ourdomain.com
    AdminHead.ourdomain.com

    AdminCountry1.ourdomain.com

    AdminCountry2.ourdomain.com

    AdminCountry3.ourdomain.com
    Question 2
    If we want to use common template (like header, footer, company icons) for inner sites (e.g. AdminCountry1.ourdomain.com, AdminCountry2.ourdomain.com, AdminCountry3.ourdomain.com) how to create that template for Host Named Site Collection? If these were
    sub sites, we can take help of site templates. But these are Host Named Site Collections, how to use common design for Host Named Site Collection?
    Any hint from you will be really helpful. Thanks for your comments.

    Yes you should be able to create a site collection using a custom template.  Here's a BLOG on how to create a site collection with a custom template in 2010.  It should still work the same way.
    http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=218
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • Create a site collection with dedicated content db with the help of server object model

    Hi,
     I have a requirement to implement a create a new site collection with dedicated content db. i have got 2 PowerShell scripts which does the same. first i will  create a content  db and then create the sitecollection with contentdb
    parameter with the created contentdb name.
    Now the site collection created must contain few doc libs and few splists with look up columns, people picker data type, multiline of text, single line of text,choice field. hence i am thinking the below approach:
     1) create a web template and include sp doclibs, splists , site columns in this.
     2) i am thinking of a ui design to create the below:
     These are called "projects" which is actually the site collection with the doclibs, splists and must be created by sharepoint admin on click of a link in my landing page.end users access these "projects"  aka 
    "site collections" and uploads the documents into these projects and collaborate.
    so my question is :  On click of a button can I create a site collection with a dedicated content db based on the web template created with the  hel of  server  object model?
    The other approach is on click of this button call the power shell script which accepts the sitecollection name and contentdb name as parameter. is this possible in  server obj.model ?
    passing a paramter from code behind- visual web part ui to power shell ?
    and it should create the site collec based on the web template and create the content db.
    my doubt #3 : will it not throw error "request timed out" when creating the site collec and contentdb from ui ?

    Try below:
    http://sharepoint.stackexchange.com/questions/21606/programmatically-create-a-site-collection-in-an-existing-mounted-content-databa
    PowerShell is just a wrapper for the object model. You shouldn't need to reference PowerShell in your feature, just create the new site collection with C# inside your feature. There's a blog post here that illustrates some code that may get you started.
    http://blog.mastykarz.nl/programmatically-creating-sites-site-collections-custom-web-template/
    http://blogs.msdn.com/b/vesku/archive/2014/06/09/provisioning-site-collections-using-sp-app-model-in-on-premises-with-just-csom.aspx
    # Enable the remote site collection creation for on-prem in web application level
    # If this is not done, unknon object exception is raised by the CSOM code
    $WebApplicationUrl = http://dev.contoso.com
    $snapin = Get-PSSnapin | Where-Object {$_.Name -eq 'Microsoft.SharePoint.Powershell'}
    if ($snapin -eq $null)
    Write-Host "Loading SharePoint Powershell Snapin"
    Add-PSSnapin "Microsoft.SharePoint.Powershell"
    $webapp=Get-SPWebApplication $WebApplicationUrl
    $newProxyLibrary = New-Object "Microsoft.SharePoint.Administration.SPClientCallableProxyLibrary"
    $newProxyLibrary.AssemblyName = "Microsoft.Online.SharePoint.Dedicated.TenantAdmin.ServerStub, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
    $newProxyLibrary.SupportAppAuthentication = $true
    $webapp.ClientCallableSettings.ProxyLibraries.Add($newProxyLibrary)
    $webapp.Update()
    Write-Host "Successfully added TenantAdmin ServerStub to ClientCallableProxyLibrary."
    # Reset the memory of the web application
    Write-Host "IISReset..."
    Restart-Service W3SVC,WAS -force
    Write-Host "IISReset complete."
    If this helped you resolve your issue, please mark it Answered

  • Error when using ANY "save site as template Include Content" solution to create a NEW Site Collection

    Here is the scenario. (SharePoint 2013)
    In Dev/Test/Prod any Site that we Save as Template and include content and then, Download and try to use in a new Site Collection errors out upon use "List does not exist" error.
    This occurs with ANY Site, even OOB Team Site template that is immediately "Saved as Template".
    We can do this in any other environment (we have several test labs 1 in O365 and 1 in VM that is very OOB)
    We can take the site solution from the environments we're having the issue in and use them successfully in our Lab environments (on prem or in the cloud).
    We have also tried taking Site solution from lab environment (where we know it works fine) and tried to use these in Dev/Test/Prod and they also error on us.
    In the Dev/Test/Prod environments that have the issue if we DO NOT include content, the template works just fine to create a new site collection with the template.
    Keep in mind we're talking about environment with no 3rd party apps, no custom code, just 2013 SharePoint with all patches and CU up to June 2013, AND this is ANY template even a vanilla OOB template without anything in it.
    You can always save site as template including content, download/upload it to new site collection solutions gallery and activate it without any issue... it's only if you try to use these templates to create a site that the error occurs.
    Any thoughts on this?
    J

    I also experiencing the same issue. I also tried to create a new site-collection using publishing site template, resulting in "list not found" error.
    Later I tried just a team-site (with content) -> the same error.
    The error appears on two different (post SP1) farms. That's why I tested the site-collection creation on an old (pre SP1) farm: the error doesn't exist. Site-Collections are created properly.
    My conclusion is: either SharePoint SP1 or a later CU causing the error.
    Regards,
    Valerian

  • Creating new site collection using wsp template fails

    Hi all,
    I'm creating new site collections using a wsp solution generated by "save as template".
    For site collection creation I select "<Select template later>" then I upload the wsp solution.
    Everything worked until last month, now after CU installation (agoust 2014) I get an error:
    "List does not exist. The page you selected contains a list that does not exist. It may have been deleted by another user."
    Does anyone know how to solve it?
    Thanks 
    Maurizio

    ULS contains a lot of those errors:
    System.IO.FileNotFoundException: <nativehr>0x80070002</nativehr><nativestack></nativestack>, 
    StackTrace:
         in Microsoft.SharePoint.SPWeb.GetList(String strUrl)
         in Microsoft.SharePoint.SPWeb.TryGetListByUrl(String url)
         in Microsoft.SharePoint.SPFieldElement.PerformFixUpIfLookUpField(Guid fieldId, XmlNode xmlNodeOfAField, SPWeb web)
         in Microsoft.SharePoint.SPFieldElement.ElementActivated(SPFeaturePropertyCollection props, SPSqlCommand sqlcmdAppendOnly, SPWebApplication webApp, SPSite site, SPWeb webNull, Boolean fForce)
         in Microsoft.SharePoint.Administration.SPElementDefinitionCollection.ProvisionFieldsAndContentTypes(SPFeaturePropertyCollection props, SPSite site, SPWeb web, SPFeatureActivateFlags activateFlags, Boolean fForce)
         in Microsoft.SharePoint.Administration.SPElementDefinitionCollection.ProvisionElements(SPFeaturePropertyCollection props, SPWebApplication webapp, SPSite site, SPWeb web, SPFeatureActivateFlags activateFlags, Boolean fForce)
         in Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb webParent, SPFeaturePropertyCollection props, SPFeatureActivateFlags activateFlags, Boolean fForce)
         in Microsoft.SharePoint.SPFeatureCollection.AddInternal(SPFeatureDefinition featdef, Version version, SPFeaturePropertyCollection properties, SPFeatureActivateFlags activateFlags, Boolean force, Boolean fMarkOnly)
         in Microsoft.SharePoint.SPFeatureCollection.AddInternalWithName(Guid featureId, Int32 compatibilityLevel, String featureName, Version version, SPFeaturePropertyCollection properties, SPFeatureActivateFlags activateFlags, Boolean force, Boolean
    fMarkOnly, Boolean fIgnoreMissing, SPFeatureDefinitionScope featdefScope)
         in Microsoft.SharePoint.SPFeatureManager.EnsureFeaturesActivatedCore(SPSite site, SPWeb web, String sFeatures, Boolean fMarkOnly, Boolean fIgnoreMissing)
         in Microsoft.SharePoint.SPFeatureManager.<>c__DisplayClass7.<EnsureFeaturesActivatedAtWeb>b__6()
         in Microsoft.SharePoint.SPSecurity.RunAsUser(SPUserToken userToken, Boolean bResetContext, WaitCallback code, Object param)
         in Microsoft.SharePoint.SPFeatureManager.EnsureFeaturesActivatedAtWeb(Byte[]& userToken, Guid& tranLockerId, Int32 nZone, Guid databaseid, Guid siteid, Guid webid, String sFeatures, Boolean fIgnoreMissing)
         in Microsoft.SharePoint.Library.SPRequestInternalClass.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, Int32 fIgnoreMissingFeatures, String&
    bstrWebTemplate, Int32& plWebTemplateId)
         in Microsoft.SharePoint.Library.SPRequestInternalClass.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, Int32 fIgnoreMissingFeatures, String&
    bstrWebTemplate, Int32& plWebTemplateId)
         in Microsoft.SharePoint.Library.SPRequest.ApplyWebTemplate(String bstrUrl, String bstrWebTemplateContent, Int32 fWebTemplateContentFromSubweb, Int32 fDeleteGlobalListsWithWebTemplateContent, Int32 fIgnoreMissingFeatures, String& bstrWebTemplate,
    Int32& plWebTemplateId)
         in Microsoft.SharePoint.SPWeb.ProvisionWebTemplate(SPWebTemplate webTemplate, String webTemplateToUse, SPFeatureWebTemplate featureWebTemplate, Page page, SPFeatureDependencyErrorBehavior featureDependencyErrorBehavior, ICollection`1&
    featureDependencyErrors)
         in Microsoft.SharePoint.SPWeb.ApplyWebTemplate(SPWebTemplate webTemplate, Page page, SPFeatureDependencyErrorBehavior featureDependencyErrorBehavior, ICollection`1& featureDependencyErrors)
         in Microsoft.SharePoint.SPWeb.ApplyWebTemplate(String strWebTemplate)

  • How to create a SharePoint 2013 Top-level site's (Site Collection)?

    Hi! I read and saw a lot of examples for how to create a site collection programmatically in SharePoint 2007, but anything about 2013. Can anybody help me!?
    I use visual studio 2013 with c# and Object model for developing. Thanks!

    Hello,
    Lots of informations are available on MSDN aout same topic. Here are few links and sample code:
    private static void createNewSiteCollection()
    SPSite rootSite = null;
    try
    using (rootSite = new SPSite("http://sharepoin/"))
    SPWebApplication webApplication = rootSite.WebApplication;
    using (SPSite newSpCollection = webApplication.Sites.Add(
    "sites/test", // site URL
    "test Site", // Site Title
    "This site collection is create by usingcode", // site Descriptions
    1033, // LCID
    "STS#0", // web site template
    "accdom\\name", // owner Login
    "hemendra", // owner Name
    "[email protected]")) // owner Email
    Console.WriteLine("Create Site Collection {0}", newSpCollection.Url);
    cccc}
    catch (SPException ex)
    Console.WriteLine("Error");
    finally
    rootSite.Dispose();
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/3624e87c-aee0-41b4-91cb-bf7d121a72b7/site-collection-creation-programatically-in-sp2013?forum=sharepointdevelopment
    Hope it could help
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • Two different site collection cannot use the same Term Set . Is there any solution for this ?

     I can save department site collection as site collection template. Also I can use this template for a new department site collection creation.
    But Managed Meta data Navigation throws the following error
    •Error loading navigation: The Managed Navigation term set is improperly attached to the site. (Correlation ID: 6fa6b19c-820a-001d-b9e0-d939d702050a)

    Hi ,
    this is a limitation. please refer this
    http://social.technet.microsoft.com/forums/sharepoint/en-US/029b7e2e-661f-4ac3-bfcb-eb99b43016f2/the-selected-term-set-is-already-used-by-another-site
    Unfortunately in SP 2013, a termset can only be used by a single site collection for navigation. This is a known limitation. There is no out of the box way to use a central termset to manage navigation across site collections. You need to develop a custom sitemap
    provider to do that.
    Another way to do this is to create termset for each site collection and reuse/pin the terms from the central termset instead of creating duplicate terms. You can script this easily using Powershell. This has some limitations though.
    Also, you can try little customization. Follow this link -
    http://www.mavention.com/blog/building-global-naviga
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • MySite Host Site Collection "Site Settings" Menu and sub-site creation

    Seemingly by design, users are able to create sub-sites on the MySite Host site collection when the configuration instructions here are followed: Configure My Sites in
    SharePoint Server 2013
    To be a little clearer, as instructed, I've created and applied a subsite-creation user policy to the web application hosting the MySite host. Presumably, this enables sub-site creation in personal MySite site collections. Perfect.
    Except... this also enables creation of subsites on the MySite host itself.
    If a (non-administrative) user clicks the cog from the Newsfeed page, the scope is the MySite host.
    The "site settings" link leads to the site settings of the MySite host.
    There, in the  "Sites Administration" section is "Sites and Workspaces".
    ...and there, is the option to create a new sub-site at https://my.contoso.net/. -_-
    How might I avoid this undesirable state of affairs? I would like to give users the ability to create sub-sites in their own MySites, but not on the MySite host via the Newsfeed page. Is this possible?
    I think I can. I think I can.

    This is definitely possible - So you enabled self-service site creation in Central Admin per the configuration instructions. Did you also create a user policy on the web application?
    In my tenant non-admins do not have access to click site settings on the mysite host (They can click site contents, which redirects to the personal site collection). Also, they do have access to click site settings on the personal mysite site collection
    though.
    Regards,
    Andrew J Billings
    Portal Systems Engineer//MCSA,MCSE
    Blog:
    http://www.andrewjbillings.com 
    Twitter:
      LinkedIn:
    I did some testing and figured it out, I think. Mind you everything worked properly, users just had access I didn't want them to.
    I did enable self-service site creation, and I created the user policy on the web application as per the instructions. I then discovered users had access to site settings on the Newsfeed page: https://my.contoso.com/default.aspx
    The only site setting they had access to was subsite creation: https://my.contoso.com/_layouts/15/newsbweb.aspx , but I didn't want them to be able to create subsites on the host, just in their personal collections.
    Deleting that user policy removed their access to subsite creation on the host, and still allowed self-service site creation, and the creation of subsites in personal collections, so the question now is:
    Why are we being directed to create that user policy in the first place, when it doesn't appear to affect personal sites at all?
    I think I can. I think I can.

  • NavigationTerm.GetWebRelativeFriendlyUrl() is slow for Site Collection Administrators or users with Edit Permission

    I have a publishing site on SharePoint 2013. Part of the site requires a custom navigation to replace the quick launch. I've written a UserControl that accesses the NavigationTermSet and uses the term titles and URLs to build a navigation.
    Loading the NavigationTermSet:
    using (SPSite site = new SPSite(SPContext.Current.Site.ID, SPUserToken.SystemAccount))
    using (SPWeb web = site.OpenWeb(SPContext.Current.Web.ID))
    TaxonomySession taxonomySession = new TaxonomySession(site);
    StandardNavigationSettings navigationSettings = new WebNavigationSettings(web).CurrentNavigation;
    TermStore termStore = taxonomySession.TermStores[navigationSettings.TermStoreId];
    TermSet termSet = termStore.GetTermSet(navigationSettings.TermSetId);
    _navTermSet = NavigationTermSet.GetAsResolvedByWeb(termSet, web, StandardNavigationProviderNames.CurrentNavigationTaxonomyProvider);
    I grab the term's friendly URL with the following:
    navTerm.GetWebRelativeFriendlyUrl();
    Pages containing this control load in less than a second for read-only users. Site Collection Administrators or Content Editors take about 8 seconds to load the same page. I've determined that the method in the code block above is the culprit for the long
    load times for admins and content editors. What is the deal with that? Can I do something differently to speed things up for admins?
    Any help is appreciated.

    For anyone who ran into the same issue as me, the fix was to change how the term set was loaded:
    _navTermSet = TaxonomyNavigation.GetTermSetForWeb(SPContext.Current.Web, StandardNavigationProviderNames.CurrentNavigationTaxonomyProvider, false);
    This loads the term set from the navigation cache. The other method I was using would load without making use of the cache, which is why it was slow. I'm guessing the cache was still being used for non-admin users as the loading was not slow for them.

  • Creation of dynamic site collection and sub-sites

    We are having an enterprise system where organization wide operations are maintained. Recently we decided to provide collaboration features for each operation maintained in the system using SharePoint 2013, since that enterprise system did not provide
    any social/collaboration features.
    Assumptions/constraints -
    1. Every year 2500 operations are created
    2. Each operation can have documents and other content scaling upto 5 GB.
    3. Only SharePoint provider hosted apps are allowed to build the solution
    For seamless integration, we are creating an automation component which will a SharePoint provision site automatically when an Operation is created in the enterprise system (we will get the trigger through web services)
    Proposed solution - 
    After going through
    Software boundaries and limits for SharePoint 2013, I'm thinking of proposing this architecture -
     1. A windows service will be created which will accept the trigger to create a site and take care of provisioning the entire site 
     2. A maximum of 700 sites will be created per site collection (based on the size calculations and keeping some buffer)
     3. Once a site collection hits 700 sub-sites, a new site collection is automatically created for provisioning the new sites
     4. Provision the apps and add them to site pages using powershell/CSOM
    Kindly let me know if this approach is effective or any major road-blocks we need to take care of in this.
    NLV - MCTS - Blog -
    Twitter - In

    Hi Margriet,
    We are looking at the SharePoint 2013 limitations and trying to devise the best possible solution. We are open to create multiple content databases for multiple site collections or with single contentdatabase having multiple site collections (which doesn't
    look like feasible). So it is a matter of deciding which will best suit this scenario.
    NLV - MCTS - Blog -
    Twitter - In

  • Web Application Creation Speed Slowing

    Hi all, thanks for any help with this. We found an issue with our SharePoint 2013 farm and I'm hoping someone can tell me if this is expected behavior or not.
    First some background, our company sells several products and marketing wants different sites for each product ie. www.companyname.com, www.thingy1.com, www.thingy2.com, etc. In SharePoint we have been creating a separate web application for each domain.
    We found that both bringing up the new web application dialog box and the overall creation time got slower and slower as we added more web applications. Here are some tests we did on a fresh system.
    Test3   2 minutes: 40 seconds to create web application
    Test4  
    2:58
    Test5  
    3:20
    Test6  
    3:40
    Test7  
    3:58
    Test8  
    4:25
    Test9  
    4:56
    Test10  
    5:38
    Test11  
    6:15
    Test12 lost track of time :)
    At this point I increased memory from 12 to 20 GB
    Test13  
    7:40
    The reason I started testing this is that we have lab farm with 18 web applications and it takes about 35 minutes to create a new web application. So, is this expected in a system? If so, is there
    a best practice to architect web applications other than this basic we we have been doing it?
    Thanks for any help on this issue
    Mike

    hi
    max application pool limit is 10
    max web application limit is 20
    Software boundaries and limits for SharePoint 2013
    We recommended limiting the number of web applications as much as possible. Create additional host named site collections where possible
    instead of adding web applications.
    Host-named site collection architecture and deployment (SharePoint 2013)
    yaşamak bir eylemdir

  • Load balancing host named site collection

    I am jumping into the realm of host named site collection. While the learning experience has been good, still there are some questions unanswered. Please bare patience since my questions are long.
    - I have a non host header site on port 80 that has https certificate added to IIS for supporting app store in https mode.
    - I tried to created the host name site collection using https in this default port 80 non host header web application and was greeted with error. Then i extended the web app to different  zone with port 443 . Then created the host header site collection
    with https with web application name for extended 443 one. Creation went in fine.
    - I tired to use IPs on now extended IIS site and bind certificates on that one. The site does not load. I do the same again in the default zone iss site, bind ips on that one and site loads. Now question is even though host header site collection was created
    using extended web application url , why binding had to be done on default zone IIS site?
    - Second test, i changed the authentication mode for extended, no effect on host named site collection but as soon as i changed it in default zone it reflected in host named site collection. I am confused why it needs extended zone url to create the https
    site but every change done in default zone is getting reflected on this host named site collection.
    Now for load balancing , it works fine with IP? But how to load balance these host named site collection using url. I talked with f5 team and they said i need to send some reply query string from each site. Where do i do that? Or is it even needed? 
    Accoring to this link : https://devcentral.f5.com/articles/name-based-virtual-hosting-with-ltm
    . If the site hosts an application, though, the monitor should request a dynamic page on each webserver which forces a transaction with the application to verify its health and returns a specific phrase upon success.
    For application monitoring, the recommended best practice is to create such a script specific to your application, configure the monitor Send string to call that script, and set the Receive string to match that phrase. 
    Has any one done this before? I tired to search for resource regarding this for iis or sharepoint but was not able to get anything.
    Thank you for your patience for reading such a long question. 
    Adit

    first part of question:
    Default Web Appliction in port 80: Creating https host named site collection fails.
    Extend default web application on port 443 : Https hostnamed site collection created when web application name is passed for extended web application on port 443. This means this site collection is associated with this extended web application correct? But
    all the changes made in IIS only reflect if it is made to port 80 web application. Also changing authentication scheme from Central Admin, only changes on default zone reflects on site collection not the one in extended web application? Why  if the site
    was only created on extended web application paremeter, changes on default are reflecting on it but not from extended.
    Second part of question:
    Each Hostnamed site collection when load balanced thorough f5 using IP for 3 WFE uses 3 IPs for each. This way we will run out of IPs pretty soon. I want to know if there is way to load balance these sites using Hostname or anyother paramenter through f5
    and if any body has done it? 
    https://devcentral.f5.com/articles/name-based-virtual-hosting-with-ltm link talks about sending reply string
    from application but i do not know where to set it up or how to do it? No resources in the net. Just asking if any one else has done it. 
    Adit

  • Creating site collection in claims enabled webapplication with each in seperate content database

    Hi All,
    We have a  requirement where end user have a option to create site collection with out contacting farm admin, and each site collection would be created in separate content db.
    we used WebApplication.sites.add() which is working only for classic authentication web applications.
    how do we create site collections in claims enable web application with each site in separate content db?
    Any thoughts on this would be helpful.
    ragava_28

    Hi,
    We can use Self Service Site Creation to achieve your requirement.
    The code snippet below for your reference:
    using (var site = rootSite.SelfServiceCreateSite(siteCollectionUrl, title, description, locale, null, adminLogin, adminName, adminEmail, secondaryAdminLogin, secondaryAdminName, secondaryAdminEmail))
    var web = site.RootWeb;
    web.AllowUnsafeUpdates = true;
    //Activate web template feature
    site.Features.Add(webTemplateFeatureGuid);
    //Apply web Template
    using (var s = new SPSite(site.ID))
    var webTemplates = s.RootWeb.GetAvailableWebTemplates(locale);
    var webTemplateId = "{" + webTemplateFeatureGuid.ToString() + "}#" + webTemplateName;
    var webTemplate = webTemplates[webTemplateId];
    if (webTemplate != null)
    web.ApplyWebTemplate(webTemplate);
    // need to reload web. Features in webtemplate have modified it!
    web = site.OpenWeb(web.ServerRelativeUrl);
    // Continue doing stuff to new site
    Here is a similar thread for your reference:
    http://sharepoint.stackexchange.com/questions/26303/unable-to-create-site-collection-programmatically
    Best Regards
    Dennis Guo
    TechNet Community Support

  • Cannot create Site Collection in new Webapplication after upgrade to SP1

    Hello,
    after upgrading my SharePoint Server 2013 (small Farm with one SP and one SQL) I am not able to create new site collections in new web application. Furthermore I am facing trouble when creating a new web application which I suspect is a connected problem.
    Environment:
    SharePoint 2013 ENU with german language pack upgraded to SharePoint 2013 SP1. Both parts are upgraded (SharePoint and Language pack). Afterwards I have done a psconfigui to upgrade the DB which works fine. Only one DB (BDC is still running in compatibility
    mode).
    Everything is running on a single server on Windows Server 2012.
    Problem(s)
    When I create a new web application it tooks a very long time (3 + minutes) and ends with an error message (Sorry something went wrong !). If I close this message I can see the new web application and also its content DB. If I then try to add a new site
    collection into this new web application it fails (Sorry something went wrong).
    I suspect this is a connected error, but I have now idea what is going on. Everythings else seems to work...
    Any idea or support would be great.
    Thanks in advance
    Martin

    You can get issues if you hit a time out message during the creation process. How does it work if you create a site collection using PowerShell?
    You can extend the timeout duration this is for web application creation but might be of use here too: http://blog.babunski.me/2013/07/17/sharepoint-404-error-while-creating-a-new-web-application/
    Do you get any error messages when you create the site collection?

  • Creating multiple subscriptions for collaborative site collections under same OU in multi-tenancy

    Hi,
    We have an application that creates host based collaborative site collections and MySite Host site collections. We have created two separate web applications for hosting collaborative site collections and Mysite host based site collections as recommended
    by MS.
    For creation of collaborative site collections, we are creating separate site subscriptions for separate site collections. For example, if a tenant has two collaborative site collections as CSC1 and CSC2, then two site subscriptions are created for two CSCs
    under the same tenant. The reason behind the implementation is as follows:
    There is a 1:1 mapping with the featurepack and site subscription. Now if two site collections are created under the same site subscription, then altering the feature pack of any site collection will affect the other one. Whereas, if separate subscriptions
    are created fro separate site collections, then altering the featurepack of any site collection will not affect the other site collections.
    Now, my concern is, will the basic functionalities of SharePoint, like search, user profile, etc, will break for the above implementation. Is there any technical hazard for the above implementation.
    A quick response is appreciated, as we need to deliver a customer  ASAP.
    Thanks in advance,
    Arnab

    Search and UPSA would be part of the Site Subscription, so I'm unsure as to what you're specifically asking.
    Trevor Seward
    Follow or contact me at...
    &nbsp&nbsp
    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

Maybe you are looking for

  • Getting Strange Error Running Query After Partioning Cube

    I am using BI 7.0, Service Pack 11: I just partitioned a cube. I hav eorginal cube XFI_C001 and create a new cube C2_XFIC01 by copying from XFI_C001. Now I developed a query on C2_XFIC01. Similar query on XFI_C001 does not give any error. How can I d

  • My DVD player stopped playing sound. How to  fix it?

    I can't get sound on DVDs in my DVD Player. Any suggestions how to fix it? The picture is fine but no sound on any DVD.

  • W. Tax in A/R

    Hello Experts, Can somebody please guide me how can I setup W. Tax at A/R invoice level as it is not being shown in Customer Business Partner. That is "Subject to Withholding Tax" check box is not being shown in Customer > accounting > Tax tab. Thank

  • JMS SAF client

    Hello , Have a simple question about what jar files are required when using a safClient to connect to Weblogic. Some of the jar's are , - weblogic.jar - wlclient.jar - wlfullclient.jar - wlsafclient.jar - wljmsclient.jar Are all of these jars require

  • XML Data Load to BW

    Hi All, I tried loading the XML data to BW using the how to document. everything is fine but in the final stage when i send the recordset uisng the HTML file given in the document its gives an error "Object Expected". I tried a lot but not able to so