Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,11 @@
"Newtonsoft",
"noindex",
"nokogiri",
"NOLOGO",
"nuget",
"nupkg",
"omnisharp",
"OPTOUT",
"Permalinks",
"picklist",
"postbacks",
Expand All @@ -84,6 +86,7 @@
"Rakefile",
"rebranded",
"Remmina",
"rohith",
"Roslynator",
"rubygems",
"s",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class Program
```


```powershell
```bash
dotnet run -- --int-option 123
The value for --int-option is: 0
The value for --bool-option is: False
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ I have just upgraded my laptop from Ubuntu 18.04 to 18.10 so that I could check

However despite following the instructions from here: <https://dotnet.microsoft.com/download/linux-package-manager/ubuntu18-04/sdk-2.2.102>

```powershell
```bash
wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb

Expand All @@ -31,7 +31,7 @@ I would then receive a package not found error on the ```sudo apt-get install do

The fix seems to be to copy these manually.

```powershell
```bash
wget -q https://packages.microsoft.com/config/ubuntu/18.04/prod.list
sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
sudo apt update
Expand Down
2 changes: 1 addition & 1 deletion _posts/2019-03-11-host-aspnetcore-on-iis.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ First I published a last known good version of my application by creating a new

The idea being I can deploy from this branch while I investigated and once fixed I could delete the branch.

```powershell
```bash
git reset e64c51bf1c3bdde753ff2d8fd8b18d4d902b8b5b --hard
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ There was no such problem on macOS or Windows however as I like to write code on

It's a bug that I [raised over on GitHub](https://github.com/OmniSharp/omnisharp-vscode/issues/3049) and while the full logs and environment details are over there in more detail, for brevity I will show what I believe is the main problem here:

