Skip to main content

Posts

.NET developer moving into Azure Functions and Durable Functions

 For a .NET developer moving into Azure Functions, I’d prioritize learning in this order: HTTP Trigger Timer Trigger Queue Trigger Dependency Injection Configuration & app settings Blob Trigger Service Bus Logging + monitoring Durable Functions Deployment to Azure After this, the next major topic is Durable Functions (fan-out/fan-in, chaining, orchestration), which is frequently asked in interviews and used in enterprise projects. This pattern is very common in production systems. Example: E-commerce order processing HTTP Trigger       ↓ Queue Output       ↓ Queue Trigger       ↓ Process order       ↓ Blob Storage       ↓ Send Email https://chatgpt.com/share/6a151bf1-e124-8322-96f5-84b133b2a0b1 Since you're already a .NET developer, the fastest path is: understand what Azure Functions are , create one locally, run/debug it, then deploy it. Here's a practical step-by-step roadmap....

Azure function - sample in visual studio code - Run locally

 Install an older LTS Node version (for example Node 18 or Node 16 rather than the newest release): https://nodejs.org/en/download step 2: node --version npm --version step 3:  npm install -g azure-functions-core-tools@4 --unsafe-perm true step 4:  func --version step 5: dotnet --version step 6: mkdir C:\AzureDemo Step 7: func init MyFunctionApp --worker-runtime dotnet-isolated Step 8: cd MyFunctionApp step 9:create http trigger function func new Step 10: enter the function name hellofunction Step 11: It will create automatically, to check the name hellofunction.cs create new file Step 12: func start Step 13: url - http://localhost:7071/api/HelloFunction

bot hit - server response time and overall page loadtime increase - aws, ec2, google analytic, cloudflare, ms sql cpu usage 100%

 Dear All, I've recently facing website page load time and server response time issue,  troubleshooting -  1. IIS log via - http log browser (tool to identify the bot hit) 2. disallow in robots.txt 3. article found and feature enabled in Cloudflare   Bot Fight Mode Challenge requests matching patterns of known bots before they can access your site. Requests matching Cloudflare-identified, non-legitimate automated traffic patterns will be challenged and/or blocked by Cloudflare. And, JavaScript Detections Use lightweight, invisible JavaScript detections to improve Bot Management products. 4. AWS EC2  Add new security group for Cloudflare ips list Ref:  https://dev.to/johnmccuk/automate-aws-security-group-with-cloudflare-ips-la6 And referred follow articles: https://www.imperva.com/products/advanced-bot-protection-management/ https://blog.apnic.net/2019/11/15/how-to-hide-aws-ec2-instances-from-network-scanning-bots-using-ipv6/ https://pawelurbanek.com/ec...

IPv4 header to requests when a client is using IPv6

  What is Pseudo IPv4? As a stopgap to accelerate the adoption of IPv6, Cloudflare offers Pseudo IPv4 which supports IPv6 addresses in legacy applications expecting IPv4 addresses. The goal is to provide a nearly unique IPv4 address for each IPv6 address, using Class E IPv4 address space, which is designated as experimental and would not normally see traffic. To learn more see  here . Options Add header:  Add additional Cf-Pseudo-IPv4 header only Overwrite headers:  Overwrite the existing Cf-Connecting-IP and X-Forwarded-For headers with a pseudo IPv4 address Cloudflare

Android Pay for Payment Request API

https://developers.google.com/android-pay/mobile-web/tutorial Tutorial With Android Pay for Payment Request API, you may request one of two payment token types: gateway or network. If you are using Braintree, Stripe, or Vantiv as your payment gateway, then you may request a gateway token from Android Pay. Otherwise, you may request an encrypted network token bundle. You may either handle the network token yourself or work with your processor to handle decrypting the token bundle.

Happy 15th Birthday .NET

Today marks the 15th anniversary since .NET debuted to the world. On February 13th, 2002, the first version of .NET was released as part of Visual Studio.NET. It seems just like yesterday when Microsoft was building its “Next Generation Windows Services” and unleashed a new level of productivity with Visual Studio.NET. Since the beginning, the .NET platform has allowed developers to quickly build and deploy robust applications, starting with Windows desktop and web server applications in 2002. You got an entire managed framework for building distributed Windows applications, ASP.NET was introduced as the next generation Active Server Pages for web-based development, and a new language, C# (pronounced “see sharp” :-)) came to be. Over the years, .NET and it’s ecosystem has grown and expanded to meet the needs of all kinds of developers and platforms. As the technology landscape has changed, so has .NET. You can build anything with .NET including   cross-platform web apps , ...

Beginner dotnet

http://dailydotnettips.com/ http://abhijitjana.net/2015/08/27/plan-your-day-effectively-work-faster-more-efficiently-and-achieve-more/?blogsub=confirming#blog_subscription-3 Beginner’s Guide: How IIS Process ASP.NET Request

