Monday, March 2, 2015

IIS, NodeJS, IISNode, PhantomJS

Step by Step installing NodeJS and PhantomJS on IIS using IISNode

  1. Download: latest NodeJS, IISNode, and PhantomJS for windows.
  2. On the server, make sure IIS is activated from Windows Feature. If it is not activated, please activate first.
    Windows Feature - Internet Information Service - Web Management Tools - IIS 6 Management Tools
    More details see here
  3. Install NodeJS
    No need to check anything after install. In here I use the default installation folder which is in C:\Program Files (x86)\nodejs
  4. Install IISNode
    Similar with nodejs, IISNode is installed in the default folder.
    After install IISNode, need to do several steps below:
    • check iisnode folder after installation
    • inside the installation folder, it will contains several files as well a www folder. Add IIS_IUSRS to www folder security. Assign Read and Write permission. To make it simple I give Full Control access.
    • Create 1 website in IIS for IISNode, where the physical path is the www folder.
    • run setupsamples.bat
    • once success, go to the site that we setup to check is the iisnode configuration already correct.
    • on www folder, there are several folders and in each folder exist 1 web.config file. In this case, I only want to test the iisnode installation. Therefore, in helloworld folder, I modify the web.config to include the iisnode configuration below.
       <iisnode     
          node_env="%node_env%"  
          nodeProcessCountPerApplication="1"  
          maxConcurrentRequestsPerProcess="1024"  
          maxNamedPipeConnectionRetry="100"  
          namedPipeConnectionRetryDelay="250"     
          maxNamedPipeConnectionPoolSize="512"  
          maxNamedPipePooledConnectionAge="30000"  
          asyncCompletionThreadCount="0"  
          initialRequestBufferSize="4096"  
          maxRequestBufferSize="65536"  
          watchedFiles="*.js;iisnode.yml"  
          uncFileChangesPollingInterval="5000"     
          gracefulShutdownTimeout="60000"  
          loggingEnabled="true"  
          logDirectory="iisnode"  
          debuggingEnabled="true"  
          debugHeaderEnabled="false"  
          debuggerPortRange="5058-6058"  
          debuggerPathSegment="debug"  
          maxLogFileSizeInKB="128"  
          maxTotalLogFileSizeInKB="1024"  
          maxLogFiles="20"  
          devErrorsEnabled="true"  
          flushResponse="false"     
          enableXFF="false"  
          promoteServerVars=""  
          configOverrides="iisnode.yml"  
             nodeProcessCommandLine="C:\Program Files (x86)\nodejs\node.exe"  
          />  
      
    • We use nodeProcessCommandLine to specify the nodejs executable url.
    • Save the web.config and check whether helloworld.js already opened ok in browser without any error in page.
  5. After IISNode is working, extract PhantomJS to a folder.
    I extracted PhantomJS zip to C:\phantom
    • Need to add C:\phantom\bin (phantom.exe location) to windows PATH.
      Run in windows command prompt: setx path "%path%;C:\phantom\bin"
    • test by running : phantomjs --version into command prompt
      If it is showing the version then phantom is installed.
      If showing, phantom is not recognized then the server should be restarted.
    • After restart, check again the phantom version in command prompt

Thursday, October 3, 2013

Workflow Manager Setup in SharePoint 2013 VM

Installing Workflow in SharePoint 2013 VM for development is not as easy as I thought.. Because of a hardware limitation, I installed the workflow in my SharePoint VM. It is not the best practice solution but it is working for my development environment.

We can get all the installer needed using Web Platform Installer. I used the latest version which is 4.6.
We can search workflow in there, and download:
- Workflow Manager 1.0
- Workflow Manager 1.0 Cumulative Update 1
- Workflow Client 1.0
- Workflow Manager Tools 1.0 for Visual Studio 2012

I followed this guide below to install workflow manager in my VM:

http://technet.microsoft.com/en-us/library/jj193478

Make sure we use another account beside farm administrator to prevent error in configuring the workflow manager.

I got error related with scope for "/SharePoint/default" is not available. I found the issue can be handled by adding a scope in sharepoint workflow root by following this article below:

http://fangdahai.blogspot.com/2013/04/on-premise-windows-workflow-server.html

After that, I can successfully create and deploy a workflow from my visual studio to my SharePoint list.

Installing and Configuring SharePoint 2013 for on premise development

Finally..

It's time to have SharePoint 2013 in my local vm..

This is how I make it works in my local vm..

I followed the guidelines in below articles:

http://www.stephensaw.me/installing-sharepoint-2013-on-windows-server-2012-part-1/
http://www.stephensaw.me/installing-sharepoint-2013-on-windows-server-2012-part-2/
http://www.stephensaw.me/installing-sharepoint-2013-on-windows-server-2012-part-3/

Those articles will help until finished installing Windows Server 2012, SQL Server 2012, and SharePoint Server.

Beside from stephensaw site, these articles below also good for guideline:
http://consultingblogs.emc.com/randyrempel/archive/2013/03/17/installing-and-configuring-a-three-server-sharepoint-2013-environment-part-1-of-4.aspx
There are 4 articles in there..

While installing also need to make sure to create several users for SharePoint farm administrator, SharePoint Services, SharePoint Application Pool, and SQL Administrator. Assign the right permissions for those users based on articles below:

http://absolute-sharepoint.com/2013/01/sharepoint-2013-service-accounts-best-practices-explained.html
http://www.toddklindt.com/blog/Lists/Posts/Post.aspx?ID=391

Several additions needed to make it works:

- Turn off the Firewall in VM
- Install .NET framework 3.5
http://blog.areflyen.no/2012/10/23/installing-workflow-service-for-sharepoint-2013-preview/
http://blogs.msdn.com/b/fabdulwahab/archive/2013/08/29/sharepoint-2013-installation-and-configuration-issues.aspx

To install Visual Studio 2012, I found several articles that helps:
http://blogs.msdn.com/b/timquin/archive/2013/01/22/setting-up-visual-studio-2012-for-sharepoint-2013-development-offline.aspx
http://msdn.microsoft.com/en-us/library/ee554869.aspx

And..

My SharePoint 2013 development VM is done :D