Post HttpPostedFileBase To Remote Web API

I'm trying to post HttpPostedFileBase to remote webApi. public bool CreateClaimAttachmentCustomerDoc(ClaimAttachmentSimple attachment, HttpPostedFileBase hpf) { string jsonStrAttchment = JsonConvert.SerializeObject(attachment); ...
more »

2017-09-09 07:09 (0) Answers

get json data and images

I have Web Api Controller which get list of cars from database [HttpGet, Route("list")] public object List() { var cars = context.Cars.ToList(); return Json(cars); } Response looks like [{ "markName": "Chevrolet", "modelName...
more »

2017-09-02 15:09 (1) Answers

.NET Web API model binding prefixed properties

I have a view model and models similar to this public class SupplierViewModel { public Supplier Supplier { get; set; } //Select Lists and other non model properties } And two models public class Supplier { public string Name { get; s...
more »

2017-08-31 11:08 (1) Answers

Send large file from WebAPI.Content Length is 0

I am trying to send large file (GB) from one WebAPI (.NET Core) to another WebApi (.Net Core). I already managed to send smaller file as part of Multipart Request like in last post here: link To send bigger file I need (I think) send this file as ...
more »

2017-08-29 23:08 (1) Answers

Problems with the .NET Framework version

I have an ASP.Net MVC 5 application and WebApi, in .NET version 4.5.2 and post them to my FTP server I have the following error (attached image) ... And asking the company's technical support, they answered the following: From the .Net Framewor...
more »

2017-08-18 18:08 (1) Answers

web api authentication from client side

i have a www.api.com and a www.client.com all registration will be done at api.com and login will be done at api.com. client.com will only be able to see the UI of the login form. after user login and api.com return a token to user. How to i use the...
more »

2017-08-11 10:08 (2) Answers

passing a list to a list<T>

I am working with openxml, and have something that is pulling my hairs up, basicly i am editing a pré existing document, it is a template, the template should mantain the first page and the second, so every section i add(paragraph, table etc..) it s...
more »

2017-08-09 18:08 (1) Answers

Fill form with angularJs

This is my HTML and AngularJs Controller. When I start the app, the form is filled with data by ng-repeat... My question and problem is: When I click on dropdown list I want to call web api with this call and fill form. I call web api and get data...
more »

2017-08-07 21:08 (1) Answers

Receiving FileActionResult between Services

I have a route returning a pdf file as a FileActionResult: [HttpGet] [Route("getPdf")] public async Task<IHttpActionResult> GetPdf() { return new FileActionResult(Resources.TestPdf, "test.pdf"); } Here is my FileActionResult class: publ...
more »

2017-07-31 17:07 (0) Answers

Web Api Can't find Resource

I am trying to include Web APi in an ASp.NET application with Mvc. The application uses Identity Framework to authenticate itself. I added a WebApiConfig Imports System.Web.Http Namespace ActualizadorApp.Api Public NotInheritable Class WebApiC...
more »

2017-07-27 14:07 (1) Answers

SSO not working on ASP.NET WebApi self hosted

I have a SSO provided by IIS ASP.NET MVC 5 Web App and it works with the ASP.NET WebApi project hosted on IIS, but the same Startup.cs is not working on ASP.NET WebApi self hosted. A Controller behind [Authorize] gives me HTTP 401. This is the WebA...
more »

2017-07-24 13:07 (0) Answers

How to prevent URL disclosure in an AngularJS SPA?

A 3rd party security consultancy identified a risk in our Angular SPA/ASP.NET WebAPI application under the area of Information Disclosure, which we have been told to resolve. The risk is due to the nature of an Angular application wherein the appli...
more »

2017-07-21 17:07 (1) Answers

.NET Web API "plugin" assemblies

Doing the same thing over and over again and expecting different results. — Insanity; also my current frame of mind I have a feeling I'm just missing some key detail, or I'm doing something stupid (see tl;dr) I have an ASP.NET Web API...
more »

2017-07-16 03:07 (0) Answers