Wednesday, June 26, 2013

Configuring Machine Translation service in SharePoint 2013

Previous post, I have mentioned how to create new machine translation service. After creating the machine translation service we can configure the service. We can do this by using Central Administration or Power Shell commands.

By Using Central Admin, Go to Application Management -> Manage Service Applications

Select Machine Translation Service

In the machine translation service page, “Enable File Extensions” section, check the file types that we want to translate. If we uncheck any of the check box that file type will disable for translation.

In “Item Size Limits” section we have three text boxes for size limit,
  • “Maximum file size of binary files in KB. Microsoft Word documents are binary files” box for Microsoft word document size. The range is between 100-524288. Default value is 51200. Files more than that size will not be translated.
  • “Maximum file size of text files in KB. Plain-text, HTML, and XLIFF documents are text files” box for plain text, HTML docs, XLIFF documents. The range is between 100-15360. Default value is 5120. Files more than that size will not be translated.
  • “Maximum character count for Microsoft Word document” box for word document. The range is between 10000-10000000. Default value is 500000. Files more than that size will not be translated.

“Online Translation Connection” Section will help Machine Translation service to connect online transaction service. Default is “Use default internet settings”. If we select “Use proxy specified”, we have to enter proxy server name and port number. If we select “Use proxy specified” option, we have to restart Machine translation service.

“Translation Processes” section allows us to specify the number of transaction processes created on the each service application. This value equals to the number of translations that process simultaneously. Default value is “1”. If we change the value, we have to restart the service.

In “Translation Throughput” section allows us to specify the frequency with which groups of translations are started and the number of translations within each group. we have two text boxes,
  • In “Frequency with which to start translation” text box, we have to specify the frequency that which groups of translations to be started. Range is 1-59. Default value is 15.
  • In “Number of Translation to start” text box, we have to mention the number of translations per process. This specifies that the number of translation started per process every time translations are started. Range is 1-1000 and default value is 200.

“Maximum Translation Attempts” section represents the number of times a translation tried before its status set to fail. Range is 1-10 and default value is 2.

In “Maximum Synchronous Translation Requests”, we have to specify the maximum number of synchronous transaction requests that processed at a time on each server for service application. Range is between 0-300. Default value is 10.

“Translation Quota” section limits the usage of the service queue mode for high throughput values. We have two sections here.
  • In “Maximum number of items which can be queued within 24-hour period”, No limit is the default. If we select Limit per 24 hours, we have to type the maximum of number of items that can be queued in 24-hour period. The value must be between 100-1000000.
  • “Maximum number of items which can be queued within a 24-hour period per site subscription” No limit is the default. If we select Limit per 24 hours, we have to type the maximum of number of items that can be queued in 24-hour period per site subscription. The value must be between 100-1000000.

“Completed Job Expiration time” specifies the expiry time for the completed job history. Value range is 1-1000 and default value is 7 days. We can select “No expiration” without expiry.

“Recycle Threshold” specifies the number of documents translated by a translation process before it is restarted. Value range is 1-1000 and default value is 100. If we change this value, we have to restart the service.

“Office 97-2003 Document Scanning” specifies whether we need to disable security scanning for 97-2003 office documents. We have to enable this setting only when trust the documents to be converted. Default value is “No”. Click on “OK” to save the configurations.

By Using Power Shell script we can configure the Machine translation service, here is the script do that, 

Set-SPTranslationServiceApplication -Identity "<Machine Translation Service Application Name>" -EnableAllFileExtensions -UseDefaultlnternetSettings -TimerJobFrequency <Frequency of Timer Job> -MaximumTranslationAttempts <Maximum Translation Attempts> -JobExpirationDays <Job Expiration Days> -MaximumSyncTranslationRequests <Maximum Sync Translation Requests> -RecycleProcessThreshold <Recycle Process Threshold> -DisableBinaryFileScan <Disable Binary File Scan>

<Machine Translation Service Application Name>” - Name of the service application,
<Frequency of Timer Job>” - Timer job frequency
<Maximum Translation Attempts>” – Maximum translation attempt before showing as failure.
<Job Expiration Days>” – days to kept the job history in history logs
<Maximum Sync Translation Requests>” – maximum number of translation requests
<Recycle Process Threshold>” – number of documents to be converted before conversation process.
<Disable Binary File Scan>” – set the file scan or not.

