22 Aralık 2019 Pazar

Notes for a developer (about JSON)

What is this?

JSON: JavaScript Object Notation

Why is this?

I am migrating my data interoperability solutions from XML to JSON

Problem Definition: 

Cannot bind ViewModel data to the model (ASP.Net Core 3.0 Class) in the controller within an MVC solution. The model is always "null"

Found answer (What is the reason?): 

If the model data type mismatch with JSON data type the issue occurs (i.e. 18.0(floating) > 18(integer) or mismatch date format)

Relevant questions / topics:

How To Work With JSON In ASP.NET
How to pass json POST data to Web API method as an object?
Model and ViewModel in ASP.NET Core MVC Pattern What is the difference between JSONResult and ActionResult?
When to use JSONResult in MVC?

Model binding JSON POSTs in ASP.NET Core

Notes to myself:

This one is the best source packed beautifully: Retrieving json from view to model (controller)
This one is easy to find yet, easier to access from here: Tutorial: Create a web API with ASP.NET Core
ASP.NET - jsonresult vs actionresult in controller?

And Finally:

ASP.NET MVC - Using JavaScript with Ajax and Razor Partial Views
ASP.NET MVC - Using Ajax Helpers with Razor Partial Views

11 Aralık 2016 Pazar

DotNet Core Adventures

I will share my experiences from my introduction to Microsoft® ASP.NET Core MVC development efforts. Start date and time for this entry is: 20161211.23:35

ASP.NET Core is and cross-platform framework for building modern cloud-based internet connected applications, such as web apps, IoT apps, and mobile backends - and a Github repository is available here.

As of today, it is under heavy development so, migrating from .NET Framework 5.0 (and lower) to .NET Core (6.0) is not straightforward. You have to rewrite your code... Your Models and Viewmodels won't change but, you need a fresh start on the controller and view sides...

Since the most recent version is not complete and even though it is noted that it is released as an RTM level package; there are a lot of bugs. I've lost reasonable time to figure out what was going on. If you follow my recommendations here, you won't.

First things first! Always keep a backup of your working "Project.json" file!

Even if you use nuget packages to update and restore your references, inconsistencies may occur between the project.json file and the downloaded references. The only way to resolve those issues is to restore from the previous version.

Please take a look at the following when you have problems with package updates:
https://github.com/dotnet/cli/issues/2578

Start with DotNet.Core, then revert to .NET 4.5.1 as described here.

Be careful with NuGet package updates. After I followed above instructions everything was working like a charm. Then I noticed that there was an update for the "BundlerMinifier.Core" package (from version 2.0.238 to 2.0.306. I proceeded with the update and KABOOOMM! Ended up with the following error message:

error: Package BundlerMinifier.Core 2.0.306 is not compatible with net451 (.NETFramework,Version=v4.5.1). Package BundlerMinifier.Core 2.0.306 supports: netcoreapp1.0 (.NETCoreApp,Version=v1.0)

When I reverted to the older version the result did not change:

error: Package BundlerMinifier.Core 2.0.238 is not compatible with net451 (.NETFramework,Version=v4.5.1). Package BundlerMinifier.Core 2.0.238 supports: netcoreapp1.0 (.NETCoreApp,Version=v1.0)

Bottomline is that there is a loong long way for .Net Core to come to the stage. Full .NET support for packages is at least a year away... By the way: Using the "BuildBundlerMinifier" package, it seems everything is back to normal for now...

24 Mart 2016 Perşembe

Restoring System Health in Windows Environment

A short note about corrupted dll's in windows environment... Two life saver TOOLS to be run consecutively within an elevated command prompt:

DLL: Dynamic Link Library
SFC: System File Check
DISM: Deployment Image Servicing and Management

sfc /scannow
Dism /Online /Cleanup-Image /RestoreHealth /Source:wim:[Full Path to install.wim file]:1

OR

(To prevent DISM from using Windows Update for online images)

Dism /Online /Cleanup-Image /RestoreHealth /Source:wim:[Full Path to install.wim file]:1 /limitaccess

For example:

Dism /Online /Cleanup-Image /RestoreHealth /Source:wim:X:\sources\install.wim:1

Where "X" is the drive letter of the Windows 10 installation media OR mounted ISO image of that media. You may find a complete tutorial here(1) and here(2) (read this one for a complete list of potential issues).

IMPORTANT: PLEASE DOWNLOAD A WINDOWS 10 ISO IMAGE FROM THIS LINK OR USE ORIGINAL WINDOWS INSTALLATION MEDIA AS THE SOURCE. ISO IMAGES CREATED WITH THE "MEDIA CREATION TOOL" OFTEN FAIL TO RESTORE HEALTH. DETAILED INFORMATION CAN BE FOUND IN LINK (2) ABOVE.

After the DISM command is completed successfully type;

sfc /scannow

again and restart.


SFC & DISM will save your day almost in any occasion unless your computer is infected with malware. Do not waste time searching for the origin (real cause) of the problem.

Good luck!

10 Ocak 2016 Pazar

The age of Ai

I need to note this, better than a bookmark. Enjoy!

Tools available and in use today to benefit from Aritificial Intelligence!

Best!

A kick-start to topics on "Social Dynamics" within the context of Architecture, ICT & Management templates

I have been working on social dynamics and social engineering for a reasonable time as a subset of my research on "Customer Relationships Management (CRM)" though, as of today I just started to write a new article with my wife. That means now it is time to explicit the synthesis of implicit research going on for years. I will share details of the article (maybe the article itself) later though, I would like to note some basic definitions (all from Wikipedia®) below:
  1. Social conscience; A social conscience is "a sense of responsibility or concern for the problems and injustices of society"
  2. Collective consciousness; Collective conscious or collective conscience (French: conscience collective) is the set of shared beliefs, ideas and moral attitudes which operate as a unifying force within society.[1] The term was introduced by the French sociologist Émile Durkheim in his Division of Labour in Society in 1893.
  3. Social consciousness; Social consciousness is consciousness shared by individuals within a society.[1] According to Karl Marx, human beings enter into certain productive, or economic, relations and these relations lead to a form of social consciousness.[1]
Talas is one of the many settlements in Central Anatolia which survived for ages from neolithic times to present. Talas is so unique as a settlement in the world - an unique modern city - which inherits natural, historical, cultural, economic and modern life values from «in itself» and «very» nearby places.

I will add more details and photos, later...

Best!

 

 

12 Aralık 2015 Cumartesi

Windows disk space issues

How to address disk space issues that are caused by Windows;

Most of what you need to know for windows 7 & up is here (includes information about Windows Installer Cache '%windir%\Installer' and '%windir%\softwaredistribution\downloads' folders) & here

I also had problems with the “system volume information”. Here you will find very useful information for reclaiming disk space in windows computers.