Issue in Enabling CORS for Web API 1, .net 4.0
I need to enable CORS for my Web API and I can’t upgrade to Framework 4.5.
I’ve tried to add the following to my Web.config to see if it worked, but it didn’t:
I need to enable CORS for my Web API and I can’t upgrade to Framework 4.5.
I’ve tried to add the following to my Web.config to see if it worked, but it didn’t:
Where can I specify custom serialization/deserialization in an ASP.NET Web API?
I have the following example where the request is http://{domain}/api/foo/{username} but I get a 404 status code back. No other Get actions exist on this controller. Shouldn’t this work?
I’m running into a 413 issue while trying to send data from my web application (.netfx 4.6.1) to my web api (.net core 3.1). In the code below, I send a list over containing byte data of images along with additional data needed to build a file. The expected output is to return a byte array containing the new file. Unfortunately when sending the request I receive an error: Response status code does not indicate success: 413 (Request Entity Too Large).
I’m trying to pass a Dictionary<string,string> object as a parameter to my web api method but if I inspect the log file it always comes through with a count of 0:
I have a chat application backend built using Web Api where I am exposing several database entities directly to clients. I was wondering whether there is any positive points to map the entities to DTOs or should I continue exposing the entities as I am currently. Just to clarify I am not asking a DTO vs non-DTO general question but just advantages of using it in this scenario since most of the fields in the entities would probably be used by the client.
I want to completely disable model validation for WebAPI controllers. I tried a few ways to do it for MVC, but seems WebAPI doesn’t get that methods.
I’m implementing a Proxy for my application using ASP.NET WebApi (ApiController) and using HttpClient to make the request with my authorization header. It works fine, but it’s extremely slow. Below is the main code, then the Global initialization (with DefaultConnectionLimit) and web.config related piece.
I’m trying to set up a web api service that searches for a .pdf file in a directory and returns the file if it’s found.
I implemented Microsoft Identity and JWT in my web api,
a client can login and get a JWT token and store it in the application.
since the expiration of the token the user can access the the server,
but if I remove a user from my database, the removed user still has its token and can access the web api,
how can I check the validation of the user?