Set-SPTranslationServiceApplication -Identity "Machine Translation Service Application" -EnableAllFileExtensions -UseDefaultlnternetSettings -TimerJobFrequency 30 -MaximumTranslationAttempts 3 -JobExpirationDays 14 -MaximumSyncTranslationRequests 20 -RecycleProcessThreshold 300 -DisableBinaryFileScan 1

We have to check Office Web Apps and an Internet connection on our front-end servers are properly configured or not. Once we check that by navigating in to documents, select and open the document using office web app.

In the info section we can “Translate” option to translate the document.

By clicking that we can see the prompt to change the language as shown the image below. 

Tuesday, June 25, 2013

Machine Translation service in SharePoint 2013

In SharePoint server 2013 we have many new service applications. Machine Translation service is one of the new in service applications. It allows us to translate the site and user content. This service will have a list of APIs, REST and Client Side Object Model support. By using API’s content can pre-translate when required or content can be translated on the fly by the users. Here the process will happen Asynchronously, Synchronously or using streaming.

Machine translation service will translate the text from one language to another language. Here the translation process will happened by using cloud-hosted machine translation service. Machine translation service will share many components with word automation service timer jobs, Documents Queue etc. Here is the simple image that explaining Machine translation service.

Machine translation service will process the translation requests asynchronously and synchronously. Jobs that submitted to the machine translation service will process synchronously when translation timer job executes configurable. Default interval for this is 15 min. We can translate Asynchronous requests manually by running SharePoint translation Service timer jobs through Central Admin or using Power Shell script.

We can create new Machine translation service by using the steps below,

In Central Admin, Application Management, select Manage Service Application

Select New Machine Translation Service.

In the “Create New Machine Translation Service Application form”, enter the Name. In the Application Pool section, if we want to use existing application, we can select “Use existing application pool”, and select the app pool wanted to use. Else, Create new Application Pool. In my case Iam creating new App pool. The account using for App pool must have the full permissions to User Profile service application.

In the “Partitioned Mode”, we have to select “Run in partitioned mode” if we are going to provide hosting services for other sites. Select “Add this service application’s proxy to the farm’s default proxy list” in the “Add to Default Proxy List” section. When we have multiple web applications and wanted to use them in different set of services, we don’t have to check the check box.

In the Database section, we have to specify the DB server name, DB name and authentication methods. Click on “OK” button.

We can configure the Machine translation service by using the Power Shell script below,

New-SPTranslationServiceApplication -Name "ServiceAppName" -DatabaseName "DBName" -DatabaseServer "DBServerName" -ApplicationPool "AppPoolName" –Default

Here ServiceAppName is the name of the Translation service, DBName is the database name for translation service, DBServerName is name of the DB server, AppPoolName is application pool name. Here is the sample script to create new translation service,

New-SPTranslationServiceApplication -Name "Machine Translation Service Application" -DatabaseName "MachineTranslationService_DB" -DatabaseServer "DBServer" -ApplicationPool "MachineTranslationServiceAppPool" –Default 
In my next post i will write how to configure machine translation service.

Monday, June 24, 2013

Shredded storage in SharePoint 2013

Shredded storage, one of the new feature in SharePoint 2013. In SharePoint, documents can be stored in a library and will be saved in Content DB as BLOB (Binary Large Objects). RBS is a set of API that gives us option to move BLOB out of SQL server content DB.

In SP 2010, BLOB allows us to improve storage performance. If we have enabled the version history, each version of the document can be saved in BLOB. That means, each new version will create a new document in DB. If we are working with 10 MB document, for 10 versions it will take 100 MB storage. If we change the metadata of the document, a new version will be created. So user changes any metadata of the document, a new version will be created in BLOB storage without changing anything in the document. There is unnecessary of document read when we change/upload the office documents in SharePoint 2010.

