Update Error: The conversion of a datetime2 data type to a datetime data type resulted in an out-of-range value.


“The conversion of a datetime2 data type to a datetime data type resulted in an out-of-range value.\r\nThe statement has been terminated.”


One of the many reasons is due to insertion of a row with a null value for a non-nullable DateTime column.  For example, you may forget to assign a datetime value to your entity’s datetime column.


Deployed WebAPI 2.0 on IIS returns 404


I am setting up a new project and it works fine on my local desktop.  When I deploy it to IIS, it returns 404.


The IIS website was created and used .NET 2.0 by default.


  1. Go to IIS –> Application Pools.
  2. Find the website application and make sure it uses .NET Framework v4.0.30319 instead of v2.050727 and Managed pipeline mode = Integrated.

How to Have a Debug and a Production Version of an App Installed on a Single Phone


For my client, the need to copy a Android Project comes from the fact that the client wants to be able to install both a dev version and a production version of the mobile app on the same phone.

Old School Way

  1. Make a copy of the whole android project folder using file manager.
  2. Rename the folder.
  3. Open Android Studio, import an existing project, and select the renamed folder.
  4. Clean Project
  5. Right click on the java module and refactor –> rename.  https://www.youtube.com/watch?v=D6o9RvWw4wk
  6. Rebuild Project
  7. Do a Find in Path and try to replace the package name and application id  with the new one.

New Way

  1. Use flavors and build Types to either specify different applicationId or applicationIdSuffix in the app/build.gradle.