asp.net-core-webapi Questions
2
I'm trying to figuring out versioning in .Net core Web Api 2.0 and I have some questions after seeing a lot of 'tutorials'.
For example I have a large api with a lot of controllers/models/etc.
1. W...
Berthaberthe asked 22/6, 2020 at 12:41
2
The following scenario does not follow RESTful standards and would be keen to know how best to structure my API to achieve the same goal.
For a given GET request against a resource, e.g. GET /api/p...
Howell asked 29/7, 2020 at 15:49
2
Solved
I was looking at a way for caching responses from an API endpoint developed in .NET Core. The request to the API must have a valid Authorization header as part the requirement.
I came across a fe...
Kansas asked 14/8, 2019 at 9:29
5
I have an ASP.NET Core Web API 3 app that implements a REST API and uses a JWT bearer token for authorization, and Swagger (Swashbuckle).
My controller has the [Authorize] filter on it, like:
[Ap...
Byronbyrum asked 10/4, 2020 at 23:49
9
Building CI pipeline for .Net core APIs in VSTS. But while building getting the below error.
Publishing build artifacts failed with an error: Not found PathtoPublish: D:\a\1\s\$(buildStagingDirect...
Xavler asked 6/6, 2018 at 11:21
2
Solved
I have a UserContext Service where I'll put some basic functionalities ("IsAuthenticated, GetUser etc...)
In order to do that, I need to pass the HTTPContext from my WebAPI Controller to my Class ...
Kenney asked 21/6, 2017 at 18:10
3
Can someone explain the purpose of these two in the csproj file (VS2017):
<TargetFramework>netstandard1.6</TargetFramework>
<RuntimeIdentifier>win7</RuntimeIdentifier>
I ju...
Delmore asked 20/4, 2017 at 12:34
4
I am trying to change http://localhost:5001/api/values route but the program is stuck this url.
I read this solutions
How to change the default controller and action in ASP.NET Core API?
How t...
Demirep asked 5/5, 2019 at 21:43
3
Yesterday I managed to have my API working on my local computer, however today (same code) on another computer, it's not working, I am getting this error on the console:
Failed to load http://lo...
Sukhum asked 15/3, 2018 at 13:12
3
Solved
I've been trying to write or set the HttpContext.Response.Body but to no avail. Most of the samples I found is using the Body.WriteAsync but the paramaters are different than the example. I tried c...
Overskirt asked 10/7, 2020 at 12:6
18
Solved
PLEASE NOTE: This question was asked in 2016. The original answer to this problem was to update the microsoft api versiong package. In the current days, the problem reoccurs, but for other reasons....
Hunchback asked 12/9, 2016 at 21:52
3
Solved
I am developing Asp.Net Core 3.1 API. Its running fine and I am deploying it on IIS and It's giving me the below error.
HTTP Error 403.14 - Forbidden
I have found out the root cause of the issue,...
Impermissible asked 10/7, 2020 at 15:49
4
I'm trying to do impersonation in a .NET Core 2.1 Web-API. So this Web-API calls another Web-API using HttpClient and I need the user that called the first one to also be the one who is executing t...
Devoice asked 31/7, 2018 at 5:37
2
I was doing a code review / pull request merge this morning, and discovered:
"using org.bouncycastle.asn1.ocsp;"
...in a .cs page for my WebAPI.
The most recent previous addition was my a...
Mellophone asked 18/12, 2022 at 12:25
10
I have 2 HTTP GET method in same controller and give me this error
HTTP method "GET" & path "api/DataStore" overloaded by actions - DPK.HostApi.Controllers.DataStoreController.GetByIdAsync (...
Leukorrhea asked 19/1, 2019 at 12:33
4
Solved
I am following a simple tutorial on .NET 6 and it should work really simple, but apparently I get the exception. The sample code is the following:
public async Task<ServiceResponse<List<Ge...
Myrtia asked 25/11, 2022 at 14:35
2
Solved
Is there a way to just point ".vscode/launch.json" to a profile defined in my "Properties/launchSettings.json" so I don't need to duplicate those values?
I need to support sever...
Allegro asked 26/1, 2022 at 19:12
2
Solved
I'm working on an ASP.NET Core 8.0 Web API project with a layered architecture. I've encountered an issue during the JWT validation process in my authentication and registration endpoints.
In my pr...
Dato asked 19/3 at 20:51
2
Solved
I'm using Swagger for dotnet core to document my dotnet core Web API.
I've read the documentation telling me that I need to add
[ProducesResponseType(typeof(XXXXX),200)] above the controller met...
Oratorian asked 26/9, 2017 at 13:57
3
Solved
I'm confused about the difference between using System.Diagnostics.Trace Trace.TraceInformation("This is a test") and using the ILogger logging abstraction logger.LogInformation("This is a test").
...
Concepcion asked 30/12, 2019 at 19:23
11
Solved
After a lot of struggling (and a lot of tuturials, guides, etc) I managed to setup a small .NET Core REST Web API with an Auth Controller issuing JWT tokens when stored username and password are va...
Gerrit asked 8/9, 2017 at 8:41
10
I have a generic repository that I have been instantiating right in my WEB API Controller no problem for a while.
This is what my controller used to look like:
[Route("api/[controller]")]
public ...
Offspring asked 23/3, 2017 at 22:7
3
I'm working on converting a web application that runs on ASP.NET MVC on .NET framework to run on .NET 8.
I see that no OWIN StartUp.cs class is created by default. Is this just a convention, or doe...
Yaws asked 14/12, 2023 at 18:34
4
Solved
Is there a way to specify example requests for swagger? Maybe even multiple ones?
The Try it out button shows only generic values like:
{
"firstName": "string",
"lastName": "string"
}
for
p...
Lawrence asked 26/7, 2019 at 8:25
3
I'm working on setting up some logging in our ASP.NET Core 3 application, using ILogger (Microsoft.Extensions.Logging) with NLog to enable writing to text files.
The problem is, that the ILogger d...
Whitelivered asked 26/5, 2020 at 8:3
1 Next >
© 2022 - 2024 — McMap. All rights reserved.