Skip to main content

Posts

Bring Azure Blob Objects Back to Life

Nowadays, there are many applications which are utilizing Azure Blob Storage for reading and writing objects. Looking at that, it’s quite common that these objects may get deleted accidentally due to user’s negligence or application's behavior.  So, my today’s writeup is around this topic wherein we will see, how can we bring back our deleted blob objects back to life. Lifecycle of blob storage is managed by a very well-known concept called Versioning . Versioning deals with the state - when any object was created, when was it modified or when was it deleted. If this topic impresses you, you can read complete blog post at C# Corner website or you can view it on my YouTube channel named Shweta Lodha.

Azure App Registration and Microsoft Graph API

As part of Sip and Learn series, this time I covered a very interesting topic – App registration for Microsoft Graph API in AAD. Here you will get to know how to do application registration using Azure portal and what all permissions need to be given to call particular type of API. If this topic is of use to you, do view this episode on my YouTube channel named Shweta Lodha.

Using Postman to interact with Microsoft Graph API

I have added another episode to my technical series on my YouTube channel named Shweta Lodha . It covers the topic, how one can play with Postman for Microsoft Graph API. I also mentioned about how one can generate bearer token and what all header fields are necessary to make an API call. You can watch complete episode over there.

Top Level Statement

Last week, I started my technical series on my YouTube channel named 'Shweta Lodha' with the name Sip and Learn. As part of this series, I'm planning to share some of the interesting short technical tips and concepts which are very easy to grab in just few minutes. Here, I speak about Top Level Statements feature of C# 9.0 as part of my first episode. You can go through this session on my channel.

Simplifying use of Static

Hope everyone must have come across static keyword while doing development, specifically using C#. Static modifier is used to declare static member, which means it belong to the type itself. Well, as part of this article, I’m not going to discuss more about static as it will increase the length of this writeup. public   class  Logger   {         public   static   int  GetLogLevel( string  logType)       {            …       }   }   Above is a sample code snippet wherein, we have a class called Logger and it has a static method called GetLogLevel . Now in order to call this GetLogLevel(…) method, first we have to add the required namespace, where this Logger class has been defined. Something like this, using  Planner.Utilities;    Well, nothing new as of now. Next, let’s have a look at, how to make a call to this static method. int  logLevel = Logger.GetLogLevel(fileLog);   Till here, nothing that bad, but we do have a room to improve our code by making it more readable and cleaner.

Speaker at C# Corner MVP Ft Show

Yesterday I got a privilege to be a speaker on C# Corner MVP Show. It was a great show and a wonderful interaction with host Stephan Simon on my topic ‘Handling Notifications using Microsoft Graph’. Recording is available on my YuTube channel named Shweta Lodha .

Troubleshooting Bad Gateway errors for Ngrok

Ngrok is one of the well-known tool for local tunneling  solution. I have used it many times being the easiest tool for any developer. This time once again, I thought to use Ngrok for my current application, which uses Graph API to get notifications from Microsoft Teams channel. As always, I launched the Ngrok with required port as shown below: ngrok http 44332    and it got connected as shown below: Till now everything is alright. But now when I ran my application with Ngrok’s forwarding address, I end up getting an error -  400 Bad Request . And here is what I read more about this: Seems like some applications can’t deal with the default behavior of Ngrok and need an explicit mention of header information, which means there is another way to handle such scenario: ngrok http http://localhost:44332 -host-header="localhost:44332" After connecting Ngrok with above command, everything went very smooth and as expected. Hope this tip would be useful for you too