Skip to main content

Posts

Showing posts from 2014

Your account is configured to prevent you from using this computer. Please try another computer

I have got this message when I tried to access a remote machine which is in domain. I’m having all the privileges to this machine but still error got prompted. This is actually not because of the permission but because of the active directory policy. You need to go to active directory and change the Log on To ..   In here best thing is select All Computers option.If not add machine name to The following computers section ( not the IP Address ).

We apologize for any inconvenience, but we've made the site read only while we're making some improvements

This message shows when I accidentally close my backup script of the SharePoint site. This massage is prompted by the SharePoint when  a site is in a maintenance mode. Resolutions Method 1 Go to the central administrator Application management –> Site Collection Quotas and Locks Select the site collection and change the locks information to Not Locked . Some times this page looks like disabled thus you need to try the method two. Method 2 $Admin = new- object Microsoft .SharePoint .Administration .SPSiteAdministration ('https: //www.site/sites/sitecollection') $Admin .ClearMaintenanceMode () This PowerShell Script changes the site collection back to normal.

How to initialize the SharePoint Client Context in SharePoint Apps (Provider Hosted / SharePoint Hosted) using JSOM (JavaScript Object Model)

  SharePoint Provider Hosted Apps First of all we need to understand the SharePoint Provider Hosted hosting blocks. Provider hosted involves two hosting domains (ex host, sphost ). thus request sending to host to sphost considering as cross domain request. For cross domain request we need to provide SPAppWebUrl to initialize the context. SPAppWebUrl  is available in Url. Ex:- https://host.azurewebsites.net/pages/default.aspx?SPHostUrl=https:%2F%2Fsphost.sharepoint.com%2Fsites%2app&SPLanguage=en-US&SPClientTag=0&SPProductNumber=16.0.3417.1223&SPAppWebUrl=https:%2F%2Fsphost-265535272e9c8d.sharepoint.com%2Fsites%2Fapp%2FSample&Source=https://app.azurewebsites.net/pages/default we can get AppWebUrl by accessing Url parameter. following shows a utility function for getting Url parameter. function getQueryStringParameter (paramToRetrieve) = { var params = document.URL.split( "?" )[1].split( "&" ); for ( var i = 0; i < para

Working with SharePoint folder properties using CSOM (Client Side Object model ) in SharePoint 2013

  Accessing folder properties are but different from  SharePoint list item access. Following code demonstrates  the basics. Create SharePoint Folder with Properties using (var clientContext = ypurMethodToGetSpContectt() ) {   var lst = clientContext.Web.Lists.GetByTitle( "ListName" ); var folder = lst.RootFolder.Folders.Add( "FolderName" ); folder.Properties[ "property1" ] = "sample" ; folder.Properties[ "property1" ] = "sample" ;   folder.Update(); clientContext.ExecuteQuery();   }

SharePoint 2013 Licensing model

SharePoint 2013 licensing model has changed bit for user scenarios. it has been slightly change from the SharePoint 2010 server user licensing model. SharePoint Server should be license under two categories. Server License Client Access License (CAL) Server License Each SharePoint server in the farm should be license under SharePoint server license. Apart from the windows server licenses, SharePoint server should be licensed. This can be done when the time of installation of the SharePoint server. The SQL servers in the SharePoint farm should be installed according to the SQL server licensing model. Client Access License (CAL) After that SharePoint farm should hold licenses for client access. These licenses are reviewed in the audit process and does not require any key in activation. Depending on the user accessing organization requires to have CALs. Intranet and Extranet CAL requirements Assume organization setup a intranet and which is having users from internal AD , auth

How to add/update SharePoint user field (person group column) using ECMA Scripts

  SharePoint app model supports enough capability to work with SharePoint from JavaScript. Working with Person Group column is a common task in SharePoint development. Following illustrates how to  update  a single and multiple values to  SharePoint person group column. Insert / Update Single Value SharePoint Person Group Column (People Field) Tip: For single value you should refer the person or group by ID var user = new SP.FieldUserValue(); user = 1; // this is the ID for User or Group in SharePoint listitem.set_item( "Column Name" , user); listitem.Update(); ctx.ExecuteQuery(); Insert / Update Multi Value SharePoint Person Group Column (People Field) Tip: For multiple users you need to refer it by login name var users =[];   users.push(SP.FieldUserValue.fromUser( "dev Members" )); // adding group users.push(SP.FieldUserValue.fromUser( "i:0#.f|membership|melick@oapp.onmicrosoft.com" )); // adding user   listitem.set_item( "Column Name&quo

