Data dodania Pytanie
2017-06-19 23:06 Getting Current User Id in AspNet Core »
So far in Asp.Net I have used this command to get current username var currentUsername = !string.IsNullOrEmpty(System.Web.HttpContext.Current?.User?....
(0) odpowiedzi
2017-06-19 23:06 C# MongoDb Driver not GeoJSON compatible? »
I am building a web app using Leaflet.js, ASP.Net Core webapi service layer and MongoDB to persist data. It seems that the C# driver for MongoDb does...
(0) odpowiedzi
2017-06-19 15:06 Xamarin form validation and ASP.Net WebAPI »
I have a Xamarin.Form app, and I am consuming an ASP.Net Web WebAPI with Model State for validation in my internal models. If I got a "bad request" my...
(1) odpowiedzi
2017-06-18 23:06 Does MVC and WebApi controller share route table? »
Seems by error, I had put my config.Routes.MapHttpRoute(...) under RouteConfig.RegisterRoutes(...) instead of WebApiConfig.Register(...). But even the...
(1) odpowiedzi
2017-06-18 20:06 List<> does not contain the definiton for getAwaiter »
I am implementing automapper in my asp.net webapi project. I have also implemented async tasks in the business layer. I basically want to return Mov...
(1) odpowiedzi
2017-06-18 00:06 EF not throwing DbUpdateConcurrencyException despite conflicting updates »
I am using EF 6.x (code-first) on a Web API server with web clients and I need to implement concurrency handling. The problem is that I cannot even g...
(1) odpowiedzi
2017-06-17 18:06 A way to have different LogPaths for elmah, based on error types »
I am looking for a way to have different log path for different error types in my web api project. What I want is to put System.Web.HttpException erro...
(1) odpowiedzi
2017-06-17 14:06 Token endpoint with AllowInsecureHttp=false still accepting http requests »
Hope anyone can help me with the following highly frustrating problem. I have .NET WebApi which I secured with jwt authentication. In setting up the ...
(1) odpowiedzi
2017-06-17 00:06 MVC Web API, Error: Can't bind multiple parameters »
I get error when passing the parameters, "Can't bind multiple parameters" here is my code [HttpPost] public IHttpActionResult GenerateToken([F...
(1) odpowiedzi
2017-06-16 23:06 File binding in WebApi controller not working »
I try to upload files from angular to dotnet core webapi and somethings seems wrong with my code: [HttpPost("UploadImage")] public IActionRes...
(1) odpowiedzi
2017-06-16 22:06 ASP.NET Core giving me Code 500 on Forbid() »
I tried to solve this for hours now and I can not find anything. Basicly I have a simple controller which roughly looks like this: [Route("v1/lists")...
(1) odpowiedzi
2017-06-16 16:06 asp.net web api route for controllers with same name »
I am integrating my project with another one Multiple types were found that match the controller named 'XXXXX'. This can happen if the route that se...
(2) odpowiedzi
2017-06-15 18:06 Server.Transfer/Redirection in .NET WebApi »
Our company has an internal API (.NET WebApi) serving many of our applications. Now, we're going to have an application hosted outside and the decisio...
(1) odpowiedzi
2017-06-15 14:06 How to send two object as response message and response code in web api »
I want to send response message like this {"message_code": 00, "message": "Success"} My Response Message Class public class ResponseMessage { ...
(1) odpowiedzi
2017-06-15 11:06 Cannot post JSON to ASPNET Core via CORS (415 - Unsupported media type) »
I am having problems getting ASPNET CORE to receive json requests posted cross-domain from an AngularX client. I've looked around quite extensively bu...
(1) odpowiedzi
2017-06-14 11:06 WebApi "The requested resource does not support http method 'DELETE" »
Using WebApi angularjs project and trying to delete function as ` [HttpDelete] public String DeleteCountry(string cntryId) { if...
(3) odpowiedzi
2017-06-14 10:06 Call Web API 2 method using c# CLR store procedure by HTTPClient »
I have a WPF application that consumes services of MVC web API 2. Created RestClient wrapper using HTTPClient to call async methods such as PostAsync ...
(2) odpowiedzi
2017-06-14 05:06 Calling asp.net webApi through restclient throws exception "Reference to undeclared entity 'nbsp'. Line 69, position 41." »
I am calling Asp.net WebApi from C# code via RestSharp using below code RestClient Client = new RestClient(); Client.BaseUrl = new ...
(2) odpowiedzi
2017-06-13 22:06 Create API Resource Model for Value Objects »
Is it safe to return Value Objects from an API endpoint or should all objects be converted to a Resource Model. For example if I have GET /api/custome...
(1) odpowiedzi
2017-06-13 14:06 Is async await necessary in the following sample code? »
I'm working on an ASP.Net Web API that is used by a mobile application. I'm picking up to where my colleague has left off. I'm just curious about his ...
(1) odpowiedzi
2017-06-13 01:06 AutoMapper 6.0.2 Resolve destination member using a custom value resolver »
I am trying to use a Custom Value Resolver to delegate mapping of a list of Assignees from the Entity class to the service class. Below is the class w...
(0) odpowiedzi
2017-06-12 15:06 Retrieve Xml and string data in JSON Format from WebAPI »
I have created a WebAPI which i need to convert strings and Xml data into JSON resultset for my application. But what resultset i am getting is not th...
(1) odpowiedzi
2017-06-12 12:06 How to pass non string related data into a get request web api »
I am calling an asp.net mvc web api controller action from an angular 2 application. I can accept objects from the call like this: [Route("api/g...
(2) odpowiedzi
2017-06-12 03:06 .NET WebApi Async Controller Action Executes Forever »
I am having a tough time following.NET Async/Await examples, such as the official MDN tutorial. From what I gather, to make a controller action async...
(1) odpowiedzi
2017-06-11 20:06 Using ExecuteScalar() in place of ExecuteReader() »
I am learning Web API and working on a small project (I know this question is not related to Web API, but just to get to the scene). So I have this fu...
(1) odpowiedzi
2017-06-11 19:06 Angular 2 File Uploader with web API »
I am new to angular 2 and Web API.Just a day old.I am trying to add file upload control using angular2 along web API. I have referred this article an...
(0) odpowiedzi
2017-06-11 14:06 ASP.net web api returns list of empty objects »
I have an action, which shoeuld return a limited list of store items from a DB, here the code below [HttpGet] public IEnumerable<ProductIn...
(1) odpowiedzi
2017-06-10 21:06 ASP MVC WebApi returns error 'not found' »
"<!DOCTYPE html> <html> <head> <title>The resource cannot be found.</title> <meta name="viewport"...
(1) odpowiedzi
2017-06-10 19:06 why is WCF used for intranet services? »
I have a new project I am working on. The purpose of the project is to centralize all service calls and provide a single entry point to other services...
(1) odpowiedzi
2017-06-10 18:06 How to get all document fome mongodb collection name (Services) by using C# webapi 2? »
I have a model return a list of collection name Service : public IEnumerable<BsonDocument> ServicesBsonLits { get; set; } and I have an Actio...
(0) odpowiedzi
2017-06-09 20:06 Protect from multi requests - WebAPI »
I have next problem I have user. User has column in database - Tickets. - Ticket is internal currency. Now when User click on website BUY - I go to we...
(2) odpowiedzi
2017-06-09 14:06 Mocking ApiController SignalR broadcasting »
I'm trying to mock SignalR broadcasting present in ApiController(WebApi), but unable to complete test case, below is my code SignalRHub public clas...
(1) odpowiedzi
2017-06-09 13:06 How to serialize a C# DateTime as a Javascript Date using Web API »
In MVC, you can do something like this: public ActionResult Index() { return Json(new List<DateTime> { DateTime.Parse("19/02/2017") }, ...
(2) odpowiedzi
2017-06-08 23:06 Angular 2 http.post not working with web api »
My Web Api Core Controller Method looks like this public void Post(Sample sample) { _sampleService.CreateSample(sample); } Sample POC...
(1) odpowiedzi
2017-06-08 17:06 Web API: different way of attribute routing »
I am learning web api. just gone through few articles and found attribute routing can be done different way. https://www.codeproject.com/Articles/7...
(2) odpowiedzi