July 6, 2014

Windows 2012 installation issue in VM player

When you tried to create a new VM using VM player 6.0.2 with Windows 2012 as the guest OS, you may get error while guest OS installation.
The error will tell "Microsfoft Terms not able find..." and installation can not continue.

Follow below steps:
1. When you create VM by clicking on "New VM" option in player., Uncheck the install OS from drive or USB option and select install OS later option.
2. After VM is created with specified Hardware configuration, configure CD/DVD drive to your OS media and start the installation.
3. You can see, OS gets installed with out any problem. It is a know bug in VM Player

Sharepoint 2013 Installation

Have been eager to work with Sharepoint since MOSS 2007. But just last week got a chance to start working..

I personally have heard lot of ghost stories about Sharepoint installations ever since 2007.. So I wanted to try it out my self. 

I tried installing and configuring it in two server platforms.. One with Windows 2008 R2 Standard edition and another in Windows 2012 Standard edition / Data Center Edition (As a VM in VM Player running in Windows 8.1)

Before I begin, a small note...
It is not possible to install Sharepoint 2013 in Windows 2012 R2, as MS is supposed to release SP1 / update 1 to Sharepoint 2013 which will enable it to install it in Windows 2012 R2 ( as of now). Please refer to MS article.. (In my case I had Core i3 II Gen, 8 gB RAM, 500 GB HDD @ 7200 RPM as host and allocated 100 GB HDD and 5 GB RAM to Guest in VM)

Once OS (either Windows 2008 R2 or Windows 2012) is installed. Please proceed as per following steps to install Sharepoint 2013 / Sharepoint Foundation 2013.

Note: You can't install Sharepoint 2013 / Sharepoint foundation 2013 in client operating systems. You will need server edition.

