Authentication fails with "Unprotect ticket failed" for Asp.Net Core WebApi

When I use Bearer token with an AspNetCore controller protected with `[Authorize]`, I get the log message: ``` info: Microsoft.AspNetCore.Authentication.Cookies.CookieAuthenticationHandler[7] I...

PreFlight Request 404 not found .net web api ; response to preflight request doesn't pass access control check: it does not have http ok status

So I want to enable CORS on my .net web API but the client application keeps getting 404 for the options request and a second error: ``` Has been blocked by CORS policy: Response to preflight reque...

11 Feb at 14:55

Fluent nHibernate: Use the same mapping files for tables with the same structure in different schemas

This is my mapping class: ``` class MyTableMap : ClassMap<MyTable> { public MyTableMap() { Schema("mySchema"); Id(x => x.id); Map(x => x.SomeString); } } ``` Thi...

18 Feb at 15:36

WPF Path disappears at some size

I have encountered this problem while scaling graph, which is drawn over GIS control Greatmap. But a simple experiment persuades me that problems is somewhere deeper in WPF. Consider simple WPF appli...

11 Feb at 10:45

Why is Stream.Copy faster than Stream.Write to FileStream?

I have a question and I can't find a reason for it. I'm creating a custom archive file. I'm using `MemoryStream` to store data and finally I use a `FileStream` to write the data to disk. My hard disk...

11 Feb at 14:25

How to fix 'Unchecked runtime.lastError: Could not establish connection. Receiving end does not exist.'

I have the following error in the Chrome Dev Tools console on every page-load of my Node/Express/React application: > Unchecked runtime.lastError: Could not establish connection. Receiving end does no...

21 Sep at 07:45

Looking up a deactivated widget's ancestor is unsafe

I am new in Flutter and I am trying receive data with a Dialog. When a click in textField the error of image2 appear... ![Layout's Image](https://i.stack.imgur.com/kWit6.png) ![Error's Image](https:/...

27 Sep at 02:58

.NET Core 3.0: Razor views don't automatically recompile on change

According to [the documentation](https://learn.microsoft.com/en-us/aspnet/core/mvc/views/view-compilation?view=aspnetcore-3.0), Razor views should, by default, recompile on change on local environment...

'ModuleNotFoundError' when trying to import module from imported package

This is my directory structure: ``` man/ Mans/ man1.py MansTest/ SoftLib/ Soft/ SoftWork/ ...

7 May at 16:25

Example of how to use String.Create in .NET Core 2.1

Does anyone know how this method is intended to be used? The documentation is somewhat 'light'! ``` public static string Create<TState> (int length, TState state, System.Buffers.SpanAction<char,TStat...

8 Feb at 17:44

Should I cache and reuse HttpClient created from HttpClientFactory?

We can read here [YOU'RE USING HTTPCLIENT WRONG AND IT IS DESTABILIZING YOUR SOFTWARE](https://aspnetmonsters.com/2016/08/2016-08-27-httpclientwrong/) that we should not create and dispose HttpClient ...

How are 'DefaultImports' used when trying to import DTOs into typescript using ServiceStack?

When trying to use the cli tools provided with ServiceStack for TypeScript, I keep running into the `DefaultImports` feature not working as expected, or in any particular useful way. What is the corre...

8 Feb at 16:47

NetFramework app referencing NetFramework library in same solution referencing NetStandard library in another soln.: could not load file or assembly

There are many similar questions about problems referencing a .NET Standard class library from a .NET Framework project where a NuGet package dependency in the netstandard library doesn't flow to the ...

Nullable reference types with generic return type

I'm playing around a bit with the new C# 8 nullable reference types feature, and while refactoring my code I came upon this (simplified) method: ``` public T Get<T>(string key) { var wrapper = cac...

ServiceStack: Having several independent/different services on one AppHost with different base paths

I have read [one other post](https://stackoverflow.com/questions/17358885/can-i-host-different-servicestack-services-at-different-urls) that I think asks almost the same question, but I think I need t...

24 May at 16:16

Creating a C# Amazon SQS Client in ServiceStack

There is [some documentation](https://docs.servicestack.net/amazon-sqs-mq) on using Amazon SQS as an MQ Server forServiceStack [Messaging API](https://docs.servicestack.net/messaging) But the message...

8 Feb at 01:53

Is there a way to increase the stack size in c#?

I'm coming back to programming after having done none for several years, and created a Sudoku game to get my feet wet again. I've written a recursive function to brute-force a solution, and it will do...

How to fix 'The project you were looking for could not be found' when using git clone

I am trying to clone a project from gitlab to my local machine. I have been granted rights as a developer, and use the command 'git clone - The error message I am getting: ``` remote: The project yo...

7 Apr at 08:6

Unable to resolve service for type 'Microsoft.Extensions.Logging.ILogger`1[WebApplication1.Startup]'

I created an ASP.NET Core 3.0 Web Application with the default template in Visual Studio 2019 Preview 2.2 and tried to inject an ILogger in Startup: ``` namespace WebApplication1 { public class S...

SignalR core - invalidate dead connections

# The problem I'm using .NET Core 2.2 with ASP.NET Core SignalR. Currently I'm saving all connection states in a SQL database (see [this document](https://learn.microsoft.com/en-us/aspnet/signalr/o...

20 Jun at 09:12

Flutter and google_sign_in plugin: PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null)

The dialog (Google form) for the credentials is opened successfully, but after I fill my credentials I'm getting this error. I followed the instructions from [here](https://pub.dartlang.org/packages/g...

ServiceStack caching users roles and permissions approach

With the AuthFeature / AuthUserSession plugin, we can populate the session with a users roles, permissions, etc in the PopulateSessionFilter on each request. ``` Plugins.Add(new AuthFeature(() => new...

6 Feb at 13:40

What is the point of writing REST APIs but in Azure Functions?

I've just started following some Azure Function tutorials and digging into this more so I'm quite New to this and my question may seem very easy but I couldn't find any answer for it yet. What is the...

6 Feb at 10:57

How to solve SocketException: Failed host lookup: 'www.xyz.com' (OS Error: No address associated with hostname, errno = 7)

Whenever I try to do an http call after about 20 seconds I get in the console the following error: ``` E/flutter ( 8274): [ERROR:flutter/shell/common/shell.cc(184)] Dart Error: Unhandled exception: ...

Select only specific fields with Linq (EF core)

I have a `DbContext` where I would like to run a query to return only specific columns, to avoid fetching all the data. The problem is that I would like to specify the column names with a set of strin...

6 Feb at 08:41