.net-core-1.1

Bind a IConfigurationSection to an complex object without aspnetcore

*爱你&永不变心* 提交于 2020-01-03 08:36:50
问题 I have a NetCore console application and want to read the appsettings.json and parse a section as List<Param> (without Dependency Injection or AspNetCore). I already tried How do I bind a multi level configuration object using IConfiguration in a .net Core application? but it seems like .Get<T>() got removed from netcoreapp1.1 IConfigurationSection myListConfigSection = configurationRoot.GetSection("ListA"); List<Param> paramList; //Get does not exist //paramList = myListConfigSection.Get

ASP.NET Core website on Azure fails to start with a 502.5 error after upgrade from .NET Core 1.1.1 to .NET Core 1.1.2

馋奶兔 提交于 2019-12-21 03:54:05
问题 I have a .NET Core web application which I deploy as an Azure Web App. This has been working perfectly until last night when I applied the Visual Studio 2017 upgrade (v15.2). The .net core version was upgraded from 1.1.1 to 1.1.2. When I deploy to Azure the website fails to start with a 502.5 error. After investigating I can see .NET Core 1.1.2 is not deployed to the Azure image. I cannot install the new framework to the web app instance (understandably permission is denied on the Program

.NET Core 1.1 allowing access to indirect dependencies types

纵然是瞬间 提交于 2019-12-12 04:45:21
问题 I created a new .NET Core 1.1 solution and noticed an odd behavior: if I create multiple projects in the solution and chain-reference them, I'm able to freely access types located in a dependency of a dependency, any level down. This is an example: We have a Sandbox solution, a Baz class library project, a Bar class library project referencing Baz and a Foo console app project referencing Bar . From the Foo project I'm able to access and use BazThing , a type defined in the Baz project, even

Missing extension method AddJwtBearerAuthentication() for IServiceCollection in .NET Core 2.0

混江龙づ霸主 提交于 2019-12-10 13:17:22
问题 I have updated my project from Core 1.1 to Core 2.0 using instructions from https://blogs.msdn.microsoft.com/webdev/2017/08/14/announcing-asp-net-core-2-0/ (updated target framework to .NET Core 2.0 and used metapackage Microsoft.AspNetCore.All). I have updated all possible nuget packages to latest versions as well. In .NET Core 1.1 i was adding JWT Bearer Authentication this way: app.UseJwtBearerAuthentication(); // from Startup.Configure() As per http://www.talkingdotnet.com/whats-new-in

ASP.NET Core website on Azure fails to start with a 502.5 error after upgrade from .NET Core 1.1.1 to .NET Core 1.1.2

隐身守侯 提交于 2019-12-03 11:51:28
I have a .NET Core web application which I deploy as an Azure Web App. This has been working perfectly until last night when I applied the Visual Studio 2017 upgrade (v15.2). The .net core version was upgraded from 1.1.1 to 1.1.2. When I deploy to Azure the website fails to start with a 502.5 error. After investigating I can see .NET Core 1.1.2 is not deployed to the Azure image. I cannot install the new framework to the web app instance (understandably permission is denied on the Program Files directory). I cannot 'downgrade' through the nuget package manager as it reports the version is