SharePoint shredded storage makes BLOB in to chunks by using the number of shreds. So BLOB will be divided in to large number of shreds. By using Shredded storage architecture we change the document, only the differences will be saved. Suppose we have a versioning enabled a document library and user changes the document, only changed shreds are added in to the storage point. Shreds will associate with the previous entries instead of creating new. By using shredded storage method, instead of using 100 MB in the above example we can just use 20-25MB of storage. It also reduces the amount of information that a file to be retrieved by the web server from DB that results efficiency in Input and Output.

By default shredded storage is enabled. We can enable or disable the shredded storage at web application level or site level. We can enable the shredded storage by using web service, FileOperationSettings property of the web application. We have three options for the shredded storage, UseWebSetting, AlwaysDirectToShredded, NeverDirectToShredded. Shredded storage is independent from RBS. We can use RBS with or without using shredded storage.    

Friday, June 21, 2013

Configure site access request in SharePoint 2013.

SharePoint 2013 has many improvements as User Experience, Search, Service applications. We have one more cool improvement is site access. Users can requests access to the site by using site access request. Site Administrator will check the access requests for site when he logs-in.

Site Access request settings can be changed using “Access Request Settings” on the site permission ribbon. To configure the Site Request settings, navigate to Site Settings, Select Site Permissions link in “Users and Permissions” group.

To enable the Access Requests, Check “Allow access requests” check box and enter the email address to send all the access requests.

To send the access requests to a site, enter Site Url in other browser. Pass the credentials user don’t have access to the site. SharePoint will check that user having permissions or not. If user don’t have permissions to access the site page will redirected to

We can see the page to new access request. We can see access request dialog that we can send the emails to requesting access for the site.

Once we send the request, Access request page updates as “Awaiting Approval”.
When Admin login to the site, checking the “Access Requests and invitations” link Admin can see the pending requests as shown below.

We can approve or reject the pending request as site collection administrator. 

Wednesday, June 19, 2013

Usage Reports and Popularity Trends in SharePoint 2013

SharePoint 2013 analytics has been improved a lot compared to SharePoint previous versions. MS people designed analytics to improve the search and result relevance. All the things like views, social tags, and clicks will be used in the SharePoint 2013 analytics searching capabilities.

Usage Reports: SharePoint 2013 generates the usage reports via excel. This will show the data of hits and unique users of the site. We have option to view the data of Site, Site Collection scope including each page and document library. We can access the data for the site and site collection by navigating to Site Settings page.
We have two links “Popularity Trends” and “Popularity and Search Reports” in the site settings. By Clicking on the links we can the usage reports as shown in the images below.

Most Popular Items: With Reports analytics also provides us to integrate with search results. For each page we have popularity trends on the ribbon, Share & Track section as shown in the image below.

We can see most popular items for library by checking the Most Popular Items button on the ribbon as shown below. 

By clicking on the button we can find the items that most viewed, Most Viewed by Unique Users, Most recommended clicks.

We can filter the results by using Search Driven Content section, Popular items web part to get the popular item in a page.

Monday, June 17, 2013

Debugging SharePoint production environment by using IntelliTraceCollector

I have experienced many times that my code works in Dev environment and it will not work in UAT or Production, causes quarrel between me and my QA. We can’t install the development tools and debug the code in production environment due to many reasons. Most of the cases I was used to write log files in the code itself to log the exception. These logs help me to fix the issue in production environment.  Now we have a tool that allows us to collect diagnostics data from production environment without installing Visual Studio. We have located in C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\CommonExtensions\Microsoft\ IntelliTrace\11.0.0.

MS people introduced intellitracing in VS 2010 ultimate edition. By using this feature we can get all, events and exception details. In VS 2012 we have standalone collector with .cab file. We can also download the .cab file separately.

We can check the exception in production environment running in IIS 7.0 and IIS 7.5 by using the intellitrace collector to save the data to an intellitrace .iTrace file. This will help us to check our application without installing VS. We can delete the controller by uninstalling it once we are done with collecting data because iTrace file will grow size very fast, this may effect for production environment.
To log the exceptions follow the steps below,
  • Download for VS 2012 from here 
  • Copy the cab file into some other location like D:\Intellitrace
  • Expand using D:\Intellitrace>expand /f:* D:\intellitrace. Here “.” is used to maintain the folder structure  
  • To start collecting data use following PowerShell command,
    • Start-IntelliTraceCollection <AppPool>
  • To stop collecting data use following PowerShell command,
    • Stop-IntelliTraceCollection <AppPool>
