How to make PUT from ASP.NET MVC to ASP.NET Core Web API?
I am having trouble with the put method of Web API. I am working with Kendo UI Jquery inside ASP.NET MVC and it has to make a PUT through API. Please guide me what am I doing wrong, also at…
I am having trouble with the put method of Web API. I am working with Kendo UI Jquery inside ASP.NET MVC and it has to make a PUT through API. Please guide me what am I doing wrong, also at…
I am running a long running function as background task in my asp.net application. Before the task completes the main thread exits (I want it that way only, since if I use the await keyword and make main thread wait…
Goal: I wish to post an image from the view to the controller using a model. Issue: When adding the form data to the ajax method, it says, "Uncaught TypeError: Failed to construct 'FormData': parameter 1 is not of type…
When I submit the form, the user skills come. I use many to many relationship but always come count 0 on post action public class User : IEntity { [Key] public int id { get; set; } public Guid userID…
I have a string: private const string Codes = "2,10"; public void method() { var displayCodes = Codes.Split(','); DemoResponse response = webService.GetResponse(); //getting response from API if(response.Errors.Any(x => displayCodes.Contains(x.StackTrace)) { int myCode = int.Parse(response.Errors.Select(x => x.StackTrace).FirstOrDefault()); } } This is…
I am inputing this: List<double> weightItems = new List<double> {0.23, 0.18, 0.18, 0.27, 0.14}; And when I output it like this: objStr += "Weights: [" + String.Join(",", weightItems) + "]n"; return objStr; And I am getting this as an output:…
2 methods from my controller for some reason trigger this error: An exception occurred in the database while saving changes for context type 'API.Data.DataContext'. System.InvalidOperationException: A second operation was started on this context before a previous operation completed. This is…
The database stores the currency exchange rate on a given day. Each day, one currency exchange value is collected and stored in the database as: ID (int, AI) VALUE DATE 1 2.5 20.01.2021 2 2.7 21.01.2021 3 2.6 22.01.2021 If…
I have two MVC applications AppA and AppB, and implemented Azure AD authentication for login. I am able to sign-in successfully to both applications. But the issue is, after I login to AppA and then to AppB, after sometime when…
I would like to know what is the way to force logout somebody when I ban them? I am using this way of login process private async Task SignInWithRoleAsync(string email, string userRoleName) { var identity = new ClaimsIdentity(CookieAuthenticationDefaults.AuthenticationScheme); identity.AddClaim(new Claim(ClaimTypes.Email,…