All Posts

Page 2

Posts

  • Hot Reloading in ASP.NET core apps

    During the development we often need to make small changes in JavaScript, in CSS or in HTML, to check the change on the browse, we have to compile and run the application in Visual Studio, if app is already running in the browser, then have to stop it and restart the project from VS. I…

  • Expose Azure VM services publicly

    Sometimes we required to expose service to access from public IP address essentially if the services are running on the virtual machine in Azure. In my case virtual machine was running a Windows 2016 server OS, it was my development machine, where I was developing some web applications. Here are the steps to allow some…

  • Register managed DLL in Windows

    Registering a managed DLL file can be simple process if you know the correct .NET version. Registering process is slightly different for 32, 64 bit and .NET version. There is no straight way to know .NET version, using a tool like JustCompile is useful to get the .NET version, also shows internal properties and method…

  • Get logged in user name in Core 3.0

    To get current logged in user from Identity 2 in .net core 3.0 and 3.1, use the following code. Happy Coding 🙂

  • ASP.Net Core Seed User and Role

    Data seeding for Identity user tables are different. Here is an example code how to seed data without extending the Identity User table. First step to create a class in Data folder Name it “ApplicationDbInitializer.cs”, following code will be in this class. Second step, call above class from Startup.cs file Configure method. Add this line…

  • Create git repo from existing project

    Often I forget the commands to create git repo from existing project in my local machine. First step is to init a git repo in your project. Use git bash Second step to add the project files into local git repo Use the .(dot) after the add, this is saying add all files. This command…