Category ".net-6.0"

Azure function error : BinaryFormatter serialization and deserialization are disabled within this application

i have existing azure function in .netCore 3.1, Trying to upgrade it to .net6.0. after upgrade getting error 'BinaryFormatter serialization and deserialization

.NET 6 (stable) IConfiguration setup in Program.cs

This appears to be a similar problem but none of the answers are fitting for my code...: Read appsettings.json in Main Program.cs This is extremely similar but

Add Swagger description to minimal .NET6 APIs

I have a small project in .NET6 that contains minimal APIs like that one app.MapGet("/clients", async (IClientRepository repo) => { var r

Problems with user secrets in .Net console apps

I've created a .Net 6 console app. I added user secrets, but I only get the values defined in the appsettings.json file. I use Visual Studio Professional 2022 v

How to silence Serilog in integration tests with the new minimal hosting model of .NET 6

I have a .NET 6 web API project with existing integration tests for some of the API endpoints. The project uses Serilog for logging and everything was fine so f

SignalR Core - Storing multiple subgroups in cache

I've started playing with SignalR and I don't have an idea how to deal with storing subgroups. Let me draw a picture of a problem that I'm facing. At first I wa

Blazor RenderFragment to String

I'm developing a code block component using .Net 6 Blazor wasm. I need to display the RenderFragment as string and also render the component in my html. Here is

Adding Global Using Directive in blazor

The type or namespace name 'XXX' does not exist in the namespace 'MyClassLibrary.Models' (are you missing an assembly reference?). The error refer to this Blaz

Equivalent to ControllerBase's `IsLocalUrl` in Blazor

So I normally have an endpoint in a controllerbase where I check if a given url is local or not with Url.IsLocalUrl(returnUrl), but I can't find an equivalent t

How to easily share code between iOS and Mac Catalyst in .net 6?

I'm in the process of upgrading a Xamarin Native solution to run on .net 6 using SDK style multi-targetted projects. As I understand it, there are two ways of w

Cannot install .NET on Ubuntu 18.04

I followed the official installation page for installing .NET 6.0 on Ubuntu 18.04 but I am not able to succeed. The page told me to do: wget https://packages.mi

Get the number of receiving subscriptions of a Azure Service Bus Message

Is there a way to get the number of receiving subscriptions of a ServiceBusMessage sent on a Topic, in any of the two following ways: The number of subscription

Global route for all ApiControllers in .Net 6

In all of my projects i put this code in top my controllers : [Route("api/[controller]/[action]")] [ApiController] public class ValuesController : ControllerBas

Is there a way to use .NET 6 class library project as a DLL or project reference in the ASP.NET Webforms application (.NET Framework 4.8)?

Is there a way to use .NET 6 class library project as a DLL or project reference in the ASP.NET Webforms application (.NET Framework 4.8)? I have an ASP.NET web

How can I use DB first approach in .NET Core 6?

I try to use Entity Framework in a minimal API running in a .NET Core 6 project. As far as I understand I should run dotnet ef dbcontext scaffold xxxx which I d

.NET 6 project within Jetbrains Rider on Apple M1 fails to debug or start after updating to Rider 2022.1

I am working on a .NET 6 project using Rider as IDE on macOS Monterey on an Apple M1 Pro. After updating Rider from 2021.3.4 to 2022.1 with the JetBrains Toolbo

PayPal create_order_error cannot read properties of null

I've integrated PayPal into my .NET 6 (Blazor) application. I followed the PayPal docs here to add the button. In test mode all worked fine. Now that I've chang

DispatcherHelper in Windows Community Toolkit

I am working on upgrading MVVMLight to Windows Community Toolkit and facing issues with DispatcherHelper. I am unable to find any examples which can show me how

return in if statement throws conversion error

I will apologize in advance for the long post. Just trying to give you all the information I have. I have an if statement in a method that looks like this: var

Setting the LOGGING__CONSOLE__FORMATTERNAME in aspnet6.0 image

How do I set this environment variable when I run a .NET 6.0 docker file? I have a docker image based off aspnet6.0 Docker file. By default the environment vari