.net-core

Bearer error=“invalid_token”, error_description=“The signature is invalid”

徘徊边缘 提交于 2020-12-30 05:55:10
问题 I have a angular application that request a token from azure. The login went well and I get a token. This token is now send from the angular app to a net core webapi application. Net core should verify this token but failed. I think the webapi should also contact azure to validate the token because it has no knowledge of the private and public key that is needed to verify the token. At the moment it is not clear why it is failing. Both angular app and the webapi are running local on my

Could not load type 'Context' from assembly 'Microsoft.AspNetCore.Hosting, Version=3.0.0.0

為{幸葍}努か 提交于 2020-12-30 05:52:57
问题 Where using .netcore 2.2 an upgrade to .netcore 3.0 This is the error that we encounter when running unit test: "Could not load type 'Context' from assembly 'Microsoft.AspNetCore.Hosting, Version=3.0.0.0" 回答1: These steps work on our project: Remove old packages <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" /> <PackageReference Include="Microsoft.AspNetCore.Mvc.Cors" Version="2.2.0" /> <PackageReference Include="Microsoft.AspNetCore.TestHost" Version="2.2.0" />

Could not load type 'Context' from assembly 'Microsoft.AspNetCore.Hosting, Version=3.0.0.0

被刻印的时光 ゝ 提交于 2020-12-30 05:49:51
问题 Where using .netcore 2.2 an upgrade to .netcore 3.0 This is the error that we encounter when running unit test: "Could not load type 'Context' from assembly 'Microsoft.AspNetCore.Hosting, Version=3.0.0.0" 回答1: These steps work on our project: Remove old packages <PackageReference Include="Microsoft.AspNetCore.Mvc" Version="2.2.0" /> <PackageReference Include="Microsoft.AspNetCore.Mvc.Cors" Version="2.2.0" /> <PackageReference Include="Microsoft.AspNetCore.TestHost" Version="2.2.0" />

VSTS task fails intermittently with exit code -1 returned from node.exe

匆匆过客 提交于 2020-12-30 03:24:06
问题 Our builds fails intermittently without any error message other than Exit code -1 returned from process: file name 'C:\agent\vsts-agent-win-x64-2.129.0\externals\node\bin\node.exe' We have two build agents hosted on our own VM's in Azure. They are hosted inside an App Service Environment (ASE) so that they can deploy to App Services inside the ASE. This happens on any of our two build agents, and on different vsts tasks: npm test: Exit code -1 returned from process: file name 'C:\agent\vsts

JWT token authentication fails with message “PII is hidden”

こ雲淡風輕ζ 提交于 2020-12-29 05:58:31
问题 in my .net core 2.2 microservice, I try to extract claims from a JWT token to do some authorization. authentication is done on another part of the system so I don't need to do it at this point. I am using this code in the Startup.cs: services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) .AddJwtBearer(options => { var signingKey = Encoding.UTF8.GetBytes("SECRET_KEY"); options.TokenValidationParameters = new TokenValidationParameters { ValidateIssuer = false, ValidateAudience =

Blazor template with menu across the top

与世无争的帅哥 提交于 2020-12-29 05:44:21
问题 I've created a new blazor app from the VS2019 template which has the menu as a sidebar. I've spent best part of the morning trying to get the menu across the top of the page like the current MVC template but completely failed to get anywhere! Does anyone have a blazor template with the navbar remove from the side and across the top? 回答1: The sidebar in Blazor isn't something special. If you check MainLayout.razor you'll see a reference to a NavMenu component with the sidebar class : <div

Blazor template with menu across the top

早过忘川 提交于 2020-12-29 05:42:16
问题 I've created a new blazor app from the VS2019 template which has the menu as a sidebar. I've spent best part of the morning trying to get the menu across the top of the page like the current MVC template but completely failed to get anywhere! Does anyone have a blazor template with the navbar remove from the side and across the top? 回答1: The sidebar in Blazor isn't something special. If you check MainLayout.razor you'll see a reference to a NavMenu component with the sidebar class : <div

Blazor template with menu across the top

落花浮王杯 提交于 2020-12-29 05:42:05
问题 I've created a new blazor app from the VS2019 template which has the menu as a sidebar. I've spent best part of the morning trying to get the menu across the top of the page like the current MVC template but completely failed to get anywhere! Does anyone have a blazor template with the navbar remove from the side and across the top? 回答1: The sidebar in Blazor isn't something special. If you check MainLayout.razor you'll see a reference to a NavMenu component with the sidebar class : <div

What is the use of Normalized Email & UserName in .NET core IdentityUser Model?

南笙酒味 提交于 2020-12-29 05:05:07
问题 When I use IdentityUser model in Asp.Net Identity with EntityFramework , it creates some standard fields in the database. All the fields are self explanatory except for the below two fields. NormalizedUsername - Which contains the uppercase value of the Username NormalizedEmail - Which contains the uppercase value of the Email My doubts are: Why do we need these Normalized fields? Where does it get used? What is the purpose of persisting it in the database? 回答1: By my understanding, both

What is the use of Normalized Email & UserName in .NET core IdentityUser Model?

与世无争的帅哥 提交于 2020-12-29 05:04:26
问题 When I use IdentityUser model in Asp.Net Identity with EntityFramework , it creates some standard fields in the database. All the fields are self explanatory except for the below two fields. NormalizedUsername - Which contains the uppercase value of the Username NormalizedEmail - Which contains the uppercase value of the Email My doubts are: Why do we need these Normalized fields? Where does it get used? What is the purpose of persisting it in the database? 回答1: By my understanding, both