```powershell
```text
[warn]: OmniSharp.MSBuild.ProjectManager
Failed to load project file '/home/solrevdev/Code/scratch/testconsole/testconsole.csproj'.
/home/solrevdev/Code/scratch/testconsole/testconsole.csproj(1,1)
Expand All @@ -41,7 +41,7 @@ That was to re-install or update my version of Mono from the official [download

The instructions for doing this I borrowed and adapted are from there and are as follows:

```powershell
```bash
sudo apt install gnupg ca-certificates
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
Expand Down
4 changes: 2 additions & 2 deletions _posts/2019-12-07-unable-to-locate-package-dotnet-sdk-3.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ However, for Linux each release of [dotnetcore](https://dotnet.microsoft.com/dow

If you follow the [instructions](https://docs.microsoft.com/en-gb/dotnet/core/install/linux-package-manager-ubuntu-1904]) from Microsoft you will get the following error message:

```powershell
```text
Unable to locate package dotnet-sdk-3.1
```

The issue is that page targets Ubuntu version 19.04 and I am running Ubuntu version 19.10 (Eoan Ermine).

So, If you are me from the future wanting to know how to get the latest version installed here is what you need to do:

```powershell
```bash
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
sudo apt-add-repository https://packages.microsoft.com/ubuntu/19.10/prod
sudo apt-get update
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,23 +16,23 @@ I host an [aspnetcore](https://dot.net/) website on a Windows Server 2012 R2 run

However, the past two nights the server has restarted unexpectedly leaving the website down with the following error message:

```powershell
```text
HTTP Error 500.30 - ANCM In-Process Start Failure
```

The first night a simple `IISRESET` command was all that was needed to get the site running again, however, last night it did the same thing.

Looking at `Event Viewer` I noticed the following:

```powershell
```text
Application '/LM/W3SVC/2/ROOT' with physical root 'C:\Path\To\Website' failed to load clr and managed application. Managed server didn't initialize after 120000 ms.
```

So, doing some googling I came across an article suggesting that [An x86 app is deployed but the app pool isn't enabled for 32-bit app](https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/azure-iis-errors-reference?view=aspnetcore-3.1#an-x86-app-is-deployed-but-the-app-pool-isnt-enabled-for-32-bit-apps).

This suggests that:

```powershell
```text
For an x86 framework-dependent deployment (<PlatformTarget>x86</PlatformTarget>), enable the IIS app pool for 32-bit apps. In IIS Manager, open the app pool's Advanced Settings and set Enable 32-Bit Applications to True.
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ This site worked fine elsewhere so to try and narrow down the problem I created

After some googling, I tried to reset the servers self-signed SSL certificate by using the following closing the browser in between but that had no effect:

```powershell
```bash
dotnet dev-certs https --clean
dotnet dev-certs https --trust
```
Expand Down
12 changes: 6 additions & 6 deletions _posts/2020-01-15-how-to-remove-the-net-core-runtime-and-sdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ It seemed like every major and minor version from 1.0 to the latest 3.1 and many

To see if your machine is the same try this command in your terminal:

```powershell
```bash
dotnet --list-sdks
```

Expand All @@ -25,7 +25,7 @@ There is also a [tool to help uninstall these versions](https://docs.microsoft.c

So I downloaded and installed the tool and ran a command to see list what could be uninstalled for me.

```powershell
```bash
dotnet-core-uninstall list
```

Expand All @@ -37,7 +37,7 @@ So I began to uninstall the undeeded and safe to remove dotnetcore SDK's on the

I started by removing all preview versions of the dotnetcore sdk.

```powershell
```bash
dotnet-core-uninstall remove --sdk --all-previews
```

Expand All @@ -46,13 +46,13 @@ dotnet-core-uninstall remove --sdk --all-previews

I then re-ran the tool to ensure that these were uninstalled and to see what versions were left.

```powershell
```bash
dotnet-core-uninstall list
```

Then I built and ran my final command to remove the older versions that were not needed by Visual Studio.

```powershell
```bash
dotnet-core-uninstall remove --sdk 2.2.300 2.2.102 2.2.100 2.1.801 2.1.701 2.1.700 2.1.604 2.1.602 2.1.601 2.1.600 2.1.511 2.1.509 2.1.508 2.1.507 2.1.505 2.1.504 2.1.503 2.1.502 2.1.500 2.1.403 2.1.402 2.1.401 2.1.400 2.1.302 2.1.301 2.1.300 2.1.201 2.1.200 2.1.104 2.1.103 2.1.102 2.1.101 2.1.100 2.1.4 2.1.3 2.1.2 1.1.7
```

Expand All @@ -61,7 +61,7 @@ dotnet-core-uninstall remove --sdk 2.2.300 2.2.102 2.2.100 2.1.801 2.1.701 2.1.7

One final check...

```powershell
```bash
dotnet-core-uninstall list
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ I would get either:

`MySqlException (0x80004005): The Command Timeout expired before the operation completed`

```powershell
```text
[MySqlException (0x80004005): The Command Timeout expired before the operation completed.]
System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) +102
System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) +64
Expand All @@ -55,7 +55,7 @@ or:

`A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond`

```powershell
```text
[SocketException (0x274c): A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond]
System.Net.Sockets.Socket.Receive(Byte[] buffer, Int32 offset, Int32 size, SocketFlags socketFlags) +94
System.Net.Sockets.NetworkStream.Read(Byte[] buffer, Int32 offset, Int32 size) +130
Expand Down
2 changes: 1 addition & 1 deletion _posts/2020-01-22-links-do-not-open-google-chrome.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ The fix before was to re-install Google Chrome but today I found this quick solu

In Chrome's URL bar enter this...

```powershell
```
chrome://restart
```

Expand Down
4 changes: 2 additions & 2 deletions _posts/2020-01-28-navigate-into-newly-created-directory.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ Normally when I want to create a directory in the command line it takes multiple

For example:

```powershell
```bash
mkdir tempy
cd tempy
```

Well, that can be shortened to a one-liner!

```powershell
```bash
mkdir tempy && cd $_
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ Also, I was able to add some logging to the Windows Event Viewer Application Log

First, I created a .NET Core Worker project:

```powershell
```bash
mkdir tempy && cd $_
dotnet new worker
```

Then I added some references:

```powershell
```bash
dotnet add package Microsoft.Extensions.Hosting
dotnet add package Microsoft.Extensions.Hosting.WindowsServices
dotnet add package Microsoft.Extensions.Logging.EventLog
Expand Down Expand Up @@ -100,7 +100,7 @@ I was able to manage all of this from the command line, using the [SC tool](http

Publish:

```powershell
```bash
cd C:\PathToSource\
dotnet publish -r win-x64 -c Release -o C:\PathToDestination
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ In this post, I’ll address a common issue many developers face when working wi

When connecting to MySQL via the terminal using `mysql -u root`, you might encounter the following error messages:

```powershell
```bash
ERROR 2006 (HY000): MySQL server has gone away
No connection. Trying to reconnect...
ERROR 2013 (HY000): Lost connection to MySQL server at 'reading initial communication packet', system error: 102
Expand All @@ -40,7 +40,7 @@ This error typically occurs due to:

One of the simplest troubleshooting steps is to restart the MySQL service. This can resolve many transient issues.

```powershell
```bash
sudo killall mysqld
mysql.server start
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ The library is [Nerdbank.GitVersioning](https://github.com/AArnott/Nerdbank.GitV

The error?

```powershell
```bash
The "Nerdbank.GitVersioning.Tasks.GetBuildVersion" task could not be loaded from the assembly

Assembly with same name is already loaded Confirm that the <UsingTask> declaration is correct, that the assembly and all its dependencies are available, and that the task contains a public class that implements Microsoft.Build.Framework.ITask
Expand All @@ -24,7 +24,7 @@ Assembly with same name is already loaded Confirm that the <UsingTask> declarati
And the fix was to run the following command, thanks to [this issue](https://github.com/AArnott/Nerdbank.GitVersioning/issues/374) over on GitHub


```powershell
```bash
dotnet build-server shutdown
nbgv install
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ A static HTML website I look after is hosted on a Windows Server 2012R2 instance

Today it kept crashing with the thousands of these events in event viewer:

```powershell
```text
Event code: 3008
Event message: A configuration error has occurred.
Event time: 05/03/2020 09:15:49
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@ So naturally, when I develop locally I want to visit <https://www.localhost:5001

Now you can do this out of the box you just need to add this to your hosts file.

```powershell
```bash
#macos / linux
cat /etc/hosts

127.0.0.1 www.localhost
127.0.0.1 customer1.localhost
```

```powershell
#windows
type C:\Windows\System32\drivers\etc\hosts

Expand All @@ -45,7 +47,7 @@ The answer is to use some software called [mkcert](https://github.com/FiloSottil

**First install mkcert**

```powershell
```bash
#macOS
brew install mkcert
brew install nss # if you use Firefox
Expand All @@ -60,7 +62,9 @@ sudo pacman -S nss
sudo zypper install mozilla-nss-tools

brew install mkcert
```

```powershell
#windows
choco install mkcert
scoop bucket add extras
Expand All @@ -69,7 +73,7 @@ scoop install mkcert

**Then create a new local certificate authority.**

```powershell
```bash
mkcert -install
Using the local CA at "/Users/solrevdev/Library/Application Support/mkcert" ✨
The local CA is already installed in the system trust store! 👍
Expand All @@ -80,7 +84,7 @@ The local CA is now installed in the Firefox trust store (requires browser resta

**Now create your certificate covering the subdomains you want to use**

```powershell
```bash
#navigate to your website root
cd src/web/
#remove any earlier failed attempts!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ However, on installing it, the next request to the website showed a 503 Service

Debugging the w3 process in Visual Studio showed this error:

```powershell
```text
Unhandled exception at 0x53226EE9 (aspnetcorev2.dll) in w3wp.exe: 0xC000001D: Illegal Instruction.
```

Expand Down
Loading