Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

Object instance not set to an instance of an object

$
0
0

I am trying to create a sitecollection while autmatically applying a site template.  The issue that I am having is that on one server, everything works fine, on another server I get the eror, "Object Instance not set to an instance of an object".  I get the error on the line that says, "using (SPSite site = webApp.Sites.Add(.....)

 
  SPWebApplication webApp = SPWebApplication.Lookup(new Uri(siterootname));                
                SPWebApplication.Lookup(new Uri(siterootname));

                    using (SPSite site = webApp.Sites.Add(sitefinalurl, sitetitle, sitedesc, 1033, null, spOwnerLogin, spOwnerName, spOwnerEmail, spSecondaryOwner, spSecondaryContactName, spSecondaryEmail, dbserver, dbname, spOwnerName, spOwnerPassword))


Viewing all articles
Browse latest Browse all 25064

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>