Sample script to collect the data from SharePoint application in SharePoint-9999 application pool,

Start-IntelliTraceCollection "SharePoint - 9999" "D:\IntelliTraceCollector\collection_plan.ASP.NET.default.xml" “D:\IntelliTraceLogs"

Here “SharePoint-9999” is application pool, "D:\IntelliTraceCollector\collection_plan.ASP.NET.default.xml" is the path to collection path and “D:\IntelliTraceLogs” is folder to save the .trace files.

PathToCollectionPlan, is an xml file that will have the configuration settings for the collector. We have to specify the plan to collect the logs in SharePoint applications. “collection_plan.ASP.NET.default.xml” will collect IntelliTrace events, SharePoint events, DB calls, and Web server requests. “collection_plan.ASP.NET.trace.xml” will collects only function calls and all the data in collection_plan.ASP>NET.default.xml. We can check detailed analysis by using this plan.

We have to check the following things in intellitrace,
  • Permissions: We have to give full permissions to the web application or SharePoint application for .itrace file directory and also we have to restrict the account that not working with intellitrace.
  • File Size: We have to check the trace file sizes. Max file size will not be more than 100 MB.

Wednesday, June 12, 2013

eDiscovery in SharePoint 2013

SharePoint sites will have large amount of data in documents, Social data, web pages and  email messages. We may have some legal risks with keeping the data and searching the data. In that scenario we can search and export it into usable format. In SharePoint, eDiscovery capabilities will help to achieve the requirement. eDiscovery requires searching for documents, sites, pages, emails from all the email servers, file servers and collect the data as per the format of legal case. We can simply define the eDiscovery as “the process of finding, preserving, analyzing and producing the content in electronic format as required format of investigators.
Microsoft people introduced the Hold and eDiscovery feature in SharePoint 2010. In SharePoint 2013 added few capabilities to reduce the cost and complexity of the discovery. Following are the new features introduced in SharePoint 2013,
  • eDiscovery center: it’s SharePoint site used to manage preservation, search and export the content stored in Exchange and SharePoint in SharePoint farms and Exchange servers
  • SharePoint In-Place hold: SharePoint In-Place hold will keep all SharePoint sites. It protects all the pages, documents, list items in the site and allows users to edit and delete the content.
  • Exchange In-Place hold: like SharePoint In-Place hold, Exchange In-Place hold will keep exchange mail boxes. It protects all the mail box content as same UI and API uses for SharePoint In-Place hold.
  • Query Based Preservation: it allows users to apply query filters to exchange mail boxes and SharePoint sites.

We have eDiscovery site collection in SharePoint 2013, contains identification, preservation, processing and analysis. eDiscovery center is also available in Office 365 site and can be connected to exchange. So that we can conduct the eDiscovery in SharePoint site and Exchange, Lync. In eDiscovery site collection we can create case sites that used for manage in-place holds and queries.

eDiscovery will use Search Service Application to crawl SharePoint farm. We will create a central search service farm that crawl all the data from all the SharePoint farms. We can use central level search service or specific region service. To crawl the SharePoint farm, search first uses the service application proxy. eDiscovery center uses the proxy to connect and send the preservation to SharePoint sites in SharePoint farms. We should have search service infrastructure to configure the eDiscovery feature.

Using In-Place Hold: as explained earlier we can In-Place hold to manage the data in SharePoint and exchange. Content will spread across different locations like email servers, files, CMS. In previous SharePoint versions we have a challenge for e-discovery because of many types of content like pages, lists. So it is difficult to export offline data. In SharePoint 2013 it is easy to maintain with eDiscovery sets. eDiscovery sets will identify exchange mail boxes and SharePoint sites and group them together, applies the filter to them.

Querying: We can identify the data by using querying in the eDiscovery process. eDiscovery query page will help us to identify and reduce the data by using keyword syntax, property restriction and refinements. We can preview exchange and SharePoint content to identify the results.

Data Export: The main thing in eDiscovery system is to export the data (SharePoint farm and Exchange server data). We can export the data after finalizing the query by selecting the options. We can download the search results to the machine. By using export option we can remove the duplicate Exchange content and document versions.

