Questions

Terminal error: zsh: permission denied: ./startup.sh

I am running a command ``` ./startup.sh nginx:start ``` and I am getting this error message ``` zsh: permission denied: ./startup.sh ``` why could this be happening?

22 Aug at 21:18

Get json casing in backend

Is there a method I can use that gets the casing that is used when ServiceStack converts DTO properties into Json response? For instance a backend model property name `MyProperty` becomes json proper...

9 Nov at 14:7

Enum value in tuple using ServiceStack Ormlite throws null reference exception

I get "Object reference not set to an instance of an object" when using the Tuple notation with an Enum in the return structure. If I change the type in the tuple from Enum type to string it works a...

9 Nov at 14:40

OrmLite - GUIDs as primary keys in Oracle

I'm using OrmLite with both SqlServer, Oracle and PostgreSQL dialects. I want to use GUIDs as primary keys and have a simple object, using the AutoId attribute: ``` public class MyObject { [Auto...

8 Nov at 22:57

Why does Exception from async void crash the app but from async Task is swallowed

I understand that an `async Task`'s Exceptions can be caught by: ``` try { await task; } catch { } ``` while an `async void`'s cannot because it cannot be awaited. But why is it that when the asyn...

8 Nov at 20:22

How can I force a component to re-render with hooks in React?

Considering below hooks example ``` import { useState } from 'react'; function Example() { const [count, setCount] = useState(0); return ( <div> <p>You c...

Windows Forms application option seems to be missing?

I'm learning how to design a Windows Forms Application in Visual Studio 2017. The tutorial asks me to create a new project using the File -> New -> Project option and selecting 'Windows Forms Applicat...

Equivalent to App.config transforms for .NET Core?

I'm writing a .NET Core console application ( an ASP.NET Core web application). In .NET Framework I would have an `App.config`, and `App.Debug.config`, and an `App.Release.config` file, the latter 2 ...

8 Nov at 13:39

Delegate instance allocation with method group compared to

I started to use the method group syntax a couple of years ago based on some suggestion from ReSharper and recently I gave a try to [ClrHeapAllocationAnalyzer](https://github.com/Microsoft/RoslynClrHe...

9 Nov at 08:59

Apply digital signature to office-vba-macros with C#

After searching for a while on the internet which produced no success I will ask here. Some posts in the internet say that it's not possible to apply a digital signature to a VBA-Macro inside an Excel...

12 Aug at 21:6

Using List<string> type as DataRow Parameter

How can we pass a `List<string>` to a `DataRow` parameter in `[DataTestMethod]` I am trying something like: ``` [DataTestMethod] [DataRow(new List<string>() {"Iteam1"})] [TestCategory(TestCategories...

.NET EF Core Get DbContext from IQueryable argument

I have an `IQueryable` extension method: and I would like to know if there is some way to get DbContext from query so that DbContext argument could be removed leaving only: but that's not what I need....

How HttpContext RESPONSE END in ASP.NET Core

I want use mvc `System.Web.HttpContext.Current.Response.End();` but trying in mvc core 2 with this code: But end(); doesn't work mvc core dont exits

6 May at 07:19

Memory limitted to about 2.5 GB for single .net process

I am writing `.NET` applications running on Windows Server 2016 that does an http get on a bunch of pieces of a large file. This dramatically speeds up the download process since you can download the...

7 Nov at 16:7

How to post a message via Slack-App from c#, as a user not App, with attachment, in a specific channel

I can not for the life of me post a message to another channel than the one I webhooked. And I can not do it as myself(under my slackID), just as the App. Problem is I have to do this for my company, ...

6 May at 18:44

Why should I use SerializeField?

I have just started to learn C# and Unity, and there is one thing that I can not get used to: Why and when should I use `[SerializeField]`? Is it bad to leave variables hard coded despite using `[Seri...

12 Dec at 09:59

No Creators, like default construct, exist): cannot deserialize from Object value (no delegate- or property-based Creator

I am trying to consume an API using Retrofit and Jackson to deserialize. I am getting the onFailure error `No Creators, like default construct, exist): cannot deserialize from Object value (no delegat...

31 Oct at 05:24

Adding Serilog ILogger to a static class

I'd like to add a Serilog `Log` to a static class in my program like this (`DataHelper` is the class name): ``` private readonly ILogger _log = Log.ForContext<DataHelper>(); ``` But this leads to t...

7 Nov at 14:39

Random Selenium E2e Tests Fail because of timeouts on Azure DevOps but work locally and with remote Selenium (BrowserStack Automate)

I've got a suite of Selenium tests that work perfectly in my local environment and using Browserstack Automate, but fail on Azure DevOps. There are no configuration or setting changes when running ...

How to catch ASP.NET Core 2 SignalR exceptions on server-side and handle them on client side with JavaScript?

Context: There are differences between ASP.NET SignalR and ASP.NET Core SignalR you can read [here](https://learn.microsoft.com/en-us/aspnet/core/signalr/version-differences?view=aspnetcore-2.1). As...

For a .Net Core 2.1 project, Why does Nuget restores .Net 4.6.1 packages?

If a package is not available for .Net Core `Install-Package` > Install-package command, why does Visual Studio even, restores .Net 4.6.1 version, just to give a runtime error at later stages! I'm...

8 Nov at 15:37

Problem understanding covariance contravariance with generics in C#

I can't understand why the following C# code doesn't compile. As you can see, I have a static generic method Something with an `IEnumerable<T>` parameter (and `T` is constrained to be an `IA` interfa...

2 Dec at 07:56

C# how to check for null. (value is null) or (null == value). Can we use `is` operator instead of == operator

C# how to check for `null`. `(value is null)` or `(null == value)`. Can we use `is` operator instead of `==` operator? C# 7.0 supports const pattern with `is` operator. So we can use `is null` for al...

29 Jan at 03:40

How to start an async method without await its completion?

Sometimes I need to start an async job which works very slow. I don't care if that job success and I need to continue working on my current thread. Like sometimes I need to send an Email or SMS which ...

15 Feb at 08:18

How can I await a minimum amount of time?

I have an async C# method where I am getting an HTTP resource, and I am doing it in an infinite loop. However I don't want to hit the resource too quickly. My current code is: ``` HttpClient http =...

7 Nov at 00:16