asp.net-web-api

Does windows 10 connection limit apply to self-hosted applications?

不羁岁月 提交于 2019-12-25 08:34:21
问题 I am planning to run RabbitMQ on Windows 10 as well as other services, including Self-Hosted ASP.NET Application. I don't want to use Windows Server from reasons I don't want to explain here. Will I have problems after hitting 10 concurrent connections limit of Windows 10? Number of consumers can reach even 30-50. 回答1: According to the Microsoft EULA for Windows 10: (iii) Device connections. You may allow up to 20 other devices to access the software installed on the licensed device for the

Why switch to Azure Web app / API to Multi-tenanted is not working?

被刻印的时光 ゝ 提交于 2019-12-25 08:20:04
问题 I have a Web app / API deployed on Microsoft Azure working in single tenant mode. I need to enable users from other tenants to be able to use my API. I found this post with step-by-step guide to enable multi-tenant authentication, https://blog.mastykarz.nl/configuring-multi-tenant-authentication-azure-app-service-authentication-options/ but when I try to change Web API's Multitenanted property to Yes, it says "failed to update App ID URI application property" with following error detail: {

Read content body from a HTTP GET in C# WebAPI

雨燕双飞 提交于 2019-12-25 08:18:57
问题 I have a WebAPI C# application. My GET method is defined as: [HttpGet] public HttpResponseMessage Get(string id) This API retrieves some content from a database, based on a given id . Another parameter is required but it is so long that having it on the URL would not work, so I'm using the GET body to send such second parameter. How can I retrieve it from inside the get method? I tried var dataOnBody = await Request.Content.ReadAsStringAsync(); but it doesn't work as the Get method is not

ASP.NET Core Web API: Program does not contain a static 'Main' method suitable for an entry point

大兔子大兔子 提交于 2019-12-25 07:59:34
问题 I am working on an ASP.NET Core Web API that references other projects (csproj) within a large solution. The ASP.NET Core Web API builds in Visual Studio 2015 and using msbuild in a command prompt "on my machine" :-) msbuild SomeWebAPI.xproj Compilation succeeded. 33 Warning(s) 0 Error(s) Time elapsed 00:00:01.7740626 Done Building Project . . Build succeeded. Problem is it doesn't build on our build-server. Same msbuild-command, same msbuild-version, different result: msbuild SomeWebAPI

Sample active-directory-dotnet-webapi-onbehalfof not working

♀尐吖头ヾ 提交于 2019-12-25 07:49:31
问题 I am trying to run the active-directory-dotnet-webapi-onbehalfof sample in single tenant mode. I've registered the web app service and the native app client as global admin for the tenant. When I run the sample, as a user in the tenant, I can get a token in the client only after consent pops up (first-time for user), and then call makes it to the service, but there it fails with below. Why is that? Documentation says that when a tenant admin registers the application no further consent is

Old tokens stopped working after updating Owin from 3.0.0 to 3.0.1

折月煮酒 提交于 2019-12-25 07:48:28
问题 I updated the Owin nuget packages from 3.0.0 to 3.0.1 in my WebApi projects, but after the update all the user tokens that were generated by old version, and saved on the client side stopped working with new deployment. Is there a way to keep the old user tokens working with new version, as otherwise all the users will need to log into the system again to get new access token, which I want to avoid. 回答1: The incompatibility between 3.0.0 and 3.0.1 is due to a bug in the 3.0.0 version of the

Properties of class parameter are always null in Asp.Net Web Api

て烟熏妆下的殇ゞ 提交于 2019-12-25 07:46:57
问题 In my web api controller there is an action method like below [HttpPost] [EnableCors(origins: "*", headers: "*", methods: "*", exposedHeaders: "X-Custom-Header")] public IReportOutput InsuranceHandlingFiles([FromBody]CaseCountsInputData caseCountsInputData) { } Parameter class of this action is [Serializable] public class CaseCountsInputData { public string MainTitle { get; set; } public string YearTitle { get; set; } public string InsurerFileCountTitle { get; set; } public List<FileCount>

ASP.NET Web API - Handle more requests per second

喜欢而已 提交于 2019-12-25 07:46:55
问题 I am using ASP.NET Web API to design a REST API and hosted it as a Cloud App on Azure. I used the Load testing framework here, to test the performance. I find for 100 concurrent requests, the average response time is as expected. But when the number of concurrent users increases further, the Average Response Time also increases. NOTE : The Response time for a single request is ~3 seconds. I tried making my POST call async , but that wasn't of much use. Any suggestions? 来源: https:/

How To Include the Derived Table Columns inside the Json (Nested)

旧巷老猫 提交于 2019-12-25 07:39:34
问题 I've two Entities In VS 2015 Model Halaqat_Test (Parent) has Primary Key ( MsqID ) Halaqat_Test2 (Child) has FOREIGN Key ( MsqID ) there is no link or Any Association between those two entities. yesterday i do link each entity to another. by using this Code var result = db.Halaqati_Test.GroupJoin (db.Halaqati_Test2, c => c.msq_id, s => s.MsqID, (c, s) => new { Mosque = c, Rings = s }); return result; but the problem is that the child Table columns Halaqati_Test2 (Not Included inside the

Angular2 Service not passing JSON to WebAPI

≡放荡痞女 提交于 2019-12-25 07:36:20
问题 Trying to understand what I am doing wrong. I am trying to POST a JSON with a Angular Service to WebAPI2, once I pass it, I want to execute a stored procedure on the database with parameters taken from that JSON. What happens here however instead: The connection is successfully resolved to the Web Service - OK, I get a response from the server The Debug.WriteLine on the Web Service outputs "VAR: 0 0" instead of the actual parameters in JSON Not sure even where to start, is the problem with