Pages

Friday, May 31, 2013

Black highlighting of text in Datasheet view

Issue description

When you try to edit, add text to datasheet view, you would see a black highlight on your column.
Also the row height in the datasheet wont auto adjust

How to fix this
Download the below component and run it. That will help.

Access 2007 Download: Access Runtime

Saturday, May 18, 2013

OAuth in SharePoint 2013

Recently I got to hear this new term . ”OAuth”. I was reading some articles and watching some videos which was quite helpful for me .I thought of sharing this with you guys too.
OAuth(Open Authorization) is an internet protocol for creating and managing App identity. It is a cross platform mechanism for authenticating and authorizing Apps. [I don’t want to deviate from the main topic here. I will blog about Apps in a different post .In simple words Apps are self-contained pieces of functionality that extend the capabilities of a SharePoint website].OAuth is an emerging internet standard already used by social networking giants like Facebook, Google and Twitter.
OAuth allows app identity to be recognized apart from user identity .Apps must be granted permissions independently of user permission .By default App is constrained in what it can do during and after installation .It can request installing user to grant specific types of permissions .Apps can be granted more permission than what the current user has(elevated permission)
OAuth Concepts and Terms
Content Owner(s) - User(s) who can grant permission to content in a site
Client App - Remote App that needs permission to site content. It needs to be authenticated and granted permission to site content. The Client App runs its own App server
Content Server - Web server that runs the site with content (SharePoint web server)
Authentication Server - Trusted server that authenticates Apps and creates OAuth tokens.

Windows Azure Access Control Services (ACS)
ACS is required for OAuth implementation in SharePoint2013.ACS acts as an authentication server. It should be trusted by the Content Server and the Client App. ACS is automatically configured for sites in Office 365 tenancy.In the case of an On-Premise farm, a trust to ACS must be configured with PowerShell.
Registering a new App Principal [in simple words – adding a new App ;-)]
SharePoint2013 has an application page for registering SharePoint Apps. http://sitename/_layouts/15/appregnew.aspx  
This can be done via PowerShell too.
The components for this registration process are:
AppID (Client ID) - GUID to identify application.                                                                
AppSecret - Signing key to sign, encrypt and decrypt messages. Both ACS and Client App would have App Secret. AppSecret is a Base64 encoded string.                                                                         
Title - Title of the App.                                                                                                               
App URI - Base DNS name to get to the App.                                                                          
Redirect URL
OAuth Protocol Flow in SharePoint 2013
The picture below might not be that eye catching. I created it in a Visio. It is a humble effort to make it look presentable J

1. SharePoint authenticates user using claims [and creates SAML tokens]
2. SharePoint requests context token for user
3. ACS returns context token
4. SharePoint pass context token to User.
5. User POSTS to Client App passing context token.
6. Client App is able to pull refresh token out of context token. Client App then passes refresh token to ACS to request OAuth token.
7. ACS returns OAuth token to Client App
8. Client App makes CSOM/REST calls to SharePoint site passing OAuth token.
9. SharePoint returns content to Client App
10. Client App returns HTML to user device

Note: ACS and OAuth can be used in Office 365 and in On-Premise farms.Trusts to ACS already configured for Office 365 sites. On-Premise farms require explicit configuration.

Thursday, May 16, 2013

How to create a new Site Collection in a new Content Database from Central Administration


Please note that I am performing the below exercise on SharePoint 2013.

I am breaking this activity into two:

a) Creating a new content database
b) Creating a new site collection in the newly created content database

Creating a new content database

1) Browse to Central Administration -> Application Management -> Databases -> Manage Content Databases (Page Name - CNTDBADM.aspx)


2) Choose the web application (where you are going to create the site collection) from the drop down. Make sure all existing databases show the status as Stopped. If not click on the database that is in Started state and change the Database status to Offline. Click OK



3) Back to Content Databases page (CNTDBADM.aspx). Click on Add a content database
4) Enter the details: Database Server, Database Name .Click OK




5) The new content database would be listed in your Content Database page and status would be Started

Creating a new site collection in the newly created content database

1) Browse to Central Administration ->Application Management ->Site Collections ->Create site collections.
2) Choose the web application (where you are going to create the site collection) from the drop down.
3) Enter the details : Title ,Description ,URL ,Select Experience Version ,Select a template ,Primary and Secondary site Collection Administrator ,Quota Template(if any).click OK.
4) Site collection would be created in the new content database.

Tuesday, May 14, 2013

How to Rename a SharePoint 2007 WebApplication


There are couple ways of doing this:

1) Un-extending your web application and re-extending it again [I haven’t done this, as I felt this was risky.]
2) The method which I am going to detail in this post.

I was doing this on my PRODUCTION directly. So I preferred the second method.This is the least risky way of doing this.
If I have a web application named http://oldweb.fahad.com,and I want to rename it to http://newweb.fahad.com
How do I do this?

Follow the below steps:

