Skip to main content

All Questions

0 votes
2 answers
907 views

Set minimum and maximum file size For file upload in asp.net core

how can i set minimum and maximum size for file upload in asp.net core 3? i try to find Any way to fix this On the Internet, I just found a solution to define the maximum size
mohamad hosein ghelich khani's user avatar
0 votes
1 answer
1k views

Use latest version of Application Insight with .net core API

I have an existing API project in .net core 3.0 and also using exception middleware to log the exception. Now there is an requirement that we need to implement application insight in our API. I go ...
Bunty Choudhary's user avatar
0 votes
1 answer
338 views

Asp.NET core 3 custom model attribute error handling

I need to catch the exception form my custom model attribute on validating it. Here is my HttpStatusCodeExceptionMiddleware: public class HttpStatusCodeExceptionMiddleware { private ...
Wasyster's user avatar
  • 2,447
1 vote
1 answer
5k views

CS7069: Reference to type 'Route' claims it is defined in System.Web but it could not be found

I'm trying to add OAuth 2.0 to my .NET Core 3.0 Web Api using this tutorial. The following is the content of WebApiConfig class. public static void Register(HttpConfiguration config) {...
Ernesto98's user avatar
29 votes
3 answers
21k views

Allow anonymouos access to healthcheck endpoint when authentication fallback policy is set in ASP.NET Core 3

asp.net core 3 allows to set FallbackPolicy to make the endpoints secure by default: services.AddAuthorization(options => { options.FallbackPolicy = new ...
wxt's user avatar
  • 575
0 votes
1 answer
1k views

Dockerfile for .NET Core 3 Web API + SPA application (vue)

Since .NET Core 3 Web API could work pretty well with Vue through NuGet package VueCliMiddleware. How to write a simple Dockerfile that works?
chenpion's user avatar
7 votes
2 answers
2k views

Is it possible to have a claims authorization with an OR condition like roles?

I've always used role authorization in my .net application. However, I'm building a demo app and want to give claims a try. I've always decorated my controller like this where either an admin or ...
zAnthony's user avatar
  • 342
10 votes
3 answers
10k views

Unable to resolve service for type Microsoft.AspNetCore.Mvc.Razor.IRazorViewEngine

In my project that was core 2.2 i have standard service for returning Razor View as string (i needed it to generate pdf in my client written in WPF): public class RaportService : IRaportService {...
michasaucer's user avatar
  • 5,000
1 vote
1 answer
3k views

Long running task api call from logic app to avoid timeout bad request response after many retiries

I have an azure api app exposing some business apis. I need to implement Long running task strategy because I want to call one of these apis from my Logic App because that api takes more than 2 ...
Haithem KAROUI's user avatar
3 votes
2 answers
2k views

ASP .NET Core 3 + Identity Server issue with in-process and out-of-process hosting

We're currently trying to upload two ASP .NET Core 3 simple web applications. One is an IdentityServer4 application which generates tokens, while the other has some APIs endpoints, and relies on the ...
Guido Cardinali's user avatar
4 votes
1 answer
3k views

How to serialize enum as string globally (not by attribute in each enum)?

I'm working on the ASP.NET Core 3.0 web API. A lot of endpoints return json with enums. Enums are not serialized as a string but as the default integer. I'm aware of [JsonConverter(typeof(...
Adam Wojnar's user avatar
0 votes
1 answer
555 views

ASP.NET Core 3.0 - Model Binding not inferred?

According to the documentation, complex types should automatically be handled as "FromBody" without the need to decorate the parameter with an attribute. For whatever reason it isn't working for me. ...
Ber53rker's user avatar
  • 1,028
0 votes
1 answer
1k views

An unhandled exception occured while processing the request in asp.net core 3.0 web api

I am trying to run NET Core 3.0 WebAPI project but I getting the following error An unhandled exception occured while processing the request in asp.net core 3.0 web api error msg click here to show
Vikas's user avatar
  • 67
4 votes
1 answer
905 views

Error deploying .Net Core 3.0 Web API to Azure App Service

I recently upgraded my ASP .Net Core 2.2 Web API to .Net Core 3.0. Now, when I publish to Azure App Service from within Visual Studio 2019 Community (latest updates installed) I get this message: ...
Fabricio Rodriguez's user avatar
2 votes
0 answers
387 views

Sharing user login between Blazor WebServer and ASP.NET Core API

I am building a service-oriented system for personal use (plus few friends may have limited access as well) - the aim is to have a dashboard for controlling my apps running on various machines such as ...
TehGM's user avatar
  • 219