Part 1
  1. Install .NET 3.5 SP1 and .NET Framework 4.0.
  2. Configure Application Server Role and Web server role in the Windows.
    • Launch Server Manager
    • Click on “Add roles and features”.
    • On the “Before you begin” page, click “Next”.
    • Select “Role based or feature based installation” and click “Next”.
    • If it isn’t already selected, select “Select a server from the server pool”, and the server that you are currently working on. Then click “Next”.
    • On the “Select server roles” page, check “Application Server”, “Web Server (IIS)”, and (EDIT:) “IIS 6 Management Console” (under Web Server (IIS)->Management Tools->IIS 6 Management Compatibility->IIS 6 Management Console.). NOTE: When you check “Web Server (IIS)” or “IIS 6 Management Console”, another dialog will pop up, asking “Add features that are required for ?” Click on the “Add Features” button here. This will return you to the “Select Server Roles” page. After adding all 3 roles, click “Next”.
    • On the “Select features” page, expand “.NET Framework 4.5 Features” group by clicking on it. In here, check “ASP.NET 4.5″.
    • On the same page, check “Windows Identity Foundation 3.5″. Click “Next”.
    • On the “Application Server” page, click “Next”.
    • On the “Select role services” page, check “Web Server (IIS) Support” and click “Next”.
    • When the “Add features that are required for Web Server (IIS) Support?” dialog pops up, click on “Add Features”.
    • Click “Next” again to go to the next page.
    • From the “Web Server Role” page, click “Next”.
    • From “Select role services”, click “Next”.
    • On the “Confirm installation selections” page, I suggest that you check “Restart the destination server automatically if required”. (You’re going to need to reboot eventually anyway.)
    • Click “Install”.
    • Wait for feature installation to complete. When it does, you can click “close”. If the server doesn’t restart automatically, reboot it.
    Part 2
    1. Install Windows Updates (at least recommended) and restart the server.
    2. Download all following Prerequisite and keep it in a folder
      1. Microsoft .NET Framework 4.5
      2. Windows Management Framework 3.0 (CTP2)
      3. Microsoft SQL Server 2008 r2 Native Client
      4. Windows Identity Foundation (KB974405)
      5. Microsoft Sync Framework Runtime v1.0 SP1 (x64)
      6. Windows Server AppFabric
      7. Windows Identity Extensions
      8. Microsoft Information Protection and Control Client
      9. Microsoft WCF Data Services 5.0
      10. CU Package 1 for Microsoft AppFabric 1.1 for Windows Server (KB2671763)
    3. You can install all of the above except item # 6 and #10 in the prerequisite list by clicking on same.
    4. Once you have installed, mount your Sharepoint 2013 image (.ISO)
    5. Once you have mounted it, you can see "prerequisiteinstaller.exe" in the root folder of Sharepoint 2013 mounted drive.
    6. Run "Powershell" console.
    7. Type following command to install and start product configuration in sharepoint 2013.
      1. your prompt(SharePoint image location)> Prerequisiteinstaller.exe /AppFabric:"\setup.exe" /KB2671763:"\AppFabric1.1-RTM-KB2671763-x64-ENU.exe"
          • You may get error some times in that case just prefix the command with "./"
          • ./Prerequisiteinstaller.exe /AppFabric:"\setup.exe" /KB2671763:"\AppFabric1.1-RTM-KB2671763-x64-ENU.exe"
                                    The above will complete the Sharepoint 2013 pre-requisite installation and Product installation can be invoked or Pre-requisite installer will launch the product wizard.

                                    When you invoke product configuration wizard (SandBox installation mode), the server will launch the process and in all probablity it will fail in step 5 with following image.

                                    Follow below steps to resolve and re-run the wizard.

                                    1) If you are running SharePoint Foundation, navigate in the Windows File Explorer to C:\Program Files\Windows SharePoint Services\15.0\Data.  If you are running SharePoint Server, navigate to C:\Program Files\Microsoft Office Servers\15.0\Data\Office Server.
                                    2) You’ll see a folder in this directory called “Analytics_”, for example, “Analytics_939ab742-745f-456c-8623-fddca9b02334″ (your GUID will be different, of course).
                                    3) Right click on the folder and select “Properties”.
                                    4) Click on the “Sharing” tab, and then click on “Advanced Sharing…”.
                                    5) Check the “Share this folder” checkbox.  Leave the default share name.
                                    6) Click on the “Permissions” button near the bottom.
                                    7) Click the “Add..” button.
                                    8) In the white textbox on the bottom, type   “NETWORK SERVICE; WSS_ADMIN_WPG”.  Then click the “Check Names” button to make sure that the users resolve.
                                    9) Click OK.
                                    10) Select each user that you just added (NETWORK SERVICE and WSS_ADMIN_WPG), and check the “Full Control” checkbox in the “Allow” column.
                                    11) Click “OK” to save the permissions.
                                    12) Click “OK” to save the share settings.
                                    13) Click “Close” to exit the dialog box.

                                    After this step you can, see that Sharepoint 2013 installation will be successful and you can proceed to launch "Central Administration" site to configure required services.

                                    January 17, 2014

                                    Enterprise Library 6 Changes - Exception Handling and Logging Application blocks configuration

                                    I was developing a framework services project for my new assignment .. (getting hands dirty after a while .. :) ).. Seems that there is a change in the way we configure our helper classes to log and handle  exception

                                    For Logging:

                                    common approach to create a log entry using the following code-

                                    LogEntry entry = new LogEntry();
                                    entry.Message = "I am logging";

                                     works fine with Enterprise Library 5.0. But in 6.0 it gives the error "The LogWriter has not been set for the Logger static class. Set it invoking the Logger.SetLogWriter method" 

                                    Following snippet will fix the issue

                                    IConfigurationSource configurationSource = ConfigurationSourceFactory.Create();
                                    LogWriterFactory logWriterFactory = new LogWriterFactory(configurationSource);
                                    LogEntry entry = new LogEntry();
                                    entry.Message = "I am logging";

                                    For Exception Handling

                                     public static bool HandleException(Exception exceptionToHandle)
                                                IConfigurationSource config = ConfigurationSourceFactory.Create();
                                                ExceptionPolicyFactory factory = new ExceptionPolicyFactory(config);
                                                return ExceptionPolicy.HandleException(exceptionToHandle, 

                                    Don't forget to add reference to "System.Configuration" assembly to your project, else you will get error and add it in the "using" list.

                                    June 8, 2011

                                    Some useful SQL Queries on Date functions

                                    TO Calculate first day of month
                                    select DATEADD(mm, DATEDIFF(mm,0,getdate()), 0)

                                    First Day of Year
                                    select DATEADD(yy, DATEDIFF(yy,0,getdate()), 0)

                                    First Day of the Quarter
                                    select DATEADD(qq, DATEDIFF(qq,0,getdate()), 0)

                                    Last day of Prior month
                                    select dateadd(ms,-3,DATEADD(mm, DATEDIFF(mm,0,getdate() ), 0))

                                    Last Day of Prior Year
                                    select dateadd(ms,-3,DATEADD(yy, DATEDIFF(yy,0,getdate() ), 0))

                                    Last day of current month
                                    select dateadd(ms,-3,DATEADD(mm, DATEDIFF(m,0,getdate() )+1, 0))

                                    Last Day of Current Year
                                    select dateadd(ms,-3,DATEADD(yy, DATEDIFF(yy,0,getdate() )+1, 0))

                                    January 10, 2011

                                    Web Application Performance Best Practices

                                    Some of the thumb rules to flare better perfomance in web applications

                                    §Appropriate usage of Caching
                                    §Minimize HTTP Requests
                                    §Removed unwanted HTML / JS / CSS
                                    §Remove White Spaces
                                    §Place CSS at Top of the page
                                    §Move JS reference to the bottom of the page
                                    §Reduce Image Size
                                    §Cache Static content (Images / CSS / JS)
                                    §Enable HTTP Compression
                                    §Remove Duplicate Scripts

                                    •Use a Content Delivery Network
                                    •Add an Expires or a Cache-Control Header
                                    •Avoid CSS Expressions
                                    •Make JavaScript and CSS External
                                    •Remove Duplicate Scripts
                                    •Don’t scale images in HTML
                                    •Flush the Buffer Early
                                    •Reduce the Number of DOM Elements
                                    •Minimize the Number of iframes
                                    •No 404s
                                    •Minimize DOM Access
                                    •Optimize CSS Sprites
                                    •Keep Components under 25K

                                    Analysis Services 101

                                    Here is intro course to BI Analytics...

                                    1. Facts(Measures) is a summable numeric value
                                    2. Only events tracking in Fact table known as fasctless fact tables, in that case add column with value 1 to track them.
                                    3. Grain is the lowest possible level of information in fact, make it as lowest as possible. Atomic level.
                                    4. Facts are verb in Business process where as Dimesnions are nouns.
                                    5. Dimension shared across more than 1 business process is known as Conformed Dimension
                                    6. Surrogate keys (Meaningless , non-natural, artificial, ) is int value associayrf with each rown in dimesnion
                                    7. Dimensions with Changeable attribute is called Slowly Changing Dimesnions (SCDs)
                                    Type 1 SCDs overwrite old value
                                    Type 2 SCDs have new row for every new change
                                    Type 3 SCDs provide option of columns (not commonly followed and not scalable)
                                    8. Data Dimension classic example for role Playing Dimension... better to have surrogate keys in year-month0date format since 20050221(would help for partitioning)
                                    9.Dimension that doesn't have attributes are known as Degenerated Dimensions (e.g TransactionID)
                                    10.Discourage Snowflake schema, Analysis 2000 has little inclination towards it but not 2005
                                    11. Bridge table required when we have many-many dimensions, called Intermediate Fact Tables in Analysis Services 2005
                                    12. Fact Table types, Periodic Snapshot, transaction and accumulating snapshot

                                    DB Normalization in simple

                                    This is one of the most frequently used question..lot times we know the thing have difficulty in expressing it...thot would write a simple post for it...

                                    First Normal Form (1NF)
                                    • Eliminate duplicative columns from the same table.
                                    • Create separate tables for each group of related data and identify each row with a unique column or set of columns (the primary key).

                                    Second Normal Form (2NF)

                                    • Meet all the requirements of the first normal form.
                                    • Remove subsets of data that apply to multiple rows of a table and place them in separate tables. Create relationships between these new tables and their predecessors through the use of foreign keys.

                                    Third Normal Form (3NF)

                                    • Meet all the requirements of the second normal form.
                                    • Remove columns that are not dependent upon the primary key.

                                    Fourth Normal Form (4NF)

                                    • Meet all the requirements of the third normal form.
                                    • A relation is in 4NF if it has no multi-valued dependencies.