Wednesday, 24 April 2013

How to setup / configure Microsoft Office Web Apps 2013 with SharePoint 2013

How to setup / configure Microsoft Office Web Apps 2013 with SharePoint 2013

Recently, I was asked by by Team lead to setup Single Server Test Environment for SharePoint 2013 configuration with Microsoft Office Web Apps 2013.

First I thought , I just have download and run setup of Microsoft Office Web Apps 2013 and I am done with it. But when I started the proceedings, I faced some issues which I will be listing down to help someone and save their precious time rather than googling and trying to find the solution of the problems which someone have to face while configuring Microsoft Office Web Apps 2013. There are other blogs which avaialable but those blogs have not yet discussed any of the issues I was facing at the time of configuration.

Microsoft Web Apps : It is used to access and read / edit office documents like Ms-Word, Excel, OneNote and PowerPoint online , or you can say it opens the office documents online in browser rather than opening in Client Application of Office.

By default in SharePoint , excel usually opens without the need of WebApps but documents like Word and PowerPoint are first downloaded and then are opened in Client App.

Now lets start proceedings :
  1. Before you start, let me tell you that  Microsoft Office Web Apps 2013 requires a seperate server: a.) It should be a seperate server than the SharePoint 2013 with Windows Server either Windows Server 2008 R2 or Windows Server  2012.    b.) Microsoft Office must not be installed on the server on which you are going to install Microsoft Office Web Apps 2013.  c.) Server must be on domain. d.) Add the domain user in the Administrator group server on which you are going to install Office Web App 2013. e.) Login / RDC the server on which you are going to install Office WebApp Server 2013 with the (domain + Administrator ) rights user and then start the further proceedings.
  2. First we have to download setup for the Microsoft Office Web Apps 2013, visit the link below and download "wacserver.img". Or you can click download link :
  3.  As you can see file extension is ".img", so its a package which you need to open / extract. You can use "Extract Now", which can be downloaded from the following link:
  4. After "wacserver.img" file has bee downloaded. If you are using Extract Now for extraction , drag and drop the "wacserver.img" file on the white area in the Extract Now and then extract the file where you want to.
  5. Office Web App Server 2013 does not have any pre-requisites installer file, so we have to install all the pre-requisites one by one. Basic pre-requisites are :
  •  Windows PowerShell 3.0
  •  Dot Net Framework 4.5 ( Which is already available in / installed by default in Windows                                                   Server 2012)
  • IIS 7.5 , 4.0 (in Windows Server 2012 its IIS 8 )
  • All the above can be installed from Server Manager :

7. Now, we are ready to run setup for Microsoft Office WebApp 2013, run the setup file in the package you have downloaded.
(If you try to install the Office Web Apps on the same server on which you sharepoint is installed it will not allow you to continue, pluse if you have installed microsoft office , it will not allow you to continue proceedings until you uninstall the Microsoft Office.)

8.Once setup is completed successfully, you need to setup a farm site on the same server on which you have installed the Office Web App Server. So for that you need to execute some commands on Windows Power Shell. (open Windwos Power Shell By Run as Administrator)

9.Execute following command on Windows Power Shell: (this step can be performed before you run setup for the office web app server )
Add-WindowsFeature Web-Server,Web-Mgmt-Tools,Web-Mgmt-Console,Web-WebServer,Web-Common-Http,Web-Default-Doc,Web-Static-Content,Web-Performance,Web-Stat-Compression,Web-Dyn-Compression,Web-Security,Web-Filtering,Web-Windows-Auth,Web-App-Dev,Web-Net-Ext45,Web-Asp-Net45,Web-ISAPI-Ext,Web-ISAPI-Filter,Web-Includes,InkandHandwritingServices

10. And then for setting up a single server test enviroment farm for office web apps, execute following command:
New-OfficeWebAppsFarm –InternalURL "http://servername" –AllowHttp -EditingEnabled
(if you are not logged inn as (domain + admin ) rights it will show message of login failure and authentication failure)
11. To check whether the above executed command has setup the Farm for office web apps or not , open the following url in your browser:
and it will return you xml like below screenshot:

12. Now its time to connect / configure your sharepoint server to utilize the office web app server. To do that you need to run a command on your sharepoint server. Now login / RDC your sharepoint server and open Management Shell from 
Programs > SharePoint Products > SharePoint 2013 Management Shell ( Run as Administrator)

13.Execute following command:
New-SPWOPIBinding -ServerName <WacServerName> -AllowHTTP
Where <WacServerName> will be replaced from the name given to your Office Web App Server. As in my case it was "SP-WebApps", so my command was:
New-SPWOPIBinding -ServerName SP-WebApps -AllowHTTP
and press enter. It will create a new binding for the SharePoint with office web app server and will show all bindings like below:
(If your server will not be on the same domain, this command might show an error of unable to contact the server)
14. Now execute following command on the sharepoint server management shell:
It will show the sharepoint webapps zone details, which will be:
internal-https (by default)
To change it to use normal http , execute following command
Set-SPWOPIZone –zone “internal-http”
Now again run Get-SPWOPIZone command for confirmation that it has been set correctly.
For other description explaination and advanced configuration you can visit:
That's all, we are now done with it.!! Open your SharePoint Site and open any document that is uploaded in library, it must now show / open in browser like below:
For the video demo:

Hope that will help someone!!

Thursday, 18 April 2013

Unicode characters being displayed as Boxes and Questions marks

Unicode characters being displayed as Boxes and Questions marks

Recently I faced a problem while development of a multilingual website, which was in English and German language, it was showing some german characters as Box ad Questions marks just like :

(Internet Explorer)

(Google Chrome)


Reason was that, I was using notepad++ and notepad as the developmnet enviromnet as the development platform was PHP, so when I was saving the files it was being saved as ANSI coding and other than UTF-8.


What I did, I re-opened the files having unicode content/characters, in Visual Studio or in Notepad.

Visual Studio
In visual studio, right click on the source page on any white area and take properties, it will show you the coding it is being following, change that to UTF-8 and if it is already selected then just save the file as it is again, and then again check , your issue must have resolved, and it must now show the characters properly in browsers.

In notepad, click File > Save As, and then at the time of saving the file, there must be a coding technique option dropdown, by default there could be ANSI selected. Change that to UTF-8,  and don't forget to change file type to "All files" , other wise it might concate ".txt" (dot text) extension with the file extension, as in my case, file extension was "file_name.tpl" , but it save it as "file_name.tpl.txt".

That was all, hope it could help someone!!!

Thursday, 4 April 2013

How to Register your App with Facebook

How to Register your App / Website with Facebook

Following below steps to register your app / domain to integrate your app / website with facebook :
1. Login with facebook account or Register for new account on facebook.
2. Then go to Settings > Create an App.
3. Then click "Apps" tab.

 4. Then click "Create New App". Type name for your application and then click continue.
(It will check for the name validation, if it will be OK, it will show message "Valid"on the right side of the app name input box.)
 5. Then in the next screen it will ask for the human verifcation code / captcha. type in the code given in the picture and click continue.
6. It wil then take you to the app page, where you will note the "App ID" and "App Secret" key, which will be used by the facebook SDK to authenticate your application with facebook. and also you will provide the app domain / url , of your website, which will then include your website in the white list. Else it will not acknowledge / authenticate the requesting domain, if you will not provide the address. and will give / prompt message of invalid url.
7. After all these steps click "Save".

Hope that helps!!!!