Posts

Your project does not reference error!

The error " Your project does not reference ".NETFramework,Version=v4.6.1" framework. Add a reference to ".NETFramework,Version=v4.6.1" in the "TargetFrameworks" property of your project file and then re-run NuGet restore " troubled me a bit at work today. The target framework was set correctly and I had 4.6.1 on my dev machine. IDE was VS 2019. So what was the problem?  Good old fashioned googling helped me to resolve the issue and so adding this note here as a reference for myself. It turns out the solution was to delete the obj folders and just recompile. Just doing a clean and rebuild did not help. I had to delete the obj folder manually and then recompile worked. The link that helped me with this is in the reference below.  It seems like lot of people have come across this same problem. Latest comment on that thread is from Jan 2020 and looks like the issue is still unresolved from VS team. This is at least one of the workarounds t...

How to enable elasticsearch access from remote machines

Image
Elasticsearch is one of the most popular open source search platforms available today. In this post, we will look at how to enable remote access to elastic. Now, what do I mean by remote access? By remote access, I mean ability to access the elastic api endpoints from machines other than where it is setup. The default elasticsearch installation is localhost only, you can access it only from the machine where it is setup. While this is okay for POC type development work, for most other use cases we need elasticsearch to be installed on a server somewhere and be able to access it from other machines. Before we get started with the steps needed to configure elasticsearch installation for remote access, do note that these are applicable only for elastic 7.1.x (maybe even 7.x). Steps: Navigate to the folder where elasticsearch is installed. It should look something like this screenshot Open up the config folder. There should be a elasticsearch.yml file. Open it. In the Netwo...

Issues with elasticsearch installation and configuration on windows

Image
ElasticSearch is a widely popular DB used for full text based search. The ELK stack which consists of Elastic, Kibana and Logstash is also hugely popular as a tool set to collect logs and metric and display via dashboards. Installing and configuring elastic (on Windows) can be painful sometimes. Thjs post is meant to document some of the issues that I faced and how they were resolved. This post will be kept updated as and when I come across different issues. Issue # 1: X-Pack is not supported and Machine Learning is not available for [windows-x86] Most installation guides including elastic's own tell us to start elastic using the batch file provided in the distribution. The command goes something like this. It looks like it starts loading and at some point there is this error thrown and elastic quits. The error is X-Pack is not supported and Machine Learning is not available for [windows-x86]. If this is the case, open up the configuration file in configs/elasticse...

Deploying VMs into an availability set on azure

Image
In my previous post I wrote about high availability options in Azure. In this one, I am going to cover how to deploy new VMs into an availability set. To get started, click on Virtual Machines link on azure portal and get to the page where all virtual machines get listed. Click on Add and this is what we see. Notice that the Availability options drop down list has only the Availability set option enabled, because availability zones are not yet available for the West US region (at least at the time of writing). Select  Availability set  option. Once it is chosen, another field called Availability set shows up and if any exists, will be available for selection. A Create New link is also provided right below the field. As seen in the screenshot above, since I did not have any availability sets created before, the list is empty and I chose to click on Create New link. Another window pops up to the side which contains the availability set options. Choose the a...

High availability for VMs on azure

Image
Increased availability of applications / services is one of the most important reasons why organizations move to cloud. So what is availability ? Per Wikipedia , availability is defined as "The ratio of (a) the total time a functional unit is capable of being used during a given interval to (b) the length of the interval".  A simpler definition would be, "availability is the proportion of time a system is in a functioning condition". High availability obviously is good for business as it means little or no down time for applications that the business relies on. Let us see what are some of the availability options on azure for VMs. Azure has something called regions, they are nothing but a data center or a group of data centers in a geographic region. For example Central US is a region in Azure, as is East US and West US. Each azure region can be either one or more data centers. Each region is typically paired with another region so that data, applications, v...

Add co-administrators for your azure subscription

Image
I use my Visual Studio Enterprise subscription at work which gives me a free monthly credit of close to 10,00 INR (around 150 USD). I use it quite extensively to learn about azure services, create proof of concepts and generally play around with azure services. There was a situation recently where I had to let another user manage azure services which I had created and also allow him to use more of azure services, all using my subscription. I was wondering if there was a way to do this and if this would even be allowed, considering that I was only using the free credit obtained from VS enterprise and not really paying anything extra to use Azure. The good news is that there is! Good folks at Microsoft have provided a way to add on additional administrative users for a single subscription. Now that I think about it, for large enterprises, this would be a major requirement. No way that everything that a decent sized company has on azure would be managed by just one admin account. B...