Data dodania Pytanie
2017-12-09 16:12 How to use HttpClient to consume the data from an xml content site and return them as List of Json object? »
Here, I have a sample link which contains xml data as shown below. As you can see on the xml content from the given link, there are xml element <Di...
(1) odpowiedzi
2017-12-09 16:12 open generated pdf file in new tab instead of downloading..Web API »
.Net 4.6.1 C# I generate a pdf file at runtime and can download it successfully. I want to open the newly created pdf file in a new tab instead of do...
(2) odpowiedzi
2017-12-09 14:12 Unity3D using WWW cannot deserialize JSON from Api response »
I am using a simple Unity application to send and receive data from my WebApi. The Api creates models which is serialized and sent as Json. When my U...
(0) odpowiedzi
2017-12-08 17:12 JSON Web Token not invalidated when payload has been changed »
I just noticed a massive flaw with my JWT setup - I have a WebAPI project and am authenticating using JWT as set up in this guide here. I am sending ...
(0) odpowiedzi
2017-12-08 15:12 Catch an invalid HTTP request method globally »
I would like to restrict my Web API endpoints to certain HTTP methods, such as GET and POST. I have searched the internet and I found out that you can...
(2) odpowiedzi
2017-12-08 05:12 Unable to run webapi solution in vs2017(.net core) »
Hi I started working on visual studio 2017 and trying to create small webapi application using .net core. I followed https://docs.microsoft.com/en-us/...
(1) odpowiedzi
2017-12-07 20:12 Incorrect endpoint firing using Route attribute »
I have the following methods in my UserController. The first two, Register and VerifyUser work fine. However - I can't get login to be called. No ma...
(1) odpowiedzi
2017-12-07 11:12 Is implementing client-side validation through an API realistic when it comes to performance? »
So in an ideal world both client side validation and server side validation can be defined in one place, so the validation only has to be written once...
(1) odpowiedzi
2017-12-07 10:12 Double login to MVC and WebAPI »
I develop two separated applications: MVC and WebAPI. On some pages of MVC application I perform ajax requests to WebAPI. Furthermore, I use IdentityS...
(1) odpowiedzi
2017-12-06 18:12 ASP.Net WebApi do not return form data via Content »
I don't know if it's a bug but i'm unable to get raw request on server side. Consider following controller method: [AllowAnonymous] [Route("api/sayH...
(1) odpowiedzi
2017-12-06 16:12 Web Api - separating workflow from BL »
My teammates and I argued about what code the web api controller should hold. We all agree that the controller should not hold business logic but we d...
(1) odpowiedzi
2017-12-06 13:12 Adapting hypermedia links based on environment »
I have an on-premise ASP.NET Web API that's querying on-premise data. The plan is for the client web application to call an Azure Function which will ...
(1) odpowiedzi
2017-12-05 21:12 Download Large File Using Web API Returning OutOfMemoryException »
I've tried using numerous questions/answers on SO - but can't seem to overcome the OutOfMemoryException I receive when trying to download a 200MB zip ...
(1) odpowiedzi
2017-12-05 21:12 Re-route or rewrite a POST REST API request »
My requirement is for all POST requests to a specific REST API endpoint in my legacy application to be re-routed to a new endpoint (both are implement...
(0) odpowiedzi
2017-12-05 16:12 characters replaced in the filename when downloaded »
Working o an webapi application with angularJS as UI. When I download a file to my desktop from my application. The name is changed replacing some cha...
(0) odpowiedzi
2017-12-04 16:12 MVC Custom http headers set in web config but not all calls having them set »
I have the following tags set in my MVC web application. <system.webServer> <httpProtocol> <customHeaders> <remove ...
(0) odpowiedzi
2017-12-04 14:12 Differentiating Web Api Controllers By Namespace When Using Attribute Routing »
I am using attribute routing for Web Api. What I am trying to accomplish is to write a controller selector so that controller classes sharing the same...
(0) odpowiedzi
2017-12-04 10:12 How to authenticate and authorize the token from Angular 2 web app using Azure ad b2c at ASP.net Web API? »
I am using angular 2 at client side and I want to allow the consumers to login using the social accounts like Google, Facebook etc. For that I am usi...
(1) odpowiedzi
2017-12-03 21:12 Stored procedure return return value and capture(LINQ) »
The output of the stored procedure named giris is as follows. How can I get the value of return_value with c # and linq. DECLARE @return_value int, @...
(0) odpowiedzi
2017-12-03 13:12 Property that is associated with a foreign key is not set when reading the entity from the db »
I am using the Code First approach with EF 6.X. There are two entities and a context: class Product { long Id { get; set; } string Name { get; ...
(1) odpowiedzi
2017-12-03 09:12 Alternative to Visual Studio WCF Connected Service »
I need to be able to call some old web services from a web api 2 (visual studio 2017) Hi I have used the Visual Studio WCF Connected Service and it w...
(0) odpowiedzi
2017-12-02 16:12 Stream.Position throws DisposedObjectException, what to check for? »
I have a ExceptionFilter where I read the content from the request; using (var stream = await _actionExecutedContext.Request.Content.ReadAsSt...
(1) odpowiedzi
2017-12-02 15:12 FromBody does not bind Inherited Id »
The customer class is inheriting from Entity in which the "Id" property is available. But whenever I post a JSON object to my controller all the prope...
(1) odpowiedzi
2017-12-02 14:12 The resource cannot be find - .net web api »
I've been trying for a while to make an rest api endpoint. However, when I test, it says that "The resource cannot be found." in the web browser. Thi...
(1) odpowiedzi
2017-12-01 21:12 Asp.net core post api return not found »
I have a post api in asp.net core 2.0 that return a simple message (for test ). [Produces("application/json")] public class LoginApiController : Co...
(1) odpowiedzi
2017-12-01 20:12 Validating HttpRequestMessage body »
I have a web api and I wanted to validate the request coming in. Currently I have this in my web api controller: public HttpResponseMessage GetSomet...
(1) odpowiedzi
2017-12-01 09:12 Web api return values for async methods »
I'm a bit confused with HttpResponseMessage and Task<HttpResponseMessage>. If I'm using the HttpClient method PostAsync() to post data I need t...
(1) odpowiedzi
2017-11-30 22:11 Return error code instead of message in ASP.NET Identity API »
I am building a ASP.NET Web API endpoint for creating managing users. This is a REST interface and I'd like to return error codes when something goes ...
(0) odpowiedzi
2017-11-30 18:11 Mounting an JSON answer in WebAPI project »
In my project I'm developing a WebService (using WebAPI 2 with EF6). This service should return a JSON message and it is. But the message is an inconv...
(1) odpowiedzi
2017-11-30 16:11 C# Web API Route Prefix »
I have a web api that runs in a WPF C# application. I have used Owin to implement it. If I send request by using /api prefix then it works as I expect...
(2) odpowiedzi
2017-11-29 23:11 Correct way of streaming a CSV of unknown size from memory »
I have a database that has a table with just over 2 million records of about 20 columns. The user is able to query the database and limit the number o...
(0) odpowiedzi
2017-11-29 14:11 ASP.NET Web API routing with action parameter »
in the WebApiConfig.cs file of my Web API project I have replaced the default routing mapping to this one: config.Routes.MapHttpRoute( ...
(1) odpowiedzi
2017-11-29 00:11 Resize an Image that has been uploaded as multipart/form-data in a WebAPI controller »
I am getting an image which has been uploaded to a Web API method using multipart/form-data using await Request.Content.ReadAsMultipartAsync(provider)...
(0) odpowiedzi
2017-11-28 16:11 Unity exception interception - configuration »
I would like to have one set of interceptors at the MVC or Web API layer that catch any exception, grab the URI that generated the exception, and look...
(1) odpowiedzi
2017-11-28 12:11 Web API 2.0 Attribute Routing ("upgraded" from API v1 Code) »
I'm new to c# and asp.net web api. I'm working with Microsoft Visual Studios 2015 Community Edition. A few days back i got an old Code. It used the ol...
(1) odpowiedzi