69
questions
0
votes
1
answer
57
views
I get Error when I call get API with certificate
I am working in asp.net core MVC
and I call API with certificate and it work perfect in postman and development mode, but when I publish to IIS I get error.
(The postman, development and IIS are in ...
0
votes
0
answers
13
views
How would I display this data to the user?
I just started learning 4 weeks ago and I am trying to use HttpGet to retrieve information based on the current logged in user and display the information in a list. I am using WASM.
The code section ...
0
votes
0
answers
31
views
Bot telegram didnt work on dev environment
i build a telegram bot and it worked perfect on my laptop but when i push it on dev environment, using github and gg cloud to build, it didnt work, i set job for it to run every 12am and 23pm.When i ...
1
vote
1
answer
865
views
GUID is 00000000-0000-0000-0000-000000000000 when posting to .net core endpoint from axios, react and typescript
I have a .net endpoint here:
public class ListContactRequest
{
public Guid userId { get; set; }
}
[Authorize]
[HttPost]
[Route("listContacts")]
public async Task<...
1
vote
0
answers
480
views
Adding example value for a controller parameter in Swagger
I have a .NET Core Web API that I have enabled XML comments on in the program.cs file by calling IncludeXmlComments.
I have the following XML comments set on my controller:
But the webpage displays ...
0
votes
0
answers
286
views
Fortify Allowed header option
I am building a RESTful API. When the client uses an unsupported method such as GET on a resource that does not supports it, I am returning a 405 with the Allow header which lists the allowed methods:
...
0
votes
0
answers
187
views
Using ASP.NET Core Web API with ASP.NET MAUI - Can I use the models from API in my MAUI or do I have to recreate?
Using ASP.NET Core Web API with ASP.NET MAUI - Can I use the models from API in my MAUI or do I have to recreate?
I just started working with MAUI and it seems like I have to re-create all my models ...
0
votes
1
answer
127
views
Assembly name was changed after deployment in core web api application
I am using VS 2019 to develop core.net web Api. I am trying to read the all methods and Parameters inside my controller. I am using Repository pattern to develop API.
Below is the code from my ...
0
votes
1
answer
78
views
Why is Healthsites.io API call failing?
I am trying to make a call to healthsites.io to obtain sites in a given area. But so far my API calls have been failing, despite using the format listed under 'Source Code' on https://healthsites.io/...
1
vote
2
answers
195
views
Django Rest Framework Copeapi LinkLookupError
I am getting a LinkLookupError when trying to get a endpoint served by Django Rest Framework. This error only occurs after a single successfully request. My DRF view.py looks like:
class RecordViewSet(...
0
votes
1
answer
192
views
Fetch images from api as strings? To UWP application
Is there any way to fetch images as strings to UWP applications?
Im trying to get my images from my database (ms-sql server) and showing them in my UWP application. I only got the names out right now, ...
0
votes
0
answers
403
views
Date format switches when deserializing Json
I have a background process that fills a datatable. It works by retrieving a small amount of rows from an API in Json format and deserializing them to a datatable (loop). These rows are then added to ...
-2
votes
1
answer
119
views
CosmosDB NoSQL: Data structure
I am trying to make my first NoSQL design but I am struggling a bit to find the right path for my use case.
In short, the user is a member of a teanet, this teanet has a set of products that only can ...
0
votes
0
answers
313
views
How to insert a ListItem in On-Premise deployed sharepoint 2013 list using .net core API
I have Sharepoint 2013 hosted on-premise. I have a list in there, into which I need to insert records from a .net core API. How do I do this? Please help.
0
votes
0
answers
114
views
unable to Calling GetService for each request in Core API
With Microsoft.Practices.Unity, the GetService method of IDependencyResolver in Asp.Net webAPI is called for each request, where i can do the below(user specific resolving of container)
public ...
3
votes
0
answers
1k
views
CoreAPI to OpenAPI schema generation transition (Django REST Framework)
I'm creating an API using Django REST Framework 3.12.0. This is the latest version released on the 13th of October 2020.
The 3.10 version (September 2019) introduced OpenAPI based schema generation ...
2
votes
0
answers
43
views
.net core 2.1 Token Based Authentication gives 401 Error
Hello I am developing application with token based authentication.
In startup.cs added code below.
services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
.AddJwtBearer(...
0
votes
1
answer
695
views
Django Swagger Schema: Object of type Boolean is not JSON serializable
I am working on a custom schema and got an error saying Object of type Boolean is not JSON serializable on the Swagger documentation page.
import coreapi
import coreschema
from rest_framework.schemas ...
2
votes
1
answer
495
views
SignalR .Net Core Multiple Connection
Hello I have application backend is .NET Core and frontend is Angular 2+. I have one page that two people can both chat and see report in charts. I want to connect chart data and chat to backend with ...
5
votes
2
answers
11k
views
Unable to communicate between docker containers on localhost
First, I am new to docker containers, I don't know much about how they are running, but I have this setup:
One docker container for a .NET Core API (Docker File autogenerated by VS-2019)
One docker ...
4
votes
1
answer
108
views
Azure Insights Request logs
I'm trying to see inside the azure Insights the request information inside an error or exception.
What I'm looking for is when an error happened in my API, be able to check the error information (...
0
votes
2
answers
1k
views
How to Host .net Core 3.0 Web Api on IIS?
I am trying to run .net core web Api on Remote PC by hosting it on IIS. I am able to run application locally. Api works fine when it is run through PostMan.
I can run the application using IP address ...
1
vote
1
answer
3k
views
.Net Core API - Mixed Model Binding not working
Framework used is .Net Core 3.0 but tested in 2.2 and got the same behavior.
I am using a class to automatically bind the body request properties and that works pretty well, even without having the [...
-2
votes
1
answer
175
views
Best way to store files on a large scale enterprise level application [closed]
I have a question on Azure environment setup and file storage.
We are currently developing a CRM as part of a large scale project. Currently, the CRM is reading a mailbox and creating tickets in the ...
2
votes
0
answers
110
views
core-api requests don't include user after successful TokenAuthentication
I'm using django-rest-framework to define a REST API for Python Clients to use. Clients access the API with coreapi. I log all access to the server application with a middleware.
I want clients to ...
0
votes
1
answer
965
views
Using NLog with Sql Server
I'm trying to log errors to a database table using NLog but no records are getting written to the database. What am I missing here?
Startup.cs
public class Startup
{
public Startup(...
0
votes
1
answer
11k
views
StatusCode: 405, ReasonPhrase: 'Method Not Allowed'
i'm building a Web Application to consume A REST FULL API ASP.Net Core Web Service, i have Problem when i update a records.
i'm trying to Call Put Method from API ASP.Net core by ASP.Net Core ...
4
votes
1
answer
4k
views
Read multiple connection strings from appsettings.json from different projects
I'm using .Net core v 2.1 to create web api. My solution contains difference project layers (BLL, DAL, Common etc.) and there is one appsettings.json file in main project. I have multiple connection ...
1
vote
0
answers
598
views
Serilog RollingFile path issue in MAC OS/Linux
I'm using a SeriLog rolling file logger in a .NET Core API (v2.2).
There is a folder called 'logs' at the root directory on my macbook (/logs).I've given read, write and execute permission for all ...
3
votes
1
answer
17k
views
Custom Authorization Filter in .NET Core API
I want to authorize users before accessing any data using my core api, so I tried is using JWT authentication.
I have successfully generated token while signing in user using api and saved that token ...
0
votes
1
answer
55
views
Need to create an API on the basis of ForeignKey in dotnet core
Here is my Schema and with two Foreign Key in an intermediate table. I am beginner in Core dotnet so unable to crate API to show the department in the school.
public class DepartmentSchool
{
...
0
votes
1
answer
45
views
Get IntelliJ to autocomplete based on CoreAPI Spec from localhost:8080/api/spec JSON
We have a backend serving a number of APIs. These APIs are also described using the CoreAPI and this is exposed as a JSON to clients.
Instead of copying this JSON into my client code, how would I ...
8
votes
2
answers
6k
views
Generate schema for Django rest framework viewset actions
As per the DRF documentation I started using ViewSet and have implemented list, retrieve, create, update and destroyactions. I have another APIView for which I was able to write schema (ManualSchema) ...
1
vote
1
answer
223
views
How to show Nested Object Fields in Django CoreAPI documentation
Generic View for Employee :
class EmployeeCreateView(generics.CreateAPIView):
serializer_class = EmployeeSerializer
I have a nested Employee serializer.
class EmployeeSerializer(serializers....
3
votes
1
answer
904
views
DRF: How to add authentication and permissions info from class-based views into autogenerated documentation?
In Django Rest Framework you can simply generate documentation:
https://www.django-rest-framework.org/topics/documenting-your-api/#documenting-your-api
from rest_framework.documentation import ...
3
votes
0
answers
629
views
How do I add a parameter in the django rest framework documentation?
I installed coreapi in my django application. I have set the url normally as the default in the documentation: http://www.django-rest-framework.org/topics/documenting-your-api/
When I open the url, a ...
0
votes
1
answer
93
views
Hide invalid methods in Django Rest Framework Documentation View
If a set of methods, e.g. for creation, deletion, and update are only available for admin users, I want to be able to hide the method in the documentation view, but I have found no way to do so. Is ...
0
votes
1
answer
688
views
Django Rest Framework include_docs_urls adding _0 to action
We have urls in our Django (Rest Framework) applications like:
r'^endpoint/(?P<item>[a-z_-]+)/$'
r'^endpoint/(?P<item>[a-z_-]+)/(?P<version>[0-9]+(\.[0-9])?)/$'
Both have POST ...
2
votes
0
answers
1k
views
Docker with .NET core: How to run 2 apps (.Net Core Api and .Net React) on a docker (Docker for Windows (linux))?
I have 2 projects(Diagnostique.FO and Diagnostique.BO) in my solution, i want to execute all my projects using Docker.
Diagnostique.BO project is ASP.NET CORE API project (CORE 2.1).
Diagnostique.FO ...
13
votes
2
answers
1k
views
DRF + CoreAPIClient + psycopg2 throws exception, Interface error: connection already closed
I'm writing some integration tests for a web API I build using Django Rest Framework and Django 1.11. My tests are passing when I use DRF's APIClient to send requests to my API endpoints, but when I ...
0
votes
2
answers
2k
views
Define POST in coreapi/django rest framework
Is there a way to define the object for a post function in the schema of django rest framework?
I have a rest api view:
class DocumentView(viewsets.ModelViewSet):
...
queryset = Document....
2
votes
1
answer
468
views
Can I build a CoreAPI JS client from DRF and inject it into a react project
I'm building a React client and a REST server with Django REST framework, neither of which are something I'm particularly good at.
Anyway, on the client side, I find myself writing various calls to ...
0
votes
1
answer
1k
views
Having Trouble with Authentication for Python CoreAPI
I have tried the two documented methods for authentication, but both yield 403 Forbidden, detail: "Authentication credentials were not provided."
auth = coreapi.auth.TokenAuthentication(
scheme='...
4
votes
0
answers
1k
views
Core API: AttributeError: module 'click' has no attribute 'style'
I am a beginner in Django REST framework and while going through this part of the tutorial I faced and error. I installed coreapi and did the desired changes to the code but when I try to run the ...
2
votes
0
answers
266
views
Basic call using linphone core
I have done Libphone android, and Ios sdk projects build and integration with my application successfully.
I am trying to run the samples that I got from the downloaded Linphone source code for e.g ...
2
votes
2
answers
900
views
Does rest_framework coreapi not support PUT / PATCH?
I'm wanting to use the Python Client Library, but having no end of pain getting PUT/PATCH to work. Whenever I try using update / partial_update, the URL param isn't interpolated from the dictionary, ...
10
votes
5
answers
3k
views
coreapi only lists list and read method, even when user is logged
I'm building a Django Rest Framework and want to test the API with coreapi library. I can create an object using coreapi programmatically inside a python script but in command line, I can't create the ...
1
vote
0
answers
336
views
Am I doing it wrong or django rest api framework / coreapi has a bug?
I'm experiencing some troubles with coreapi and Django REST API. Perhaps someone can help me understand what is wrong.
On update and partial_update the schema returns the same fields twice. Here's an ...
4
votes
1
answer
923
views
Having trouble using TokenAuthentication in CoreAPI
I'm building an API for a django app using django's rest_framework library. Everything went great and I'm able to access my API via curl commands as expected.
Now, I'd like to make things more ...
10
votes
1
answer
3k
views
How does one properly create a customized Swagger Schema in the Django Rest Framework?
I am having trouble creating a customizable swagger schema in the Django Rest Framework. I have read pages of documentation, but have not found a clear cut example on how to generate swagger ...