Concurrent user Authentication in Asp/token
Hi I am using an api which users the owin Authentication var Name = User.Identity.Name; var Id = User.Identity.GetUserId();is always return in the last logged in users even if a user access the home...
View ArticleHow to return Xml response (with Xml declaration) from WebAPI?
I have managed to put two XDocuments together in my code. When I call my API (which returns IHttpActionResult) with PostMan, I get the following result:<ContentNode1>...
View ArticleWhere bearer token are saved
Hi,I wanna use bearer tokens for authorization in web api application but I wonder where these tokens are saved, is this more resource consuming process than storing own custom string in DB against...
View ArticleUnable to Post and Put via Postman
Hi,I'm trying to do an HttpPost and HttpPut in the Web-Api via Postman.It's returning a Response code: 404. It's adding a request(shown above the method name) but it doesn't go into the method body...
View ArticleHow to know if user has been deactivated/deleted and remove access token
Hi,I am using OAuth bearer token to authorize users using bearer tokens.Though bearer tokens will be invalid after their expiry time but how do I invalidate those tokens when user has been deactivated...
View ArticleIs WebAPI's security any better than it was 5 years ago?
According to this link on Microsoft's documentation, WebAPI with Windows authentication is best suited to Intranet applications. But that article is from a little over 5 years ago. I'd like to know if...
View ArticleSerialization
Must the Post message be deserialized in the controller code POST method when it's been serialized in the client code? I am new to WebAPI. Thanks.
View ArticlePartial Update, JsonPatchDocument gets null
Hi,I'm having problems passing the patch document to the JsonPatchDocument variable patchDoc for Patch. patchDoc gets null. I test using postman.Code is as follows:CodeTableController.csusing System;...
View ArticleRestful request
Hi folks, basically I don’t know how to implement the .Gov uk apiI have spent ages trying various different ways to convert this curl to c#. Could someone please help. I keep getting error 500. here is...
View Articleunable to create default admin user in the startup.cs file
using System; using System.Collections.Generic; using System.Linq; using Microsoft.AspNet.Identity; using Microsoft.AspNet.Identity.EntityFramework; using Microsoft.Owin; using Owin; using...
View ArticleSecuring ASP.NET Web API
How to send encrypted string between native Android app and ASP.NET Web API?
View ArticlePost JSON Data and image at the same time to a web Api 2
I have a function which adds data to a SQL Database and upload an image(s) to the server. I convert the image into base64 string to send it with my post but I read that the image size is 33% bigger...
View ArticleStringContent vs String
What if use "string" instead of StringContent? What benefits we are getting by using the StringContent?
View Articlesending a request in json with specified format
Good day, i have the following Json request that i need to send when posting,{"UserName": "sample string 1","Password": "sample string 2","Credentials": {"ChannelName": "sample string...
View ArticleWhy we need GET with parameter while we can do it by POST method
Hi All,I am new to REST WEP APIsOne thing I noticed that if we can do every thing with POST method (by putting no of parameters regardless of insert update delete or select) why we need GET with...
View ArticleSerializer runs in the new thread?
I have a Get (int Id) method in my controller that returns class instance.Instance is created correctly(i can see that in the debugger) but on attempt to returnreturn classInstance;my code crashes...
View ArticleHow to set timeout for API
Hello,We have a web API that's timing out way too soon (about a minute) even though we set the executionTimeout in the web.config file to 360 seconds. We are wondering why this is.My google research...
View ArticleEventViewrErrorCode-4010:Event message: An unhandled security exception has...
Experts,when I deploy webapi on IIS 8.5 I get error 4010:Event message: An unhandled security exception has occurred.My Authentication for my websevice is windows and my web.config has code...
View ArticleGetRequestContext().ClientCertificate always return null
I am working on client certificate-based authentication with self-hosted web API but web API always return when trying to get a certificate from the request using...
View ArticleWeb service or web page
Hi,I would like to know what is the best option for this: Need the ability to present a URL that accepts parameters, so something like www.domain.co.uk/page?id=1&name=loftty What is the best...
View Article