Validate authentication cookie with ASP.NET Core 2.1 / 3+ Identity
When using Cookie Authentication in ASP.NET Core 2 (with or without `Identity`) it might happen, that a user's email or name is changed, or even the account is deleted during the cookie's lifetime. Th...
- Modified
- 7 May at 13:12
How kubectl port-forward works?
`kubectl` exposes commands that can be used to create a Service for an application and assigns an IP address to access it from internet. As far as I understand, to access any application within Kuber...
- Modified
- 22 Apr at 05:33
ASP.NET Core MVC Slow response generation
I have an ASP.NET Core MVC web application that has an endpoint which returns some data as a json. The onlly issue is that my data is around 5 MBs of raw (non-idented) JSON, and the response takes a r...
- Modified
- 22 Jul at 11:36
Why doesn't a struct in an array have to be initialized?
I researched this subject but I couldn't find any duplicate. I am wondering why you can use a `struct` in an array without creating an instance of it. For example, I have a `class` and a `struct`: `...
Azure Key Vault Certificates does not have the Private Key when retrieved via IKeyVaultClient.GetCertificateAsync
I have 2 approaches to do the same thing, but Azure has deprecated the one that works, and the other method doesn't work. I store my PFX in Azure Key Vault . (when I create the secret I see a warni...
- Modified
- 5 Jun at 05:6
How to get Context in Android MVVM ViewModel
I am trying to implement MVVM pattern in my android app. I have read that ViewModels should contain no android specific code (to make testing easier), however I need to use context for various things ...
- Modified
- 21 Jul at 00:29
Elasticsearch: Max virtual memory areas vm.max_map_count [65530] is too low, increase to at least [262144]
I have an issue with a systemd config for ElasticSearch. ``` [Unit] Description=platform-elasticsearch After=syslog.target network.target remote-fs.target nss-lookup.target [Service] User={{ app_use...
- Modified
- 27 Mar at 16:58
How to install PHP composer inside a docker container
I try to work out a way to create a dev environment using docker and laravel. I have the following dockerfile: ``` FROM php:7.1.3-fpm RUN apt-get update && apt-get install -y libmcrypt-dev \ my...
- Modified
- 20 Jul at 13:24
'unknown' vs. 'any'
TypeScript 3.0 introduces `unknown` type, according to their wiki: > unknown is now a reserved type name, as it is now a built-in type. Depending on your intended use of unknown, you may want to re...
- Modified
- 25 Feb at 15:12
Customize automatic response on validation error
With asp.net core 2.1 an ApiController will automatically respond with a 400 BadRequest when validation errors occur. How can I change/modify the response (json-body) that is sent back to the client?...
- Modified
- 23 Sep at 16:18
The type or namespace SelectElement could not be found in selenium c#
driver.FindElement(By.Id("inputUsername")).SendKeys("aca"); driver.FindElement(By.Id("inputPassword")).SendKeys("123"); driver.FindElement(By.TagName("button")).Click(); SelectElement oSelect ...
- Modified
- 5 May at 14:12
What does model.train() do in PyTorch?
Does it call `forward()` in `nn.Module`? I thought when we call the model, `forward` method is being used. Why do we need to specify train()?
Posting form data to MVC Core API
I would like to post data to my API using AJAX but I'm having issues. I'm using Fiddler to test my API and I'm able to post JSON correctly but when posting a name/value urlencoded string I get a 400 ...
- Modified
- 21 Apr at 09:9
ASP.NET Core 2.0 with Telerik Kendo Grid Read method ([DataSourceRequest]) is not called in publish
I have created an application with Telerik Kendo UI and Asp.Net Core 2.0 controls. Locally we are able to run the same code without error in Visual Studio 2017, but after publishing in local IIS it gi...
- Modified
- 24 Jul at 14:36
Python Error: AttributeError: __enter__
I receive the attribute error when I try to run the code. ``` with ParamExample(URI) as pe: with MotionCommander(pe, default_height=0.3)as mc: ``` This is where the error occurs. ``` Traceba...
- Modified
- 19 Jul at 16:31
.net core 2.1 "POST" an IFormFile using Postman - the application completed without reading the entire request body
I'm working on a dotnet core WebAPI 2.1 and I can't find a way of sending to into the Body an image. The controller looks like this: ``` [HttpPost("api/image")] public IActionResult Post([FromBo...
- Modified
- 19 Jul at 13:54
How to connect to Cloud Firestore DB with .net core?
So far all the [examples](http://googlecloudplatform.github.io/google-cloud-dotnet/docs/Google.Cloud.Firestore/userguide.html) of using Google Cloud Firestore with .net show that you connect to your F...
- Modified
- 19 Jul at 12:9
What are the differences between ConfigureServices() and Configure() in ASP.NET Core?
The documentation on learn.microsoft.com states the following: > Use ConfigureServices method to add services to the container.Use Configure method to configure the HTTP request pipeline. Can someone ...
- Modified
- 20 Jun at 09:12
makecert.exe missing in windows 10, how to get it and use it
I am using Windows 10. I don't have the makecert.exe, which I came to know when I tried to run commands to generate certificates like `makecert.exe` I get error : > 'makecert' is not recognised as an...
- Modified
- 19 Jul at 09:9
How can I add raw data body to an axios request?
I am trying to communicate with an API from my React application using Axios. I managed to get the GET request working, but now I need a POST one. I need the body to be raw text, as I will write an M...
- Modified
- 13 Aug at 10:39
Cast Binding Path so it recognises ViewModel property at Design-Time
Ok this is more of an annoyance than a problem. There is no error ``` <ContentPage ... x:Name="This" //hack to have typed xaml at design-time BindingContext="{Binding Source={x:Static v...
- Modified
- 2 Dec at 00:50
Implementing OpenIdConnectOptions Events when using Authentication.AzureAD.UI Library
I have been using a library I created from samples allowing me to authenticate a .NET core web app with Azure Active Directory and to take advantage of the various `OpenIdConnectOptions` events (e.g. ...
- Modified
- 19 Jul at 23:11
Null response returns a 204
My controller returns a 204 when I do a GET request and I don't find any data. ``` [Route("user/v1/[controller]")] public class UserLoginController : Controller { [HttpGet] public async Task<...
- Modified
- 18 Jul at 22:36
How to cast Azure DocumentDB Document class to my POCO class?
Is there a way to cast the `Microsoft.Azure.Documents.Document` object to my class type? I've written an Azure Function class, with a `CosmosDBTrigger`. The trigger receives an array of `Microsoft.Az...
- Modified
- 18 Jul at 21:14
vsts new repo has a gitignore option for many platforms/languages but not .net/c#
I noticed that VSTS has an "Add a .gitignore" dropdown with many different platforms/languages options for selection. For example, I could select the option of "Ruby" which I'm assuming would provide ...
- Modified
- 18 Jul at 18:5