I am having trouble doing something simple like the following
using (SPSite site = new SPSite(topLevelSite)) { SPWeb rootWeb = site.OpenWeb(); SPWeb newWeb = rootWeb.Webs.Add(siteName, "abc", "abc",1033,template,false,false); }
But the catch I am trying to add a site to a PKI enabled sharepoint site:
This code works fine when i am dealing with my non pki sharepoint server, but I get the error: " The Web Application at https://server/sites/newSite could not be found. Verify that you have typed the URL correctly. If the URL should be serving existing content, the system admin may need to add a new request URL mapping to the intended application. "
My main question is: How do you go about accessing with c# a sharepoint site that is PKI enabled? Do I need to insert my certs somewhere programatically or what?
Are there steps before I open SPSite, or are there other Objects I need to use that are more PKI friendly?
All advise is welcomed.
Thanks