Jaliya's Blog
30 FOLLOWERS
In this blog, you will find articles on .NET, .NET Core, ASP.NET, ASP.NET Core, Visual Studio, and more.
Jaliya's Blog
1w ago
In this post, let's see how we can replace backend API URLs in the response body from an Azure API Management (APIM) policy. Say, we have a backend API endpoint that has the following code. WebApplicationBuilder builder = WebApplication.CreateBuilder(args); WebApplication app = builder.Build(); app.UseHttpsRedirection(); app.MapGet("/endpoints",  ..read more
Jaliya's Blog
1w ago
In this post, let's see how we can wait for any event and wait for all the events in .NET Isolated Azure Durable Functions. Let's consider the below code. using Microsoft.Azure.Functions.Worker;using Microsoft.Azure.Functions.Worker.Http;using Microsoft.DurableTask;using Microsoft.DurableTask.Client;using Microsoft.Extensions.Logging;using  ..read more
Jaliya's Blog
1w ago
In Azure Durable Functions, there are times we need to run SubOrchestrations using a specific Instance Id. As far as I can recall in In Process durable functions, when calling a SubOrchestrator there was a specific overload to specify the instance Id. With Isolated Durable Functions, we do have an overload, but I feel it's not that intuitive, hence this post. In .NET ..read more
Jaliya's Blog
2w ago
In this post, let's have a look at Middleware in .NET Isolated Azure Functions. .NET Isolated functions supports middleware registration, following a similar model as in ASP.NET Core. With middleware, we can inject logic into the invocation pipeline, and before and after functions execute. The ConfigureFunctionsWorkerDefaults method has an overload that we can ..read more
Jaliya's Blog
1M ago
In this post, let's go through an interesting scenario related to App Service networking. - App A: is integrated into VNet A. App A: Networking - App B: has Public network access enabled with no access restrictions. But it has a Private Endpoint in VNet B ..read more
Jaliya's Blog
1M ago
Recently I was updating an old .NET Core web application to .NET 8 and the code was reading a certificate as follows. private X509Certificate2 GetCertificateByThumbprint(string thumbprint){ X509Store store = new (StoreName.My, StoreLocation.CurrentUser); store.Open(OpenFlags.ReadOnly);   ..read more
Jaliya's Blog
1M ago
In this post, let's see how to call an external API using Client Credentials in an Azure AD B2C User Journey. I am assuming Azure AD B2C App Registration is already set up for the client app with the necessary permission (scope access) to call the protected API and you have noted down the Client ID, Client Secret, and the Scope. Note: There are no additional actions to ..read more
Jaliya's Blog
1M ago
I wanted to have some integration tests for Azure Functions, especially for some complex durable functions. When you have durable functions and when you want to make sure that the orchestrations are behaving as expected, having integration tests is the only way to ensure that. And another important thing is I needed to be able to run these tests not just locally, but in a CI pipeline ..read more
Jaliya's Blog
2M ago
In this post let's see how we can use binding expressions in an .NET 8.0 Isolated Azure Function and how to consume the binding expression values from Azure App Configuration (AAC). Binding expressions are basically something like this. Let's take a simple ServiceBus trigger function. [Function(nameof(ServiceBusTrigger))]public static void  ..read more
Azure DevOps Self-hosted Agent: NETSDK1045: The current .NET SDK does not support targeting .NET 8.0
Jaliya's Blog
2M ago
Recently I have faced this issue in one of our Self-hosted agents in Azure DevOps when a pipeline is trying to build a .NET 8.0 application. C:\vsts-agent\_work\_tool\dotnet\sdk\5.0.405\Sdks\Microsoft.NET.Sdk\targets\Microsoft.NET.TargetFrameworkInference.targets(141,5): error NETSDK1045: The current .NET SDK does not support  ..read more