Saturday, March 10, 2018

Solution: (Error)Unable to Correct problems, You have held broken packages–Install .NET Core on Ubuntu

Recently, I have been using Linux(Ubuntu) machine on my virtual box quite a bit and as  Microsoft.NET Developer I want to install .NET Core on Ubuntu. So I tried following the instruction from below link to install .NET core on Ubuntu 16.04.

But I was not unable to install .NET Core and I was getting following errors.

The following packages have unmet dependencies:
  dotnet-sdk-2.1.4 : Depends: dotnet-runtime-2.0.5 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
You can see the same error in the following screenshot.


I was a little bit curious about that and then I have read carefully the documentation mentioned on the above link and I have found that .NET Core require following require following Ubuntu distributions as Prerequisites.
  • libunwind8
  • liblttng-ust0
  • libcurl3
  • libssl1.0.0
  • libuuid1
  • libkrb5-3
  • zlib1g
  • libicu52 (for 14.X)
  • libicu55 (for 16.X)
  • libicu57 (for 17.X)
Most of the time it should be installed by default with sudo apt-get update and sudo apt-get upgrade command but sometimes it does not. So what I did install all these distributions one by one via sudo apt-get install command and in my case, I was not having liblttng-ust0 distribution on my machine. So I have installed it via following command.

sudo apt-get install liblttng-ust0
You can also see below screenshot for the same.


Then I was able to install .NET Core on my machine via following above link on documentation.


And now it’s running .NET Core v 2.1.4 on my Ubuntu VirtualBox as you can see it in below dotnet version command.


I was able to solve my problem this and so I thought it will be a good idea to share it on my blog so it will help people who are having the same problem.

Stay tuned for more there is a lot more coming for core and node.js on Linux on future blog posts.

How to install Robo3T(Formerly RobMongo) on Ubuntu

Robo3T formerly known as RobMongo is one of best GUI tools for the managing and querying MongoDB database. I have been using it quite often for creating applications with MongoDB and Node.js. Recently a new version made available but there were no instructions for installing it on Ubuntu. So I thought it would be a great idea to write a blog post about it.

To install it. First, we need to open terminal and download tar.gz file from official site with the following command.

Once download will complete we need to extract tar.gz file with following command
tar -xvzf robo3t-1.2.1-linux-x86_64-3e50a65.tar.gz

As now we have extract it into the folder we need to move that under /usr/local/bin directory to make it available for all the users. So todo that we need to first create robo3t directly under /usr/local/bin folder with following command.
sudo mkdir /usr/local/bin/robo3t

