.net-core

Identity with ASP.Net Core 3.1 - on not authenticated, the app is not redirecting to Login in production like it does in dev

 ̄綄美尐妖づ 提交于 2021-02-11 06:16:24
问题 I have an ASP.Net Core (3.1) web app that takes advantage of Identity. It works as desired on my dev box, but does not redirect to login in production. Let me explain. I have a home/landing page with links to actions all over it. If a user clicks on an action that requires Authentication (I am using the [Authorize] tag to specify that in my controller), then the app should redirect to the Login page to allow the user to login first and then redirect to the desired action that they click. This

Identity with ASP.Net Core 3.1 - on not authenticated, the app is not redirecting to Login in production like it does in dev

假如想象 提交于 2021-02-11 06:16:03
问题 I have an ASP.Net Core (3.1) web app that takes advantage of Identity. It works as desired on my dev box, but does not redirect to login in production. Let me explain. I have a home/landing page with links to actions all over it. If a user clicks on an action that requires Authentication (I am using the [Authorize] tag to specify that in my controller), then the app should redirect to the Login page to allow the user to login first and then redirect to the desired action that they click. This

How to run VBScript in .net core or .net standard project?

只谈情不闲聊 提交于 2021-02-11 06:12:47
问题 i know it`s dead-end and stupid idea, but still... Do you know any nuget or workaround ways to run VBScript within .Net Core or .Net Standard projects? I`ve tried to use ClearScript.V8 nuget (https://www.nuget.org/packages/ClearScript.V8/) from Microsoft. It does not support .net standard 2.0 at all. I would appreciate for any ideas. Thanks. 来源: https://stackoverflow.com/questions/51020687/how-to-run-vbscript-in-net-core-or-net-standard-project

How to run VBScript in .net core or .net standard project?

这一生的挚爱 提交于 2021-02-11 06:12:33
问题 i know it`s dead-end and stupid idea, but still... Do you know any nuget or workaround ways to run VBScript within .Net Core or .Net Standard projects? I`ve tried to use ClearScript.V8 nuget (https://www.nuget.org/packages/ClearScript.V8/) from Microsoft. It does not support .net standard 2.0 at all. I would appreciate for any ideas. Thanks. 来源: https://stackoverflow.com/questions/51020687/how-to-run-vbscript-in-net-core-or-net-standard-project

Visual Studio 2019 showing yellow exclamation for .NET 5 Preview 8

好久不见. 提交于 2021-02-11 06:11:45
问题 I recently installed .NET 5 Preview 8 and created a new ASP.NET Core MVC project in Visual Studio 2019 16.8 Preview 2. For all the NuGet packages it is showing yellow exclamation mark. There are no compilation errors, no warnings. The application works fine. No errors. But VS keeps showing yellow exclamation. This problem comes only for .NET 5 projects. ASP.NET Core 3.1 projects don't give this problem. My project file is shown below : <Project Sdk="Microsoft.NET.Sdk.Web"> <PropertyGroup>

EF Core always create .Annotation(“SqlServer:Identity”, “1, 1”) on add-migration

不打扰是莪最后的温柔 提交于 2021-02-11 06:10:20
问题 I'm having a problem with Migration EF Core. To make the scenario clear, I'm assigning it to an existing database, which is intended to use migration for database control from now on. But I am having difficulties. What I have done so far. I generated the scaffolding from the existing database. I added the migration, so it generated all the "Up" for database creation. In a clean database, ran update-database. So far perfect, everything worked as expected. But from this step every time I

Document outline controls disabled in Visual Studio 2019 for .Net Core

喜欢而已 提交于 2021-02-11 04:31:25
问题 Now that .net core support WinForms projects, I've ported an old project to .Net 5. I can edit code, desing GUI and compile, and everything seems to work fine except for Document Outline window (in Visual Studio 2019). All four buttons, move up, down, out and into, are disabled, so I cannot choose what to see on top at desing time. I have created a new project from the scratch and those controls are still disabled. Demo image: Any idea why? I can guess it's something microsoft is working on,

What aspect of Azure App Service determines the elapsed time limit?

时间秒杀一切 提交于 2021-02-11 00:22:27
问题 What in Azure App Service determines the elapsed time limit? The controller method... [Route("service")] [HttpPost] public Outbound Post(Inbound inbound) { Debug.Assert(inbound.Message.Equals("Hello server.")); Outbound outbound = new Outbound(); long Billion = 1000000000; for (long i = 0; i < 30 * Billion; i++) // 215 seconds ; outbound.Message = String.Format("The server processed inbound object."); return outbound; } The client side... static void Main(string[] args) { Post().GetAwaiter()

What aspect of Azure App Service determines the elapsed time limit?

╄→гoц情女王★ 提交于 2021-02-11 00:22:26
问题 What in Azure App Service determines the elapsed time limit? The controller method... [Route("service")] [HttpPost] public Outbound Post(Inbound inbound) { Debug.Assert(inbound.Message.Equals("Hello server.")); Outbound outbound = new Outbound(); long Billion = 1000000000; for (long i = 0; i < 30 * Billion; i++) // 215 seconds ; outbound.Message = String.Format("The server processed inbound object."); return outbound; } The client side... static void Main(string[] args) { Post().GetAwaiter()

Asp.net Core Applications Issue with Razor and MVC Pages

不羁岁月 提交于 2021-02-10 23:38:07
问题 I have reinstalled my VS 2019 and cloned my applications on my machine. But suddenly all the applications stopped showing add -> Controller --> MVC 5 Controller and its View. After rebuild my application is converted into Razor from MVC Core 3.1. and now all applications throws error of g.cshtml.cs file. Help me to fix this issues. Why my .net core MVC application is converted to Razor. Why application not adding MVC controller and view. 回答1: Create an empty ASP.NET Core MVC project Change