Session on SharePoint App Architectural View

Audience: 20+

Programmatically Change Default Content Type in SharePoint 2013 List

  SharePoint list does not have any direct property or method to make content type default. but it is having content type ordering. thus making content type in first of the list automatically makes that content type default. following shows a sample code using (var site = new SPSite( "url" )) { using (var web = site.AllWebs[ "yourweb" ]) { var lst = web.Lists[ "Your List" ]; SPContentTypeCollection currentOrder = lst.ContentTypes;   // make default content type var newOrder = currentOrder.Cast<SPContentType>().Where(ct => ct.Name.Contains( "Content Type To Default" )).ToList(); lst.RootFolder.UniqueContentTypeOrder = newOrder; lst.RootFolder.Update(); } }    

The Managed Metadata Service or Connection is currently not available. The Application Pool or Managed Metadata Web Service may not have been started. Please Contact your Administrator.

  I noticed this error when I logged to SharePoint farm; Meta Data service application. Tasks going to perform Get the Current Mapped Data Base for Managed Meta Data Service Backup Data Base and get the name Delete Meta Data Service Application with out Data Base Create a New Managed Meta Data Service with new Application Pool Change the Data base reference to old database When I googed I found few resolutions which didn’t work for me. so I tried a slightly different approach which worked for me. Get the Current Mapped Data Base for Managed Meta Data Service Go to central admin and navigate to Manage Meta Data Service properties to find out mapped data base. Then go to your database server and backup the database for recovery purposes. (this step is not mandatory but good for safe side) Delete Meta Data Service Application with out Data Base Create a New Managed Meta Data Service with new Application Pool When you creating specify a new data base name ( DB1 ) and

An error occurred while talking to SMTP host mail.something.local Event ID 6858

this error occurred to me when I setup SMTP virtual sever for SharePoint farm. then I tried to trouble shoot email sending using PowerShell and it also return False . Trouble shooting SharePoint Emails (SMTP server)  $dict = new - object System.collections.specialized.stringdictionary // recipient's Email Address $dict .add( "to" , "somebosy@gmail.com" ) // sender: you can put anything that you want to visible in the email $dict .add( "from" , "outsender@sharepoint.local" ) $dict .add( "Subject" , "sample subject" ) // this is any existing sp web url $web = get-spweb "http://4587wfe2013:5003" $body = "This is our body codes in it." [Microsoft.SharePoint.Utilities.SPUtility]::SendEmail($web,$sd,$body) This code will return True if success otherwise will be False . This error occurred me because of connection issues to SMTP server. thus I go to SMTP properties   Then go to Access Tab and click Conne

SharePoint 2013 Training–Part 1

Hosted a SharePoint training for Pyxle colleagues; session went well with practical sessions and technical discussions.

SharePoint Sample Field (Columns) Schemas

SharePoint Fields (Columns) XML is essential for every SharePoint Object Model development. Multiple User Field < Field ID ="{f6377553-35fc-4166-9cc3-88fa32a5d7dd}" Name ="WFCApprovers" DisplayName ="WFC Approvers" Type ="UserMulti" Required ="FALSE" UserSelectionMode ="0" Group ="Custom" > </ Field > UserSelectionMode Options: 0 - PeopleOnly , 1 - PeopleAndGroup Single User Field < Field ID ="{f6377553-35fc-4166-9cc3-88fa32a5d7dd}" Name ="UserField" DisplayName ="User Field" Type ="User" Required ="FALSE" UserSelectionMode ="1" Group ="Custom" > </ Field > Boolean Field < Field ID ="{6ed8dbbf-4726-4a63-b358-e4797149a8ba}" Name ="Booleanfld" DisplayName ="Boolean Feild" Type ="Boolean"