Thursday, June 25, 2015

Unable to Update OnPropertyChanged

Add this nmethod after OnPropertyChanged("");

Monday, August 4, 2014


Developer command prompt


Tuesday, July 15, 2014


Adding Json string to sql.


using Newtonsoft.Json;

Create exact model
List<Model> objs = JsonConvert.DeserializeObject<List<Model>>(string);


Tuesday, December 10, 2013

MVC 4 and Ninject

Starting MVC 4 with Ninject.

In VS 2012, Go to > Tools > Library Package Manager > Manage NuGet Packages for Solution.

Search for and select Ninject.MVC3 then install.

It will create a NinjectWebCommon.cs inside App_Start

Reference your dependency resolution project / dll

Add code to instantiate implementations for your interfaces.

e.g: //IKernel kernel = new StandardKernel(
            //    new LoggingModule(typeof(App).ToString(), App.AppPath.ToString())
            //    );

            string appPath = System.Web.Hosting.HostingEnvironment.MapPath(System.Web.HttpRuntime.AppDomainAppVirtualPath);
            var modules = new List<INinjectModule>
                new LoggingModule(("Ninject"), appPath)
                //new RepositoryModule()              

Monday, July 15, 2013

Self Hosting WCF

Security Rights

Check and firewall:

Window 7 Client

  • netsh http add urlacl url=http://+:8090/ClientService/AppointmentNotification user=myUser or = users


  • httpcfg.exe set urlacl /u http://+:11715/service/ /a <http://+:11715/service/%20/a>  D:(A;;GX;;;BU)


Tuesday, June 25, 2013

Sync to ancestors properties


      Width="{Binding RelativeSource=
                {RelativeSource FindAncestor,
                AncestorType={x:Type Canvas}},
      Height="{Binding RelativeSource=
                {RelativeSource FindAncestor,
                AncestorType={x:Type Canvas}},

Window Service - Pointers and troubles encountered.

AppDomain.CurrentDomain.BaseDirectory - To have a path same as the service location.
Add debug mode in win service
     #if DEBUG #else #end
Install Manually
Right click window service and add install

  • click serviceProcessInstaller and go to properties
    1. change account property : LocalService for local and LocalSystem for server

  • click serviceInstaller and go to properties
    1. start type - automatic
    2. update service name and description to project name
Go to developer cmd: run as ADMINISTRATOR
Create batch files
  • InstallUtil ServiceName.exe
  • InstallUtil /u ServiceName

Right click service and select recovery
Error encountered 1
System.ComponentModel.Win32Exception: The specified service already exists serviceInstaller.DisplayName = "A new name";

  • sc delete YourServiceName

Error encountered 2
Error 1053: The service did not respond to the start or control request in a timely fashion framework version problem 2008 r2
Error Handling
Add another thread to catch the error
catch (Exception exception)
                    _ => { _logger.Error("", exception.Message, "", "", exception.StackTrace); });              
                    //_ => { throw new Exception("Exception on timer.", exception); });              

Setup same framework

Check Windows Event, Windows Logs, System
Helpfull Links

Install Automatically manually

Add a new project