ASPX Service - how to get HTTP 200
HI there, I created an ASPX Web Service that is accepting a Fax number (string) and a serialized PDF file. It then de-serializes the file and saves it on the drive. Everything works great, but I need...
View ArticleWeb API URL Routing
We are looking at developing a set of API End Points that need to be Culturally aware. Our Localization will mostly be done via the data stores for example, take cultural info. We maintain the...
View ArticleMicrosoft.AspNet.WebApi.Cors for enabling cors does not work
Hello everyone, I am trying to enable cors on API thought the solution of Microsoft DOCS HERE but it does not work. After installing NUGET pagckage:Install-Package Microsoft.AspNet.WebApi.CorsI added...
View Article404 error when when calling post request
hello all,i have this simple web api [HttpPost] public IHttpActionResult CreateProduct([FromBody] Product product) { if (!ModelState.IsValid) return Content(HttpStatusCode.BadRequest, "invalid");...
View Articlemultiple authentications: ignore OWIN OAuth Bearer middleware depends on request
I want to have WebApi with multiple authentications. I'm planning to enable/disable its with AuthorizeAttribute on controller's actions e.g. MyAuthOne, MyAuthTwoThen I want to use User and work with...
View ArticleDisable or skip OWIN OAuthBearerAuthenticationMiddlewate execution
How can I disable or skip OAuthBearerAuthenticationMiddlewate execution?Problem: for some requests I don't want to set Principal with claims, but requests have "Authorization" header with Bearer token...
View ArticleRole based authorization in ASP.NET OWIN?
How to get a role based authorization in ASP.NET OWIN with JWT?this is middleware when JWT is authenticated: app.UseJwtBearerAuthentication( new JwtBearerAuthenticationOptions { AuthenticationMode =...
View ArticleApi resonse inconsistency
I have created web api for my nativescript app. But the api response is inconsistent. Some time json response is perfect and sometime empty json. As I am newbie I need help. this is my...
View Articlechanging OAuth2 response, is it possible?
my current oauth response is like{ "access_token": "S5wFR-HXr1MJF94Z9Yda67v4vMD4...", "token_type": "bearer", "expires_in": 31535999, "memNo": 100000004,...
View ArticleSend JSON data from ajax script to POST method in Web Api
I use the following script.<script type="text/javascript">$("#Save").click(function () { var jsonData = ko.toJSON(tuDispInfo); var url = corewebApiUrl + '/tudisp/Create'; url =...
View ArticleImport http multipart content into a table
Hi, I am using the below code to import http content into a SQL Server table. The file format looks fine and when I test the import either from ARC or Postman this works fine. But, on the source system...
View ArticleCore 2 API - accounts in-app - Consume by winforms
I've started writing an ASP.NET Core 2 web application (MVC), using the standard templates generated by visual studio. This app uses accounts in-app for security (No o-Auth).Now I want to add an API,...
View ArticleCan not connect with Web Api- "the requested URL ... was not found on this...
Hi friends,I have problem with simple Web Api. It works correct in Visual Studio - it shows me database content.After I put it on my server I can't connect with the methods- I see "404 Not Found" in...
View ArticleCreate image by one or two dimensional array values
HI All, I need to write one Web API My input will be one or two dimensional array in json format expecting out will be bar or pie image in base64 How i achieve this?...
View ArticleTesting filters with IDependencyScope in Web API
I have WebApi simple NUnit Test[Test] public async Task Test() { var attribute = new TestAuthenticationAttribute {ApiVersions = new[] {"v1"}}; System.Web.Http.Controllers.HttpActionContext context =...
View ArticleUnable to access the api from view?
public class ValuesController1 : ApiController { [HttpPost] public IHttpActionResult PostPersonalDetails([FromBody]PersonalDetails personaldetails) { if...
View ArticleWebAPI GET method + IProgress
I'm trying to implement an Async Method in a WebAPI that would take as parameter some file Ids, would compress the files and return the url for the created zip file. There's a working environment to...
View ArticleCould not connect
Hallo there,I have a windowsservice (TopShelf) with owin selfhost web api.i start the http listener in this way:------------------------------------------------------------------------------------var...
View ArticleSeparate Web API for each Application
Hi Folks,We have different applications in our portfolio. All applications have their own databases and all applications has some redundant tables and data inside those tables like Customer table is...
View ArticleSSIS question
Background: I have been working on SSIS and WCF from past 2 months. I have gathered basic working knowledge in these two areas along with SQL. Requirement: there is a flat file with about 300 rows. I...
View Article