1) Login to your Central administration.
2) Alternate Access Mappings. Add one more entry for http://oldweb.fahad.com [The new entry is http://newweb.fahad.com ].Chose the zone as Intranet.
3) Edit Bindings in IIS. Add one more entry for oldweb.fahad.com [The new Host Name entry is newweb.fahad.com ].
5) Make the host entries in DNS.

P.S. Note that you will lose your alerts and workflows associations by doing this.

Monday, May 13, 2013

SharePoint 2013 Search Architecture and Components


I was reading through some articles on SharePoint 2010 Search and trying to get the concept embedded on to my brain. I will post more those in a different post.And here comes SharePoint 2013 Search with an even improvised architecture. The FAST Search has been integrated with SharePoint 2013.SharePoint Search is further componentized now.

There are 6 Search Components and 4 Search Databases.

Before you read this article, I would say, complete wipe off the previous Search concepts from your mind. Though the underlying Search architecture is same, it is better to start fresh.

In a nutshell the six Search Components are:
1) Crawl Component
2) Content Processing Component
3) Index Component
4) Query Processing Component
5) Administration Component
6) Analytics Processing Component

The databases associated with Search are:
1) Crawl DB
2) Search Administration DB
3) Link DB
4) Analytics DB

Crawl and Component Process
1)  Crawl Component [CC]
The Crawl Component crawls the content sources and delivers the crawled items [the content and the metadata] to Content Processing Component. Crawl Component uses the Crawl DB to store information about crawled items [like last crawl time, historical information about crawled items etc.]
2) Content Processing Component [CPC]
Content Processing Component is placed between the Crawl Component and Index Component. The crawled items are processed by the Content Processing Component and fed into the Index Component. The processes include document parsing and property mapping.

Index and Query Process
3) Index Component [IC]
The Index Component gets the processed items from the Content Processing Component and writes it to an index file. The Index component receives the queries from the Query Processing Component and provides the results sets
4) Query Processing Component [QPC]
The Query Processing Component is placed between the front end and the Index Component. It analyses and processes search queries and results. The processed search query is submitted to the Index Component. The Index Component returns the result set based on the processed query to the Query Processing Component. This result is send to the front end by the Query Processing Component.

Search Administration
5) Administration Component [AC]
The Search Administration Component is responsible for running the system processes essential to search. It does the provisioning part [adding and initializing search components] .The Administration Component uses the Search Administration DB. We can have multiple Administration Component for a Search Service application. But at a time, only one would be active.

Analytics Process
6) Analytics Processing Component [APC]
Analytics Processing Component analyzes the crawled items (search analytics) and how users interact with the search results (usage analytics). Analytics Processing Component improves the search relevance and creates search reports with these information. The results from this analysis is send to Content Processing Component to include in the Search Index. This information on usage analytics is stored in Analytics Reporting DB. The Link DB stores information extracted from Content Processing Component. It stores data about search clicks and search results. This information is stored unprocessed. The Analytics Processing Component does the analysis.


Sunday, May 12, 2013

Managed Account 20 characters limit


This is something I never noticed in my previous SharePoint Installations. Did you ever know that the maximum character limit on the SharePoint service account is 20 characters?

I was not able to register the service account with the name longer than 20 characters
This is what I did

I tried to create a Managed Account via Central Administration

1) From Central Admin -> click Security->General Security -> Configure managed accounts"
2) Clicked on "Register Managed Account"
3) In "User name" entered Domain\Service-Account (obviously more than 20 characters)
4) Entered password
5) I created my service account with passwords that never expires left the boxes below that as it is.

The following error occurs: The specified user Domain\Service-Account could not be found. Some or all identity references could not be translated.

I tried doing the same via PowerShell and this is what I got.
$cred = Get-Credential Domain\Service-Account
New-SPManagedAccount -Credential $cred
  



Lesson Learned: Plan for your service accounts ahead and keep it less than 20 characters if you want to register them as a managed account

Sunday, May 5, 2013

How to create Custom Metro Tiles on your SharePoint 2013 Website

SharePoint 2013 site home pages has a Metro Tiles menu. Have you ever wondered if we can create custom Metro Tiles for our purpose.


Yes we can do this.Below is how you do that.

1) Browse to the home page of the site.On the right top side of the site, click on Add an app



3) Select the App - Promoted Links




4) Give the App a unique name. In this case Custom Tiles. Click Create


5) Click on the newly create App list.


6) Click on Items and Add a new item to this App list




7) Enter the values as shown. I have left the background image location as blank.
If you wish to have a background image for your tile, please upload an image to the Site Assets library and provide the web address in the below marked area.

When you click on the tile, the description in the marked area would become active.

Select the value for Launch Behavior as New Tab so that the link opens in new tab.

Also you can specify the order in which you want your tiles to appear.






8) This is your first custom Metro tile.


9) Repeat steps 6 and 7 again to have multiple tiles.







10) Browse to the Home Page of your site. Page -> Edit->Edit.


11) Then click on Insert Tab -> Web Part




12) In the Apps section, select Custom Tiles from the existing list and Add.




13) Once you add the web part, click Save to save the changes on the page.


15) You get to see your custom Metro tiles now.