Sunday, October 5, 2014

Error while powering on internal error vmware player

Today I faced a issue while using VMware player, I was trying to access my newly created vm but when I was trying to run it, it was giving me an error:

"Error while powering on internal error"

I tried lot of troubleshooting like creating new vm, re-creation of vm, reinstallation of VMware player. But nothing worked.

Then I found a KB on VMware site, the VMware Authorization Service is not running.

To check if service is running or not:
  1. You should be a member of Administrator group.
  2. Click Start and then type Run.
  3. Type services.msc and click OK.
  4. Locate the VMware Authorization service.
  5. Click Start the service.
So if this service is not running please run it, it will solve your problem.

Ref: VMware KB

Thursday, September 11, 2014

Observer pattern

To describe the Observer pattern, lets take an example of Football game.
The specific design problem is,

When the position of a ball changes, all the players should be notified straight away. 


Define a one-to-many dependency between objects so that one object changes state, all its dependents are notified and updated automatically.




Subject (Interface) exposes us three methods Attach, detach and notify. 
ConcreteSubject is football. Which exposes the current position to observers.
Observer (interface) exposes the update method.
ConcreteObserver is player. Which implements update method and with in this method it calls for the position of the ball and set the observerstate to the same.

ref: applying design pattern

Saturday, March 1, 2014

Sharepoint 2013 Installation on windows 2012 R2

As sharepoint 2013 first service pack has been released so there is no need to follow these steps but if you don't want to download 1.03 GB data (size of the Service pack 1). You can follow following steps to run SHAREPOINT 2013 on your Windows server 2012 R2.


1. Login to your R2 server as Administrator. Start Power Shell as Administrator and execute following statements:

Import-Module ServerManager

Add-WindowsFeature NET-WCF-HTTP-Activation45,NET-WCF-TCP-Activation45,NET-WCF-Pipe-Activation45 -Source D:\Sources\sxs

Add-WindowsFeature Net-Framework-Features,Web-Server,Web-WebServer,Web-Common-Http,Web-Static-Content,Web-Default-Doc,Web-Dir-Browsing,Web-Http-Errors,Web-App-Dev,Web-Asp-Net,Web-Net-Ext,Web-ISAPI-Ext,Web-ISAPI-Filter,Web-Health,Web-Http-Logging,Web-Log-Libraries,Web-Request-Monitor,Web-Http-Tracing,Web-Security,Web-Basic-Auth,Web-Windows-Auth,Web-Filtering,Web-Digest-Auth,Web-Performance,Web-Stat-Compression,Web-Dyn-Compression,Web-Mgmt-Tools,Web-Mgmt-Console,Web-Mgmt-Compat,Web-Metabase,Application-Server,AS-Web-Support,AS-TCP-Port-Sharing,AS-WAS-Support, AS-HTTP-Activation,AS-TCP-Activation,AS-Named-Pipes,AS-Net-Framework,WAS,WAS-Process-Model,WAS-NET-Environment,WAS-Config-APIs,Web-Lgcy-Scripting,Windows-Identity-Foundation,Server-Media-Foundation,Xps-Viewer -Source D:\Sources\sxs

D:\ is your windows installation path.

2. Download all prerequisites from the Internet and save it on local disk of the server, e.g. C:\SP2013Prereq:
SQL Server 2008 R2 SP1 Native Client
Microsoft WCF Data Services 5.0
Microsoft Information Protection and Control Client (MSIPC)
Microsoft Sync Framework Runtime v1.0 SP1 (x64)
Windows Identity Extensions
Windows Identity Foundation (KB974405)
Windows Server AppFabric
CU 1 for AppFabric 1.1 (KB2671763)

3. Install all prerequisites directly from the prerequisites folder in the download sequence, except the last two (AppFabric and CU 1 for AppFabric).
4. AppFabric requires special configuration, therefore installing it usual way is not be enough for SharePoint. Install it using following statement from command line
 
 
WindowsServerAppFabricSetup_x64.exe /i CacheClient","CachingService","CacheAdmin /gac


6. Restart your server

Congratulations! Now you will be able to start SharePoint 2013 installer directly and to continue with SharePoint 2013 installation and configuration.
 

Wednesday, February 19, 2014

Difference between Events and Delegates

Events are basically actions raised by an object when some condition met.
Like In stock class there is a property named Limit, and it raised an notification when it reaches certain limit. This notification is done by events


Delegate is more generic term which is similar to a pointer to a function.
They are generally used as a input parameter. In particular they are perfect way to implement Strategy patternFor example, if I want to sort a List of objects, I can provide a Compare strategy to the method to tell the implementation how to compare two objects.