tagged [.net-core]
.Net Core ValidateAntiForgeryToken throwing web api 400 error
.Net Core ValidateAntiForgeryToken throwing web api 400 error Visual Studio 2017 with Web Api using .net Core 1.1 I'm using, but I am getting a 400 Bad Request Error. Error Occurs in every way: 1. An...
- Modified
- 13 Sep at 04:57
What is the difference between UseStaticFiles, UseSpaStaticFiles, and UseSpa in ASP.NET Core 2.1?
What is the difference between UseStaticFiles, UseSpaStaticFiles, and UseSpa in ASP.NET Core 2.1? ASP.NET Core 2.1.1 offers several seemingly related extension methods for appBuilder: - `UseStaticFile...
- Modified
- 23 Dec at 20:36
Set the IHostingEnvironment in unit test
Set the IHostingEnvironment in unit test I am currently upgrading a project from .NET Core RC1 to the new RTM 1.0 version. In RC1, there was a `IApplicationEnvironment` which was replaced with `IHosti...
- Modified
- 17 Jul at 16:15
Get the full route to current action
Get the full route to current action I have a simple API with basic routing. It was setup using the default Visual Studio 2015 ASP.NET Core API template. I have this controller and action: So to reach...
- Modified
- 17 Mar at 10:35
How do you enforce lowercase routing in ASP.NET Core?
How do you enforce lowercase routing in ASP.NET Core? In ASP.NET 4 this was as easy as `routes.LowercaseUrls = true;` in the `RegisterRoutes` handler for the app. I cannot find an equivalent in ASP.NE...
- Modified
- 6 Aug at 11:33
How to return 403 instead of redirect to access denied when AuthorizeFilter fails
How to return 403 instead of redirect to access denied when AuthorizeFilter fails In Startup.ConfigureServices() I configure authorization filter like this: and I use either cookie authentication or A...
- Modified
- 31 Jan at 12:55
How to install Font Awesome in ASP.NET Core 2.2 using Visual Studio 2019
How to install Font Awesome in ASP.NET Core 2.2 using Visual Studio 2019 I am struggling to find any up to date installation guide for installing Font Awesome in ASP.NET Core 2.2 I've tried a manual f...
- Modified
- 15 Feb at 23:44
"The project 'Web' must provide a value for Configuration" error after migrating to .NET Core 3
"The project 'Web' must provide a value for Configuration" error after migrating to .NET Core 3 I've migrated an ASP.NET Core 2.2 project to Core 3.0 and am getting the error: > The project [Project l...
- Modified
- 3 Feb at 09:16
Return file in ASP.Net Core Web API
Return file in ASP.Net Core Web API ## Problem I want to return a file in my ASP.Net Web API Controller, but all my approaches return the `HttpResponseMessage` as JSON. ## Code so far ``` public async...
- Modified
- 25 Feb at 19:20
Identity in ASP.Net Core 2.1< - Customize AccountController
Identity in ASP.Net Core 2.1
- Modified
- 18 Dec at 21:12
Is ApiController deprecated in .NET Core
Is ApiController deprecated in .NET Core Is it true that "`ApiController` will get deprecated in .NET Core"? Asking since I'm planning to use it in new projects.
- Modified
- 16 Aug at 08:35
What are the differences between app.UseRouting() and app.UseEndPoints()?
What are the differences between app.UseRouting() and app.UseEndPoints()? As I'm trying to understand them, It seem like they are both used to route/map the request to a certain endpoint
- Modified
- 7 Feb at 13:3
asp.net core defaultProxy
asp.net core defaultProxy In net 4.5 we are working with proxy like this: ```
- Modified
- 6 Mar at 23:35
Reference another json file in appsettings.json for ASP.NET Core configuration
Reference another json file in appsettings.json for ASP.NET Core configuration In 'the old days' using XML configuration it was possible to include partial configuration from another file like [this](...
- Modified
- 10 Sep at 16:9
Change Controller Route in ASP.NET Core
Change Controller Route in ASP.NET Core So I have a `HomeController`, to access it along with `Actions` I have to type . Would it be possible to change this to something else like ?
- Modified
- 21 Aug at 22:57
What is .AspNetCore.Antiforgery.xxxxxxx cookie in .Net Core?
What is .AspNetCore.Antiforgery.xxxxxxx cookie in .Net Core? I was trying to use ValidateAntiForgeryToken in .Net Core but I was getting .AspNetCore.Antiforgery.xxxxxxx cookie is missing. What is this...
- Modified
- 13 Sep at 23:57
ASP.NET Core - Create custom model validation
ASP.NET Core - Create custom model validation In previous versions of ASP.NET MVC the way to add custom validation to your model was by implementing the `IValidatableObject` and implementing your own ...
- Modified
- 14 Mar at 21:20
How to stream with ASP.NET Core
How to stream with ASP.NET Core How to properly stream response in ASP.NET Core? There is a controller like this (): Firefox/Edge browsers show > He
- Modified
- 13 Mar at 20:8
Specify a format for "asp-for" HTML Tag (ASP.NET Core)
Specify a format for "asp-for" HTML Tag (ASP.NET Core) In an ASP.NET Core project I have to display a (readonly) date in a specific format (say "dd/mm/yyyy HH:MM") How can I do it, knowin
- Modified
- 19 Jul at 17:19
How to get user Browser name ( user-agent ) in Asp.net Core?
How to get user Browser name ( user-agent ) in Asp.net Core? Can you please let me know how to get the browser's name that the client is using in MVC 6, ASP.NET 5?
- Modified
- 15 Oct at 00:1
Which C# version .NET Core uses?
Which C# version .NET Core uses? I know that [C# version depends on .NET Framework](https://stackoverflow.com/a/19532977/240564). But .NET Core which version uses? Particularly .NET Core 2? C#7?
- Modified
- 27 Aug at 14:26
ASP.NET Core 2 AuthenticationSchemes
ASP.NET Core 2 AuthenticationSchemes There are several authentication schemes but I can't find any documentation on them. How do they differ?
- Modified
- 2 May at 02:48
native/canonical approach to Fire-and-forget in ASP.NET Core world
native/canonical approach to Fire-and-forget in ASP.NET Core world Doing some coding with websockets related, I found that's it's unclear at the moment, how to properly deal with long running backgrou...
- Modified
- 29 Sep at 00:39
How do I get client IP address in ASP.NET Core?
How do I get client IP address in ASP.NET Core? Can you please let me know how to get client IP address in ASP.NET when using MVC 6. `Request.ServerVariables["REMOTE_ADDR"]` does not work.
- Modified
- 17 Apr at 02:31
Not able to use System.Management.dll in Dot Net Core
Not able to use System.Management.dll in Dot Net Core How should I gather Hardware Info if `System.Management.dll` is not compatible with . How do I get the Machine info like Processor Id, Disk Volume...
- Modified
- 12 Nov at 22:8