Tuesday, February 25, 2014

SharePoint 2013 Installation requirements

SQL Server
Application Server
Single Server
8GB RAM,64 bit,4 core,80GB disk space in C driver
Three Tier
12 GB RAM,64 bit,4 Core
Small Size Server
64 bit
4 Core
80 GB disk space in System drive
12 GB RAM, 64 bit, 4 Core
80 GB disk space.
Medium Size
64 bit
8 Core
80 GB disk space in system driver

*Development and evaluation purpose only

If you are not sure, what updates, hot fixes to be installed just connect your server and start the “pre request Installer.exe” file to install all the required software and updates the windows.
Once your server up and running ensure all the updates and hot fixes for SharePoint 2013 available on your server by navigating to this .
Control Pane ->Programs-> Programs and Features - > Installed Updates

·         The 64-bit edition of Windows Server 2008 R2 Service Pack 1 (SP1) Standard, En­terprise, or Datacenter; or the 64-bit edition of Windows Server 2012 Standard or Datacenter.
·         The SharePoint parsing process crashes in Windows Server 2008 R2 (KB 2554876).
·         FIX: IIS 7.5 configurations are not updated when you use the Server Manager class to commit configuration changes (KB 2708075).
o    Hotfix: ASP.NET (SharePoint) race condition in .NET 4.5 RTM: Windows Server 2008 R2 SP1 (KB 2759112)
o    Windows Server 2012 (KB 2765317)
o    The Microsoft SharePoint Products Preparation Tool installs the following prerequisites for front-end web servers and application servers in a farm:
o    Web Server (IIS) role
o    Application Server role
o    Microsoft .NET Framework version 4.5
o    SQL Server 2008 R2 SP1 Native Client
o    Microsoft WCF Data Services 5.0
o    Microsoft Information Protection and Control Client (MSIPC)
o    Microsoft Sync Framework Runtime v1.0 SP1 (x64)
o    Windows Management Framework 3.0 which includes Windows PowerShell 3.0
o    Windows Identity Foundation (WIF) 1.0 and Microsoft Identity Extensions (previ­ously named WIF 1.1)
o    Windows Server AppFabric
o    Cumulative Update Package 1 for Microsoft AppFabric 1.1 for Windows Server (KB 2671763)

·         The minimum requirements for database installations in a farm are as follows:
o    One of the following:The 64-bit edition of Microsoft SQL Server 2012
o    The 64-bit edition of SQL Server 2008 R2 Service Pack 1
o    The 64-bit edition of Windows Server 2008 R2 Service Pack 1 (SP1) Standard, En­terprise, or Datacenter; or the 64-bit edition of Windows Server 2012 Standard or Datacenter.
o    The SharePoint parsing process crashes in Windows Server 2008 R2 (KB 2554876).
o    FIX: IIS 7.5 configurations are not updated when you use the Server Manager class to commit configuration changes (KB 2708075).
o    Hotfix: ASP.NET (SharePoint) race condition in .NET 4.5 RTM:Windows Server 2008 R2 SP1 (KB 2759112)
o    Windows Server 2012 (KB 2765317)
o    Microsoft .NET Framework version 4.5


Monday, February 24, 2014

Office 365 browser and client requirement

Browser Requirement for Office 365

If you are still using the Office 2007, then update the office 2007 version to Service Pack 3

Office 2010 must be updated to Service Pack 1

OS requirement

Windows XP with Service Pack 3 (32-bit)
Windows XP with Service Pack 2 (64-bit)

IE 8,9,10 and 11.

If you choose Office 365 ProPlus (Lync,audio video chat enabled,Visio and Project)
then you must Win 7,8 or very latest Windows 8.1

if you plan to use the Office 365 then always install the 32 bit
version of Office version on your client computer.

32 bit office can be installed on both 32 bit and 34 bit OS.
64 bit Office can be installed only on 64 bit OS (Windows 7,Windows 8 and Windows 2008 R2).

