asp.net-core

Custom login page for Windows Authentication when using IIS

时间秒杀一切 提交于 2021-02-19 08:34:07
问题 I am developing an intranet website application in ASP.NET Core 2.0 and trying to use Windows Authentication in conjunction with IIS, and then check the user against the authorised users in a database before the user can continue. The issue is, that the default browser pop-up is not really what is desired. Ideally, I want to use a custom login/logout page with this method, but I don't think it's possible. Alternative routes I have seen, are turning Windows Auth off, turning Anonymous auth on

Can a Controller support a route with variable string parameters?

我们两清 提交于 2021-02-19 08:24:47
问题 I want to support routes such as /route/param1 , /route/param1/param2 , /route/param1/param2/param3 and so on. For now I have define in my Controller one route per combination of parameters: [Route("{path1}")] public async Task<IActionResult> Route1(string path1) { return await ParsePath(new[] { path1 }); } [Route("{path1}/{path2}")] public async Task<IActionResult> Route2(string path1, string path2) { return await ParsePath(new[] { path1, path2 }); } This has 2 major drawback: For now I have

Prevent ASP.NET Core discovering Controller in separate assembly

旧时模样 提交于 2021-02-19 08:15:30
问题 I've got an ASP.NET Core API that references a nuget package that contains a Controller . By default, this controller is registered and can respond to requests. However, I only want to add this in certain circumstances - e.g. if it's in the DEV environment. My Startup looks like this: services.AddControllers() .AddMvcOptions(cfg => { cfg.Filters.Add(new CustomExceptionFilterAttribute()) }); I expected I'd need to call AddApplicationPart(typeof(ClassInPackage).Assembly) after calling

Azure Storage SAS AuthenticationFailed

倾然丶 夕夏残阳落幕 提交于 2021-02-19 07:54:05
问题 I have a private azure storage container and am trying out azure storage SAS, so that I can upload and download files. I am able to generate the signature, but it always throws me the Authentication Fail error AuthenticationFailed Server failed to authenticate the request. Make sure the value of Authorization header is formed correctly including the signature. RequestId:a9dce486-0001-0021-23f7-d8f6dc000000 Time:2017-05-30T03:45:56.6617677Z Signature did not match. String to sign used was r

Blueimp jQuery File Upload not compatible with ASP.NET Core 3.1

随声附和 提交于 2021-02-19 06:06:42
问题 I am trying to integrate the Blueimp jQuery File upload in ASP.NET Core 3.1 but it has become incompatible with this version (3.1). The reason why I am saying is because I have tested the same code with ASP.NET Core 2.0 where Blueimp works perfectly. The below are the 2 videos to prove this fact. ASP.NET Core 2.0 which works perfectly ASP.NET Core 3.1 which gives error The Controller's code in ASP.NET Core 3.1 using System; using System.Collections.Generic; using System.IO; using System.Linq;

Blueimp jQuery File Upload not compatible with ASP.NET Core 3.1

狂风中的少年 提交于 2021-02-19 06:06:40
问题 I am trying to integrate the Blueimp jQuery File upload in ASP.NET Core 3.1 but it has become incompatible with this version (3.1). The reason why I am saying is because I have tested the same code with ASP.NET Core 2.0 where Blueimp works perfectly. The below are the 2 videos to prove this fact. ASP.NET Core 2.0 which works perfectly ASP.NET Core 3.1 which gives error The Controller's code in ASP.NET Core 3.1 using System; using System.Collections.Generic; using System.IO; using System.Linq;

Blueimp jQuery File Upload not compatible with ASP.NET Core 3.1

霸气de小男生 提交于 2021-02-19 06:06:32
问题 I am trying to integrate the Blueimp jQuery File upload in ASP.NET Core 3.1 but it has become incompatible with this version (3.1). The reason why I am saying is because I have tested the same code with ASP.NET Core 2.0 where Blueimp works perfectly. The below are the 2 videos to prove this fact. ASP.NET Core 2.0 which works perfectly ASP.NET Core 3.1 which gives error The Controller's code in ASP.NET Core 3.1 using System; using System.Collections.Generic; using System.IO; using System.Linq;

Blueimp jQuery File Upload not compatible with ASP.NET Core 3.1

青春壹個敷衍的年華 提交于 2021-02-19 06:05:11
问题 I am trying to integrate the Blueimp jQuery File upload in ASP.NET Core 3.1 but it has become incompatible with this version (3.1). The reason why I am saying is because I have tested the same code with ASP.NET Core 2.0 where Blueimp works perfectly. The below are the 2 videos to prove this fact. ASP.NET Core 2.0 which works perfectly ASP.NET Core 3.1 which gives error The Controller's code in ASP.NET Core 3.1 using System; using System.Collections.Generic; using System.IO; using System.Linq;

.NET Core 128kb File size limit deployed to Azure App Service

谁说胖子不能爱 提交于 2021-02-19 04:17:47
问题 I have a .NET Core 2.0 web app running on an Azure App Service instance. When I try to upload a file using file.CopyToAsync() , the upload fails with no diagnostic output if the file is larger than 128kB. Some photo types like png just get chopped at 128kB, even when they're several mB in size. When I try running locally, I can upload much larger files into my wwwroot/etc... folder on my local machine, so the problem seems specific to Azure App Services. I've looked up documentation on file

.NET Core 128kb File size limit deployed to Azure App Service

北战南征 提交于 2021-02-19 04:11:05
问题 I have a .NET Core 2.0 web app running on an Azure App Service instance. When I try to upload a file using file.CopyToAsync() , the upload fails with no diagnostic output if the file is larger than 128kB. Some photo types like png just get chopped at 128kB, even when they're several mB in size. When I try running locally, I can upload much larger files into my wwwroot/etc... folder on my local machine, so the problem seems specific to Azure App Services. I've looked up documentation on file