Create SharePoint Service accounts through PowerShell script.

You need to domain admin or have permissions to create user in Active Directory.  Need to log in in the domain controller and run this script to create all the service accounts It creates following service accounts Account Description Domain rights SP_Farm Farm account – Configure and manage the server farm. SecurityAdmin and DB_Creator rights…

0

Restrict people picker to get users from a particular domain.

  We had a request from client to allow to pick up users in a people picker on a site from particular domain Let me elaborate the SharePoint environment involved here The SharePoint farm is on a domain say Contoso.  The client has another domain say Talespin.  There is 2 way trust relationship between Contoso…

1

Access denied with SPSecurity.RunWithElevated privileges

  A fellow colleague was trying to do something in web part that required more privileges So as all of us would do he wrapped the code round SPSecurity.RunWithElevatedPrivileges. It is then he started receiving errors on access denied each time he tried to add the web part. Below was his code   SPSecurity.RunWithElevatedPrivileges(delegate()  …

1

Cannot recognize the XML namespace of this Web Part

In my earlier post Provisioning webparts through feature, we saw how can custom or out of the box web parts be provisioned on a page through visual studio feature. Note that sometimes using this approach you might stumble on this error “Cannot recognize the XML namespace” Notice that when ou download the configured web part…

1

Caml Queries to Remember

  Everytime I start writing CAML I fall back to U2U. Wanted to keep few queries handy so here we go No Filter <View><ViewFields><FieldRef Name="Title" /><FieldRef Name="Column2" /></ViewFields></View> With Row Limit <View><RowLimit>10</RowLimit><ViewFields><FieldRef Name="Title" /><FieldRef Name="Column2" /></ViewFields></View> Above two can  be used with CamlQuery object as view xml. example CamlQuery camlquery = new CamlQuery();                camlquery.ViewXml…

3

Host named site collections in SharePoint 2013

What are HNSC Traditional site collections that we create in SharePoint are Path based site collections Host named site collections have their own url.  Example Microsoft recommends using host named site collection.  It is used in SharePoint online and Office 365. Benefits of HNSCs A SharePoint farm can have 20 web applications at max.  If…

15

Page cannot be displayed error while creating Web application

While creating a new web application, a 404 ‘Page not found’ error is displayed and the web application is only provisioned on the local server After a number of web applications have been created in the SharePoint 2010 farm, further attempts to create a new web application through Central Administration result in the following: The…

7