SharePoint 2013 - App Development set up

How to configure the environment for developing the SharePoint 2013 App in Development server.

To develop the new SharePoint paradigm apps in development environment you need to do lot of configurations
on your local server.
In first time its bit tedious for even experienced IT pro,When configuring,I met new challenges and exceptions details which guides me to set up the environment.
Here is the whole compiled information which I hope helpful for the beginners to set up the SharePoint environment and invest huge time on developing the SharePoint App rather than setting up or configuring.
Prerequisites can be divided into three categories for developing the SharePoint 2013 App in local server
  1. Infrastructure
  • Domain Controller
You can see this very simple and straight forward video for how to promote your locally installed OS Windows 2008 R2 to "Domain Controller".
  • DNS settings
1,Start -> Administrative Tools ->DNS2,Expand your local server and click on the "Forward Lookup Zones"
3,On the right hand side you will see your fully qualified domain name which created earlier.4,Right click on your domain name and select the context menu "New alias(CNAME)".
5,Type the "wild card" in the alias name text box and your domain name in the FQDN for the target host.
Once you have created the DNS just ensure the created DNS is working fine by running the ping dos command
>>ping someprefixtext.murugesan.cloud.com
Next step
Create a new user in your active directory
Start->Administrator Tool -> Active directory users and computers.
After made this user as "Domain Controller" to log on the same server with newly created active directory user account instead of using the System account.[System account cannot be used to install the SharePoint App through visual studio on the local machine].And also this steps help you to log on the same server otherwise you will get the "Can't logon because the logon method you are using is not allowed on this computer" exception.
  • Visual Studio 2012 with registry changes.
steps :

Verbose logging in Visual Studio 2012

Follow these steps if you want to turn on verbose logging:
  • Open the registry, and navigate to HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\SharePointTools.
  • Add a DWORD key named EnableDiagnostics.
  • Give the key the value 1.
  • Installing Office Component tools for SharePoint.
below post will helps you how to install Office Developer Tools.Download the WebPI (WebPlatform Installer) to download the office developer tools and assemblies required for developing the SharePoint App on your local server.
  • 3,SharePoint related configuration
  • User Profile Service
  • App Management Service and
  • SharePoint Foundation Subscription Setting Service.