Tuesday, June 11, 2013

Change favicon image in SharePoint 2013 site

While working with SharePoint customization, I got a requirement to change the favicon image. I have never changed favicon image before working on SharePoint 2007 and SharePoint 2013. By default Microsoft people will have following favicon images for SharePoint 2010 and SharePoint 2013.

By default it will be located in C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\IMAGES and C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\IMAGES folders.

To Change the favicon Images open SharePoint Designer and Select the master page to set custom favicon Image. Add favicon image in default favicon location (C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\TEMPLATE\IMAGES in SharePoint 2013 or C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\IMAGES in SharePoint 2010).  In the master page check for <SharePoint:SPShortcutIcon tag, Change the image URL to favicon image to set.
Save and publish the master page and reset IIS. Finally we can see the updated favicon image as shown below. 

In SharePoint 2013, we have to change the Icon URL in html file. After changing the url in html page master page will automatically refer the same URL.

Sometimes we cannot see the favicon image immediately. In internet explorer may hold the cache items. For that situations, clear the cache and reload the page. 

Thursday, June 6, 2013

New features in SharePoint designer 2013

SharePoint designer 2013, designer tool for SharePoint 2013. We can see some major changes in SharePoint designer 2010 to SharePoint designer 2013. Following are the few changes,

No visual design: The split view design (on the bottom) is no longer available in SharePoint designer 2013. Compared to the current versions of IE, design view is an older technology that does not support many of new HTML5 and CSS tags. I hope this will cause some problems by removing the design view for few scenarios like editing aspx pages and creating Data View webparts. Sometimes it will become harder to edit the page design.

Platform dependent: SharePoint 2013 allows us to create platform dependent workflows. While creating new workflow, with name and description we will have option to select the platform type. Here we can select SharePoint 2010 workflow or SharePoint 2013 workflow. 

Following are the workflow enhancements in SharePoint designer 2013.

Copy- Paste workflow steps: Through this feature we can have the option to Copy-Paste the workflow steps, means we can copy (Ctrl-C) the workflow steps, loops, conditions, actions and Paste (Ctrl-v) them in the workflow.
After creating the workflow, we can copy the workflow steps and paste them as shown in the image below. But Paste as text option will not work.

But it will work for only few things. Suppose think a case that having look-up columns.  Copy paste will work but it will give error while running. (it will not show any errors, by clicking on the “Check for Errors” button or “Publish” buttons)

Following are the few cases that not supporting Copy – paste:
  • No support for Undo (Ctrl-z)
  • We cannot copy – paste different workflow platform types. If we try for it we’ll get the errors as following.
  • We cannot select multiple items with dragging.
  • We cannot copy the workflows across different RDP’s. We can copy paste the steps but it won’t work because there is no support for across different designers with different PIDs.
Call External web services from workflow: We have new option “Call Web Service” to get the data from external or internal web service.

Loops in workflows: In SharePoint 2010 workflows are not used to support loops. In SharePoint 2013 designer supports “Loops”. Loops are fully integrated action which we can use with in all 2013 workflows.

Dictionary type Variables: In SharePoint 2013, we have new variables has been introduced to hold an array values. There are three actions designed for Dictionary type variables, Build dictionary, Count Items in a dictionary, Get an Item from a Dictionary.

New Task Actions: New task actions are added into the task actions. Assign a task and Start a Task Process are added to assign a task to a user and assign multiple tasks to multiple users.

Visual designer: Through SharePoint designer we can create workflows visually that avoids coding. So that complexity will be reduced. We can do this in SharePoint designer through visual designer. Visio designer is included with SharePoint designer. We can see it if we install Visio in our machine. To check visual workflow designer we must install Visio 2013 and Windows Azure workflow. We can see the installation guide here.

Windows Workflow Foundation 3.0 are deprecated: Some features of SharePoint 2010 workflow platform that depends on Windows workflow foundation 3.0 are deprecated in SharePoint 2013. The reason is new SharePoint WF’s are built up on WWF 4.5 and it is not integrated with Workflow Manager 1.0

Improved Email Editor: We have easier to format workflow email messages by using a standard formatting toolbar to the workflow email editor.