asp.net-core-2.2

logging.AddAzureWebAppDiagnostics() does not work in .net core 2.2

笑着哭i 提交于 2020-08-24 09:26:01
问题 I've updated my project from .net core 2.1 to 2.2 and then logging.AddAzureWebAppDiagnostics() in Program.cs no longer works. public static IWebHost BuildWebHost(string[] args) => WebHost.CreateDefaultBuilder(args) .ConfigureLogging((hostingContext, logging) => { logging.AddAzureWebAppDiagnostics(); }) .UseStartup<Startup>() .Build(); } 'ILoggingBuilder' does not contain a definition for 'AddAzureWebAppDiagnostics' and no accessible extension method 'AddAzureWebAppDiagnostics' accepting a

logging.AddAzureWebAppDiagnostics() does not work in .net core 2.2

最后都变了- 提交于 2020-08-24 09:24:49
问题 I've updated my project from .net core 2.1 to 2.2 and then logging.AddAzureWebAppDiagnostics() in Program.cs no longer works. public static IWebHost BuildWebHost(string[] args) => WebHost.CreateDefaultBuilder(args) .ConfigureLogging((hostingContext, logging) => { logging.AddAzureWebAppDiagnostics(); }) .UseStartup<Startup>() .Build(); } 'ILoggingBuilder' does not contain a definition for 'AddAzureWebAppDiagnostics' and no accessible extension method 'AddAzureWebAppDiagnostics' accepting a

Populate IConfiguration for unit tests

狂风中的少年 提交于 2020-05-28 14:18:06
问题 .NET Core configuration allows so many options to add values (environment variables, json files, command line args). I just can't figure out and find an answer how to populate it via code. I am writing unit tests for extension methods to configurations and I thought populating it in the unit tests via code would be easier than loading dedicated json files for each test. My current code: [Fact] public void Test_IsConfigured_Positive() { // test against this configuration IConfiguration config

receiveMessage Event not calling SignalR

不打扰是莪最后的温柔 提交于 2020-05-17 06:01:37
问题 SignalR.core.1.1.0, asp.net core 2.2 i am learning SignalR these days.i want to send message to specific identity user with Their Email address.my ViewModel Contains fields like Username(Email) where message should send, SenderId,Text,date. But problem is connection.on('receiveMessage', addMessageToChat) is not hit even Hub method is calling. Below is my code <div class="card-footer"> <form asp-controller="Home" asp-action="Create" data-ajax-begin="clearInputField" data-ajax-complete="" data

AWS DynamoDB with ASP .Net Core 3.1.0 Identity 2.2.0

戏子无情 提交于 2020-05-16 08:57:45
问题 I have to integrate Asp .net core identity 2.2.0 with AWS DynamoDB.I am using the .net core version 3.1.I searched for the reference but I didn't get any good one. Please help me. 回答1: I have got one reference from https://github.com/miltador/AspNetCore.Identity.DynamoDB. It sounds like someone wrote this and didn't maintain it. I have downloaded the Source code from this repo and updated the same to .net core 3.1.0 and identity 2.2.0[and also updated the startup file]. Now it's working fine