Go to your Central Administration Page ->System Setting -> Click on "Manage Services on this server" link ensure the above listed services are up and running.
Now create the new managed account to create / manage the below services.
Microsoft best practices suggests that you should not use the "System Account" to manage the Service applications in the SharePoint due to Load balancing on the Application Server and security context.
As you are going to develop the SharePoint app on the same local server you can use the previously created user in "Active Directory" for managed account.
Run this SharePoint Powershell command
$account = Get-SPManagedAccount "domain\user"  example: //Murugesan\User01
//New ApplicationPool for AppManagement Service and Subscription Site Settings service
$appPoolSubSvc = New-SPServiceApplicationPool -Name SettingsServiceAppPool -Account $account
$appPoolAppSvc = New-SPServiceApplicationPool -Name AppServiceAppPool -Account $account
$appSubSvc = New-SPSubscriptionSettingsServiceApplication –ApplicationPool $appPoolSubSvc –Name SettingsServiceApp –DatabaseName SettingsServiceDB
$proxySubSvc = New-SPSubscriptionSettingsServiceApplicationProxy –ServiceApplication $appSubSvc
$appAppSvc = New-SPAppManagementServiceApplication -ApplicationPool
$appPoolAppSvc -Name AppServiceApp -DatabaseName AppServiceDB
$proxyAppSvc = New-SPAppManagementServiceApplicationProxy -ServiceApplication $appAppSvc
After completion of the above step,ensure all the relevant service application and its proxy services are started and check the "DB creation" on your SQL Instance.
I would suggest you to install the SQL Server with mixed authentication mode.When you log in as different account in the same server it will be useful to open the SQL Server DB for managing the User Permission in "App Management Content DB" [It shouldn't replicate on the production server].
Now go to Central Administration Page,Under "Application Management" click on "Manage Service application" and ensure the services which you have been created from the above SharePoint Shell Script.
Like this.
Now got your SQL Instance where your service "Manage App Service enabled" and check your account has dbowner permission and SPDataAccess Permissions.
Now good to go to create your App catalog site on your local server.On Central Admin site click on "Apps" link it will open the screen like this,
UntitledClick ok on this page and come back to "Management" header click on  "Manage App Catalog" to create your app site on you local server.
Untitled1Happy Configuring and start your App development journey.
Best luck ahead !

Restricting the SharePoint installation on the server

Once the SharePoint 2013 has been installed and ready to use for production,you need to guard your server by applying the group policy on AD  or below modification on the registry on every server which SharePoint 2013 installed and part of the SharePoint Farm.

Group Policy creation in AD.
Use the below windows powershell,
Set-GPRegistryvalue -Name "Default Domain Policy" -Key " HKey_Local_Machine\software\policies\microsoft\ shared tools\web server extensions\15.0\sharepoint -ValueName "RestrictSP" -Type DWORD -Value 1
Click on Administrative Tools-> Group Policy Management ->expand on your domain.It will list all the "Default Domain Policy,Domain Controller,Group Policy Objects,WMIFilter and Starter GPOs.
Double click on "Default Domain Policy" it will open the html page in right side,bottom the page make sure that "RestrictSP" has been added in the "Extra Registry Setting" like below screen
On successful completion of the cmdlet,go to run->regedit
HKey_Local_Machine\software\policies\microsoft\ shared tools\web server extensions\15.0\sharepoint
Set the value 00000001 for RestrictSP.
Thats all !
Happy Configuring and Installing the SP 2013.

Enable Javascript for SharePoint App

Enable Javascript for SharePoint App

When you try to execute the SharePoint App,you may get this message on your bowser.
"You may be trying to access this site from a secured browser on the server. Please enable scripts and reload this page." To run SharePoint App,JavaScript must be enabled on your browser.Go to Internet Options-> Select Security tab ->Select Local Intranet
Click on "Custom Level " button,under Scripting header check "enable" the "Active Scripting".

SharePoint online admin roles

 SharePoint Online admin will  perform the following activities
  • Create and manage the site collections
  • Manage permissions and users and help secure the content on site.
  • Manage user profiles and configure My Sites and
  • Configuring the specific SharePoint online features or global settings.
SharePoint Online Admin Center Page sample.

Installing Office 365 product on client

Installing Office 365 product on client

If you have E4 and above subscription you install the Office Product on your local computer.
For E4 enterprise subscription,for one user license It let me to install on 5 computers.
At anytime you can deactivate the Office products (Excel,Word,PowerPoint,LyncOutlook,Publisher,OneNote and Access) from any of your computer through Office 365 Admin Center Page.
Go to Admin center page -https://portal.microsoftonline.com/admin/default.aspx
right corner under header "admin shortcut" click on download software link.
I am running the  Windows 2008 R2 - Trial (64 bit OS),I select the 64 bit version for your installation.
After clicking the installation file,It started to streaming,within few minutes, I was able to open the Excel and Word application in my computer.

Site Closure in SharePoint 2013

New feature in SharePoint 2013 called "Site Closure" Policy lets you to decide whether you want to delete as soon as you hit the delete or mark them as "Closed" and eventually deleted automatically.
Once the site has been marked for "Closed",still member can access the site with read-only.

You can also configure the site "Close and delete automatically".This will allows you to set the close event like when (Number of year,days and months) the site has to be deleted from the creation date and delete event after the site site has been marked "Closed".

You can  configure whether the site owner gets email notification before the site gets deleted and let the site owner can extend the number days from the site gets deleted.

This can be done through by creating the the "Site Policy".

Go to your site settings->Site Collection Administration->Site Policies

Screen shot

SharePoint 2013 - Site Policy,Site Closure and Deletion steps

Once you created this policy go to Site Setting->Site Administration->Site Closure and Deletion

Under Site policy drop down list,you will see the newly created policy select and click ok to attach the policy for that site like this screen.
SharePoint 2013 - Site Policy,Site Closure and Deletion steps

Bar Code generation in SharePoint 2013

As part of information security policy in your SharePoint 2013,you impose the Bar code generation for each of your documents in Document Library and List.

To activate this go to your Central Administrator site click on "Security" link (_/security.aspx)
Security Policy in SharePoint 2013 - Bar Code generation

Click on "Configure Information Management Policy"
It will navigates to "_admin/Policyfeatures.aspx",there click on "BarCodes" link

SharePoint 2013 - Bar Code generation Information Policy

Save your settings.

Now go to your site and document library setting page,Under "Permission and Management" header click on "Information Management policy settings" Click on the "Document" content type"

Create your custom policy and enable the "BarCodes" feature.

Not to use the "Label" option which is considered to be less security feature and MS decided to deprecate in near future.

SharePoint 2013 - Bar Code generation - Information Policy Settings
Ok now you have your own custom policy in place,Upload new document to your library or add new list.
Check in "Edit Properties" mode or View Properties it will generates the bar code for that item.

DocuSign e-Signing for Office 365

DocuSign will bring its eSignature electronic signature apps to Office 365, a move that’s probably as important for Microsoft as it is for users. The eSignature technology will appear in the Office 365 Office Store in early March, fleshing out an app store that’s still woefully short of useful plugins. 

As anyone who’s negotiated contract proceedings via fax already knows, the process of receiving a contract, signing it, scanning or faxing it, and then repeating the process multiple times virtually cries out for an electronic solution. Historically, the process of appending an e-signature was attached to Adobe PDF files, as they were trusted to remain unchanged. Then Microsoft added support for e-signatures in Office 2010. It’s been a trusted seal that’s “broken” if content is altered after a signature is applied.

DocuSign uses a similar approach, with a laundry list of security protections. Now, however, customers who already use Office 365 can add support for the e-signature technology from their consoles. Support for Outlook, Word, SharePoint Online and SharePoint Server 2013 has been included, DocuSign said. DocuSign also adopted Windows Azure Active Directory to provide single sign-on capabilities with Office 365 credentials.
DocuSign will show off (and most likely launch) the new apps at the Microsoft SharePoint Conference in Las Vegas, which runs from March 3 through March 6. More details can be found on its website, DocuSign said. 
Microsoft’s own Office Store has been relatively bereft of its own apps, either indicating that Microsoft itself has left no stone unturned, or that developers haven’t seen a need to join the Office app store party. Developers who’ve written for the platform have said they haven’t seen the returns they were hoping for, and the relatively low number of reviews attached to most apps seems to support that.
On the other hand, simply publishing an app like DocuSign’s eSignature to the Office Store can’t help but encourage more customers to visit. DocuSign’s customer base includes companies from American Airlines to Costco to Monsanto. In this case, DocuSign may have more to offer Microsoft than the other way round.

Types of SharePoint 2013 App

(SharePoint App) is the official name for apps you build and deploy

to SharePoint.
SharePoint Solution (.wsp)
.APP extension(.app )

The SharePoint App is a cloud-centric development model — one where the code does not reside on the same server as SharePoint.
This model mitigate the growing problems that server-side code typically Performance issue on site loading.

Types of SharePoint App

The Autohosted app is a lightweight cloud-hosted application that
auto-deploys code into Windows Azure and then surfaces this code within SharePoint 2013
When you deployed this app model,your code will be execute inside the special office 365 instance from Windows Azure.

SharePoint Hosted App
This app is consist of static html files and javascript to communicate with Office 365(a.k.a SharePoint Online) hosted list data.

Simply this app is nothing but with no server code.
You can leverage the JSOM and Silverlight on this hosted model.
To develop SharePoint hosted app,try Office 365 trial account


Provider Hosted:
Versatile and flexible app model than the above all models.
Your code runs in different domains each will be connected in cloud environment.
You can create / host application other than microsoft technologies in to SharePoint environment.
OAuth Authentication will be used between sharepoint and other application.

SharePoint 2013 boundaries and Limits

Aggregated these lists from various sources to learn and helping the user who search for specific information on SharePoint boundaries and limits.

These list are limitations only but Microsoft periodically inform or update this by testing and executing and releasing as supported limit.But its best to stick to limitation.
Supported limit can be differ and depends software and hardware upgrade.

  1. Farm Level
    Limiting the Web Application within 20 for each Farm is the best approach.
  2. Zone
    By default, 5 zones are defined by SharePoint.Its up to your design and requirement to use required zone for your business.
  3. Managed Path
    Each managed path will have its own cached portion in Web Server thus it requires reasonable CPU resources and RAM resources.Limiting up to 20 is best approach.
  4. Solution Cache
    Each web application can hold the cached data sized up to 300 MB and exceeding this will result of diminished performance.
  5. Application Pools
    10 Application pools for each WFEs.You can plan grouping the same characteristic web applications to share the same application pool to ease of load on WFE.
  6. Content Databases.
    500 for DBs for each Farm and exceeding this will increase the load on administrative tasks on the DB. Always use the Power Shell to manage SharePoint DBs.
  7. Content Database Size
    200 GB per database is supported (exceeding this causes the unexpected behaviour) and recommended size will be 100 GB for smooth site backup and restore operation.Disk subsystem performance of 0.25 IOPS per GB minimum, with a preferred value of 2 IOPS per GB for optimal performance.
  8. Site Collection size
    A single site collection can use the whole space allocated to it.That is up to 100GB in size.
  9. Site Collection per content database
     Maximum 10,000 site collection supported to per database exceeding this will be complex for upgrade process.
  10. Website collection per site collection
    Supported sites under site collection is about 2,50,000
  11. List and Library items
  • 8000 bytes per row
  • 30 million items per list.
  • Supported file size is 50 MB but can be increased upto 2GB.
  • 30 Million documents per library (400,000 Major versions and 511 minor version)

Sunday, February 16, 2014

SharePoint Search Programmatically

SharePoint Search Programmatically Below code snippet will helps you to understand how the SharePoint search can be done via code Of this will be useful along with your custom application in WebPart or SharePoint application Page. Here,I have one text box where query string or keyword will be typed and hit the search button.Search result will be displayed in the GridView.
 protected void SearchQuery(object sender, EventArgs e)
            using (SPSite site = new SPSite(SPContext.Current.Site.Url))
                KeywordQuery searchText = new KeywordQuery(site);
                searchText.ResultsProvider = SearchProvider.Default;
                searchText.QueryText = txtSearch.Text;
                searchText.ResultTypes |= ResultType.RelevantResults;
                ResultTableCollection resultTableCols = searchText.Execute();
                if (resultTableCols.Exists(ResultType.RelevantResults))
                    ResultTable searchResult = resultTableCols[ResultType.RelevantResults];
                    DataTable dt = new DataTable();
                    dt.Load(searchResult, LoadOption.OverwriteChanges);
                    grdView.DataSource = dt;

                    grdView.EmptyDataText = " No result found !";

SharePoint 2010 Search Programmatically

Anonymous Types in C#

On run time, If you want to keep key/value pair data other than typed class or generic class.
You can use the "Anonymous Type" in C# language.
It’s useful when it’s conjugate with LINQ.

var myClass = new {ClassName="SPList",NameSpace="Microsoft.SharePoint"};

new operator without any class name.
You can access the attribute value as usual,
myClass.ClassName and myClass.NameSpace