White Hat Hacker -

"Certified WhiteHat Hacker (CWHH)", a course that will be helpful for a person to get into the Ethical Hacking world . -  Why CWHH?  There are totally 5 Lakhs security professional needed in India. People do a general certification course to get into the InfoSec field.  But most of them lack the tech knowledge needed for cyber security.  There are countable number of whitehat hackers who are at cyber security.  CSPF felt that there is need for creating awareness on cybersecurity and Ethical Hacking practices for students in colleges.   How many levels are in CWHH and can you give more info on that?   CWHH level-I is subsidized course on Ethical Hacking for college students.  It happens in two ways, most often colleges invite us to do the course in their premises;The second method, we announce the course in common place where students of all colleges can register online and do attend the course.    CWHH level-II focuses on advanced ...

Intrusion detection system

An   intrusion detection system   ( IDS ) is a device or   software application   that monitors network or system activities for malicious activities or policy violations and produces reports to a management station.  IDS come in a variety of “flavors” and approach the goal of detecting suspicious traffic in different ways. There are network based (NIDS) and host based (HIDS) intrusion detection systems. Some systems may attempt to stop an intrusion attempt but this is neither required nor expected of a monitoring system.  Intrusion detection and prevention systems (IDPS) are primarily focused on identifying possible incidents, logging information about them, and reporting attempts. In addition, organizations use IDPSes for other purposes, such as identifying problems with security policies, documenting existing threats and deterring individuals from violating security policies.  IDPSes have become a necessary addition to the security infrastru...

IIS 7 Rapid Fail Protection - 5 failures within 5 minutes

IIS 7 Rapid Fail Protection Thursday, January 12, 2012   by   Mat Agrest IIS 7 Rapid Fail Protection If you do not already know, Rapid Fail Protection is feature within IIS7 that is on by default.  It basically is there to check for a specified number of hard failures in a given time period, again the default is 5 failures within 5 minutes.  If a hard failure that occurs meets this default setting, then the Application Pool will crash and does  not   automatically restart.  The only way to get it going again is to manually start it.  If this does happen for you, in IIS Manager you would see a little stop symbol next to the name and it would also say stopped under Status (depicted below). When this sort of problem occurs an entry is written to the Event Logs (usually under System), which IIS 7 does a little better of a job properly reporting errors.  You will most likely also get a 503.2 - Serv...

IIS 7 Tip # 5 Run a command when Rapid Fail Protection is triggered

Rapid-Fail Protection disables application pools if they crash multiple times within in a specified time period. This prevents the failing application pool from getting into a continuous loop of crashing and restarting. This protects other application pools running on the server as repeated failures can consume lot of system resources. When rapid-fail protection kicks in it stops the application pool that is repeatedly crashing and your clients will start getting a 503 – Service Unavailable error. An administrator will have to manually enable the application pool again. You also have to option to configure an executable to run when ever rapid-fail protection is triggered. For example below I have configured the application pool to restart the IIS service using iisreset.exe … the /rebootonerror will reboot the whole server if iisreset.exe for some reason fails to restart the services. Refer http://blogs.msdn.com/b/vijaysk/archive/2009/03/13/iis-7-tip-5-run-a-command-when-rapid-f...

What is a Crash (technically)... in ASP.NET - CRASH, HANG, HIGH CPU, HIGH MEMORY, DEADLOCK and OUT OF MEMORY

What is a Crash (technically)... in ASP.NET and what to do if it happens? Many times while troubleshooting performance related issues in ASP.NET/IIS we find that customers come in saying that the ASP.NET process crashes n number of times a day, two or more. Now, the question arises, that is it really a crash, or some Yellow color error message (or a plain "Page cannot be displayed" error) which is shown on the client's browser? Well, as they say, everything that glitters is not gold. On similar grounds, every error thrown on the browser is not a crash. We need to keep multiple things in mind depending on what exactly could have caused the error, and before we decide to call it a crash, we should know what *exactly* is a crash! In the forthcoming series under "Performance" category of my blog, I will discuss basics of CRASH, HANG, HIGH CPU, HIGH MEMORY, DEADLOCK and OUT OF MEMORY issues.

IIS Manager - applocation pool restart C# code

using System; using System.Collections.Generic; using System.Text; using System.DirectoryServices; namespace RecycleApplicationPool { class Program { static void Main( string [] args) { string appPoolName = "DefaultAppPool" ; string machineName = "LOCALHOST" ; if (args.Length > 0) appPoolName = args[0]; if (args.Length > 1) machineName = args[1]; string error = null ; DirectoryEntry root = null ; try { Console .WriteLine( "Restarting Application Pool " + appPoolName + " on " + machineName + "..." ); root = new DirectoryEntry ( "IIS://" + machineName + "/W3SVC/AppPools/" +appPoolName); Console .WriteLine(root.InvokeGet( "Name" )); root.Invoke( "Recycle" ); ...