Then we need to move all the files of extracted folder into robo3t folder under /usr/local/bin directory with following command.
sudo mv  robo3t-1.2.1-linux-x86_64-3e50a65/* /usr/local/bin/robo3t

Now, We need to give permission to newly created directory with following command.
sudo chmod +x robo3t ./robo3t

Once you are done with it. You are ready to use robo3t. You can run it from command line from usr/local/bin directory via following command.

And it will run the Robo3t like following.


That’s it. Hope you like, Stay tuned for more!!.
Wednesday, March 7, 2018

How to install Visual Studio code on Ubuntu

Recently I presented a Webinar on ASP.NET Core on Linux. Here I have displayed how we can use Visual Studio Code a Free Open Source Editor from Microsoft to develop application. One of frequently ask question was How I can install Visual Studio Code on Linux. Since lots of People are using Ubuntu as Development Machine I thought it will be a good idea to write a blog post about how to install Visual Studio code on Linux(Ubuntu Machine).

So first thing we need to do it open a terminal in Ubuntu and then we need to type following command one by one.
curl | gpg --dearmor > microsoft.gpg

Then you need to run the following command to move gpg file download via Curl to etc/apt folder.
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg

Now, You need to run following command.
sudo sh -c 'echo "deb [arch=amd64] stable main" > /etc/apt/sources.list.d/vscode.list'

After that, you need to run Apt-get Command to update package cache and Apt-get install command to install visual studio code.
sudo apt-get update
sudo apt-get install code

That’s it. You are done with installing Visual Studio Code. You can find more information about different Linux flavors at following  link on Visual Studio code.

Hope you like it. Stay tuned for more!!
Saturday, February 10, 2018

How to install node.js and npm on Debian 9

In this blog, We are going to see how we can install the node.js and npm on the Debian Operating system. So let’s get started.

First of all Either you should use “Sudo” command or use your root users to run all this command so that it will be available to all the users on this machine.

So first we need to install node.js so for that there are multiple ways but I am going to use node source binary distribution so that we can get latest stable version of node.

You can find node source binary distribution at -

First, You need to run the following command.
curl -sL | bash -

After that run the following command.
apt-get install -y nodejs

Then you need to install NPM for that you need run the following command.
curl -L | sudo sh

Then you can check node.js version with node -v like shown in below image.


That’s it. Now create your favorite node.js application. Hope you Enjoyed it. Stay tuned for more!!
Wednesday, February 7, 2018

4 Million Page Views and 800 blog post completed for my blog-

As you know that I’m not super crazy about blog milestones but this is a special one and I could not resist sharing with you guys. This blog completed 4 Million Page Views and This is the 801st blog post I’m writing. What an amazing journey for this blog.

On this occasion of 4 million pages views I would like to thank my readers, friends and Mentors without them it was not possible. THANK YOU  VERY EVERYONE
This blog has started as a quest to see my name in search engines and then I got serious into blogging and then onwards never looked back. Again I am very thankful to my readers without their it was not possible. I host my blog on so here are some of statistics on my blog.

And here is the top 10 blog post for all time.


From the statistics, you can see I’m getting about 70,000 page views every month. and More than 3000 page views every day. This all done with genuine search engine optimization provided Also, I started tracking my page views from 2010. So actually it's more than 4 million page views.

On this occasion, I would definitely like to Thank my Wife Reeana and all the family members who sacrifice their time when I write this blog.

Now I will try to be more punctual about writing blogs and hopefully, you will get lots of new stuff like ASP.NET Core, SQL Server, My SQL, Linux, Node.js, Angular, Vue.js as I learned a lot of this new technologies and will share my experience with you guys.

Once again thank you all readers without you guys It would not have been possible.


Solved: Microsoft SQL Server Error 3403

This is a Guest Post from “Andrew Jackson”.

Bio of Andrew Jackon:

He is freelance SQL Server DBA. He is  fan of technology, programming, and entrepreneurship. He is  also interested in writing and web development and SQL Server blogger too. He like to share about SQL Server and the problems related to it as well as their solution and also He also  handles database related user queries, server or database maintenance, database management etc.

You can find his social handles at following.


You find more about him at :
From its powerful internal structure, fast performance, and reliability, SQL server is now widely accessed by several enterprise users. It is used to deal with bulk transaction processing, business programs, and content management. The Microsoft SQL server is chosen for its high-level security, scalability, and performance. Sometimes, corruption in the SQL database occurs due to the saving of a large amount of business information. This problem makes the server inaccessible, flashing an error message on the window.

One such message is ‘SQL server error 3403’, resulting in an unplanned downtime of the server.


Reason for SQL Server Error 3403:

Corruption and the server crash these two are the most common and root causes of the problem. Once the server crash takes place, the database verifies the transaction log. But, if the provided information does not match Object ID then, the application throws an error code 3403. It is possible that instead of these reasons there is some other cause of the problem. Following are those additional causes of SQL server error 3403 :
  • While updating the allocation page, the data gets written on the transaction log before the crashing takes place.
  • Another cause of the problem might be bad allocation activity by Microsoft SQL server.

How to Fix SQL Error 3403?:

The best way to deal with any of the SQL server error (including 3403) is to restore data from the recently created backup file. If you are having the backup file then, you just need to perform following steps :
  • First of all, drop the SQL server database and then, create a database for loading.
  • It’s time to restore database file and utilize online commands for activating restored files for use.
Note: Verify that the database files created at present must be having same size as of Sysusages value.

Alternative Solution to Fix SQL Server Error 3403:

It is possible that users might not be having a backup file with them. In such case, the only approach is to use SQL Recovery software, which restores the corrupt database with an ease. The software is a rapid technique for fixing SQL database files corruption without any efforts. What all you need to do is just browse corrupt MDF file. If you are unaware of corrupt SQL database location then, no need to worry because the software provides the solution for it. This product is also capable of recovering data from corrupt files, which are encrypted by Wallet Ransomware attack.


Errors are uncertain situations, which acts as challenges for an individual. If an accurate workaround is not executed then, these situations can also result in another hazardous condition. It should be the duty of each and every server user to fix the error, just after their occurrence. There are two solutions on how to fix SQL error 3403 i.e., backup file restoration and SQL database recovery program. As per the availability, readers are free to catch any of the workarounds for resolving their problem.
Sunday, December 3, 2017

Creating Rest API with Node.js,Express and MySQL Part-1

With Node.js and express creating a Rest API is a piece of cake. In this blog post, we are going to see how we can create a rest API with Node.js, Express, and MySQL as a database.

Creating Database with MySQL:

So let’s first with creating Database for our APIs. So todo that we need to create a new Schema from MySQL workbench like following.


Here we are going to create a schema(database) called “employee”.  Then it’s time to create a Database Table and Let’s create a table like following.


and Here is the SQL Script for creating a table.


Here we have 4 column of the table EmployeeId(Primary Key), First Name, Last Name and Designation of employee details.

CREATE TABLE `employee` (
  `EmployeeId` int(11) NOT NULL,
  `FirstName` varchar(45) DEFAULT NULL,
  `LastName` varchar(45) DEFAULT NULL,
  `Designation` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`EmployeeId`)

I have entered some sample data like following.


Express Node.js application to create Rest API:

Now we have our database ready for MySQL and It’s time to create a new Node.js Express application. We can start with creating Package.Json with NPM init and run that command in command line.

npm init
It will ask you several questions to create your node an application like below.


Once your basic node.js application is ready It’s time to install express via the following command.

npm install express –save
It will install express like below.


Now we have created a node.js and express application. I have also installed MySQL and BodParser package and here’s how the package.json looks like.

  "name": "nodejsmysql",
  "version": "1.0.0",
  "description": "A Rest API Example with Node.js and MySQL",
  "main": "index.js",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1"
  "author": "Jalpesh",
  "license": "ISC",
  "dependencies": {
    "body-parser": "^1.18.2",
    "express": "^4.16.2",
    "mysql": "^2.15.0"
As now we are done with creating and configuring our node.js application It’s time to write code. First I have written following code to create a route of our API which will be a map to our API URL.
var express = require("express");
var app = express();
var bodyParser = require("body-parser");

app.use(bodyParser.urlencoded({ extended: true }));

var port = process.env.por || 3000;
var router = express.Router();

app.use("/api/employee", router);
Here in the above code, you can see that I have created an express object as required and then I created a body-parse object which will be used for the posting/putting data into our API. Then I have created a port and get router of express and then created a route which will be our URL for API.
Now It’s time to write MySQL Connection code like below.
var mysql = require("mysql");

var con = mysql.createConnection({
    host: "youripformysql",
    user: "usrename",
    password: "password",
    database: "employee"
In the above code I have to get MySQL object via require and then I created a MySQL connection.  You need to pass the credentials there for your MySQL Credentials. Then I have written following code to get Employee table data with our get API.
router.get("/", function (req, res, next) {
    con.connect(function (err) {
        if (err) throw err;
        con.query("SELECT * FROM employee", function (err, result, fields) {
            if (err) throw err;
                "status": 200,
                "error": null,
                "response": result
Here in the above code, You can see that I have written Route.get method which will be used to get All Employees from the MySQL database and then I have written a Select Query to query data with “Employee” table. Then I have put result data as Json with the response object.
Now we have to start this application with app.use like the following code.
app.listen(port, function () {
    console.log("Express server running on port %d", port);
Now we can run the application with the following command.

node index.js
You can see same in above image.


Now in a client like postman you can see the output like below.

That’s it. In blog post series we will see that how we can add/update and delete it. Stay tuned for more!!.

You can find complete source code above blog post at following location on github-
Search This Blog
About Me
My Photo

Full Stack Developer, Blogger, Microsoft Mvp, Mentor, Lifelong learner, 12+ Years of Experience for JavaScript, web and Microsoft technologies. ASP.NET MVC/Core, C#, Angular,Vue.js and node.js
Subscribe to my blog

Enter your email address:

My Mvp Profile
Follow us on facebook
Blog Archive
Total Pageviews