﻿<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel><title>David Yardy PE</title>
<description>Mobile and Web Solutions</description>
<generator>Miniblog.Core</generator>
<link>https://www.davidyardy.com/</link>
<item>
  <title>Permissions for .pem are too open</title>
  <link>https://www.davidyardy.com/blog/permissions-for-pem-are-too-open/</link>
  <description>&lt;p&gt;Connecting to newly created Azure VM via SSH came across the error surrounding permissions on my pem file &lt;/p&gt;
&lt;p&gt;PS c:\&amp;gt;ssh &amp;ndash;i {pathtopemfile}.pem &lt;a&gt;mailto:azureuser@{ipaddress&lt;/a&gt;}&lt;/p&gt;
&lt;p&gt;@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ &lt;br /&gt; @&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; WARNING: UNPROTECTED PRIVATE KEY FILE!&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; @ &lt;br /&gt; @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@&lt;/p&gt;
&lt;p&gt;Permissions for '{filename}.pem' are too open. &lt;br /&gt; It is required that your private key files are NOT accessible by others. &lt;br /&gt; This private key will be ignored.&lt;/p&gt;
&lt;p&gt;You locate the file in Windows Explorer, right-click on it then select "Properties". Navigate to the "Security" tab and click "Advanced".&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;a) Change the owner to you&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;b) Disable inheritance and delete all permissions&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;c) Then grant yourself "Full control"&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;and save the permissions. &lt;br /&gt; &lt;br /&gt;Now SSH won't complain about file permission too open anymore.&amp;nbsp; It should look like the following&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.davidyardy.com/Posts/files/image_637410573793339622.png"&gt;&lt;img style="display: inline;" title="image" src="https://www.davidyardy.com/Posts/files/image_thumb_637410573794423074.png" alt="image" width="327" height="222" /&gt;&lt;/a&gt;&lt;/p&gt;</description>
  <author>test@example.com</author>
  <category>azure</category>
  <category>linux</category>
  <guid isPermaLink="false">https://www.davidyardy.com/blog/permissions-for-pem-are-too-open/</guid>
  <pubDate>Sun, 15 Nov 2020 17:16:19 GMT</pubDate>
</item>
<item>
  <title>Rename SQL Server Schema</title>
  <link>https://www.davidyardy.com/blog/rename-sql-server-schema/</link>
  <description>&lt;p&gt;After copying a SQL Server database I needed to create a new schema and transfer all tables and views and stored procedures from the old schema to the newly created schema.&amp;nbsp; Using the following script made this task much easier.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;DECLARE @OldSchema AS varchar(255)
DECLARE @NewSchema AS varchar(255)

SET @OldSchema = 'dbo'
SET @NewSchema = 'StackOverflow'

DECLARE @sql AS varchar(MAX)

DECLARE @Schema AS varchar(MAX)
DECLARE @Obj AS varchar(MAX)

-- First transfer Tables and Views

DECLARE CU_OBJS CURSOR FOR
    SELECT TABLE_SCHEMA, TABLE_NAME
    FROM INFORMATION_SCHEMA.TABLES
    WHERE TABLE_SCHEMA = @OldSchema

OPEN CU_OBJS

FETCH NEXT FROM CU_OBJS
INTO @Schema, @Obj

WHILE @@FETCH_STATUS = 0
BEGIN
    SELECT @sql = 'ALTER SCHEMA [' + @NewSchema + '] TRANSFER [' + @OldSchema + '].[' + @Obj + ']'
    PRINT @sql
--  EXEC (@sql)

    FETCH NEXT FROM CU_OBJS
    INTO @Schema, @Obj
END

CLOSE CU_OBJS
DEALLOCATE CU_OBJS


-- Now transfer Stored Procedures

DECLARE CU_OBJS CURSOR FOR
    SELECT sys.schemas.name, sys.procedures.name
    FROM sys.procedures,sys.schemas
    WHERE sys.procedures.schema_id=sys.schemas.schema_id and sys.schemas.name = @OldSchema

OPEN CU_OBJS

FETCH NEXT FROM CU_OBJS
INTO @Schema, @Obj&lt;/code&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;code&gt;&lt;/code&gt;&lt;/pre&gt;</description>
  <author>test@example.com</author>
  <category>sql</category>
  <guid isPermaLink="false">https://www.davidyardy.com/blog/rename-sql-server-schema/</guid>
  <pubDate>Tue, 13 Oct 2020 13:50:59 GMT</pubDate>
</item>
<item>
  <title>Azure AppService HTTP Error 500.30 ANCM In-Process Start Failure</title>
  <link>https://www.davidyardy.com/blog/azure-appservice-http-error-50030-ancm-in-process-start-failure/</link>
  <description>&lt;p&gt;Again, up against the 500.30 &amp;ndash;&amp;gt; really means that something is wrong (usually configuration, appsettings incorrect etc.) which prevents the application from starting up.&lt;/p&gt;
&lt;p&gt;Todays, resolution&amp;hellip;&lt;/p&gt;
&lt;p&gt;- Launch Kudu from the Azure Portal (under Advanced Tools)&lt;/p&gt;
&lt;p&gt;- Use Debug console &amp;ndash; CMD&lt;/p&gt;
&lt;p&gt;- Use command prompt DOS commands to navigate to \site\wwwroot&lt;/p&gt;
&lt;p&gt;- Try starting the application via dotnet web.dll &lt;em&gt;(the name of your web application dll)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;- &lt;/em&gt;With any luck, the output will show log errors and with some thought you can decipher what configuration piece is missing (in this case, my connection string was incorrect and I was missing App_Data directory)&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;HTTP Error 500.30 - ANCM In-Process Start Failure&lt;br /&gt;&lt;br /&gt;Common solutions to this issue:&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;The application failed to start&lt;/li&gt;
&lt;li&gt;The application started but then stopped&lt;/li&gt;
&lt;li&gt;The application started but threw an exception during startup&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Troubleshooting steps:&lt;br /&gt;&lt;br /&gt;&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;Check the system event log for error messages&lt;/li&gt;
&lt;li&gt;Enable logging the application process' stdout messages&lt;/li&gt;
&lt;li&gt;Attach a debugger to the application process and inspect&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;a href="https://www.davidyardy.com/Posts/files/image_637348425926534448.png"&gt;&lt;img style="display: inline;" title="image" src="https://www.davidyardy.com/Posts/files/image_thumb_637348425927794897.png" alt="image" width="658" height="288" /&gt;&lt;/a&gt;&lt;/p&gt;</description>
  <author>test@example.com</author>
  <category>azure</category>
  <category>.net core</category>
  <guid isPermaLink="false">https://www.davidyardy.com/blog/azure-appservice-http-error-50030-ancm-in-process-start-failure/</guid>
  <pubDate>Fri, 04 Sep 2020 18:56:32 GMT</pubDate>
</item>
<item>
  <title>Hot Module Reload (HMR) Issues</title>
  <link>https://www.davidyardy.com/blog/hot-module-reload-hmr-issues/</link>
  <description>&lt;p&gt;Using latest vue.js bit and vue-cli to create a project, I immediately came up against HMR not reloading after making changes to .vue files.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;What is HMR&amp;hellip;&lt;/p&gt;
&lt;p&gt;"&lt;strong&gt;Hot Reload&lt;/strong&gt;" is not simply reloading the page when you edit a file. With hot reload enabled, when you edit a *. vue file, all instances of that component will be swapped in without reloading the page. It even preserves the current state of your app and these swapped components!&lt;/p&gt;
&lt;p&gt;I started my project npm run serve, opened my browser &lt;a href="http://localhost:8080"&gt;http://localhost:8080&lt;/a&gt; and navigated around my new app.&amp;nbsp; Great.&amp;nbsp; Within my IDE I modified any vue file, I could see that vue-cli-server (with it&amp;rsquo;s built in web server) identified that a file had changed and I could see webpack rebuilding my ts/js files.&amp;nbsp; Great.&amp;nbsp; I looked at the browser and my simple html change was not reflected.&amp;nbsp; I could see errors in the chrome dev tools network tab like following.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;[WDS] Disconnected net:: ERR_CONNECTION_TIMED_OUT &lt;br /&gt;&lt;a title="http://192.168.1.102:8080/sockjs-node/info?t=1598645595925" href="http://192.168.1.102:8080/sockjs-node/info?t=1598645595925"&gt;http://192.168.1.102:8080/sockjs-node/info?t=1598645595925&lt;/a&gt; &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Solution&amp;hellip;.&lt;/p&gt;
&lt;p&gt;There are a number of articles regarding setting NODE_ENV=development, as well as articles discussing the vue.config.js file.&amp;nbsp; The solution for me was modifying the package.json script that is used by npm to start the project from&lt;/p&gt;
&lt;p&gt;"serve": "vue-cli-service serve",&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;To&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;"serve2": "vue-cli-service serve &lt;strong&gt;--host localhost&lt;/strong&gt;",&lt;/p&gt;
&lt;p&gt;I also tried a number of options within the vue.config.js but was able to remove once I identified the solution (above).&lt;/p&gt;
&lt;p&gt;// vue.config.js &lt;br /&gt;module.exports = { &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; devServer: { &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //host:'localhost' &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //useLocalIp: false, &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //proxy: 'http://localhost:8080', &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //public: '172.23.3.180:8080', &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //watchOptions: { &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // poll: true &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //} &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }, &lt;br /&gt;configureWebpack: { &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; plugins: [ &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //new MyAwesomeWebpackPlugin() &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ] &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } &lt;br /&gt;}&lt;/p&gt;
&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;</description>
  <author>test@example.com</author>
  <category>vue.js</category>
  <guid isPermaLink="false">https://www.davidyardy.com/blog/hot-module-reload-hmr-issues/</guid>
  <pubDate>Fri, 28 Aug 2020 20:50:38 GMT</pubDate>
</item>
<item>
  <title>DevOps–Pushing Nuget package to Azure Artifacts Repository</title>
  <link>https://www.davidyardy.com/blog/devops–pushing-nuget-package-to-azure-artifacts-repository/</link>
  <description>&lt;p&gt;What a journey!&amp;#160; I am going to document this for the sole reason that I am aware that I will once again need this information only just a few days from now.&amp;#160; Problem: I have a nuget package that I want to push to an Azure Artifact directory.&amp;#160; I figured easy enough there is some documentation and I tried with the following:&lt;/p&gt;  &lt;p&gt;nuget push -source &amp;quot;MyFeed_feed&amp;quot; -apikey az &amp;quot;C:\tfs\Git\MLayout\MLayout\MLayout\bin\Debug\Layout.1.0.0.nupkg&amp;quot;&lt;/p&gt;  &lt;p&gt;I did have to download Nuget and ensure it was found when using the above command via command prompt.&amp;#160; Once setup, and re-ran I was prompted for username and password. As many times as I tried it would just continue to fail and eventually would timeout.&amp;#160; I am sure this worked just a few weeks ago.&lt;/p&gt;  &lt;p&gt;Regardless on to plan B, documentation..&lt;/p&gt;  &lt;p&gt;&lt;a href="https://www.davidyardy.com/Posts/files/image_637275041288251465.png"&gt;&lt;img title="image" style="display: inline;" alt="image" src="https://www.davidyardy.com/Posts/files/image_thumb_637275041289689942.png" width="478" height="283" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p&gt;1) I downloaded the latest Nuget.exe&lt;/p&gt;  &lt;p&gt;2) Download and install the credential provider (this one was a bit more challenging)&lt;/p&gt;     &lt;p&gt;I figured I would use the Automatic approach.&amp;#160; &lt;/p&gt;    &lt;p&gt;     &lt;br /&gt;a) I downloaded installcredprovider.ps1 from this github location &lt;a href="https://github.com/microsoft/artifacts-credprovider/tree/master/helpers"&gt;https://github.com/microsoft/artifacts-credprovider/tree/master/helpers&lt;/a&gt; (more information can be found &lt;a href="https://github.com/microsoft/artifacts-credprovider#azure-artifacts-credential-provider" target="_blank"&gt;here&lt;/a&gt;)&lt;/p&gt;    &lt;p&gt;b) Now that I have a file on disk, I have to run it.&amp;#160; I started Powershell&amp;#160; then proceeded to run this ps1 by typing .\installcredprovider.ps1 at the PS &amp;gt;     &lt;br /&gt;      &lt;br /&gt;&lt;a href="https://www.davidyardy.com/Posts/files/image_637275041290983297.png"&gt;&lt;img title="image" style="display: inline;" alt="image" src="https://www.davidyardy.com/Posts/files/image_thumb_637275041292492033.png" width="1181" height="192" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;d) Now with this installed I retried to push my nuget package with nuget push -source &amp;quot;MyFeed_feed&amp;quot; -apikey az &amp;quot;C:\tfs\Git\MLayout\MLayout\MLayout\bin\Debug\Layout.1.0.0.nupkg&amp;quot;      &lt;br /&gt;      &lt;br /&gt;&lt;strong&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160; No go, &lt;/strong&gt;so I tried with using the vs.net command prompt.      &lt;br /&gt;      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; I opened up a command prompt from Windows-Start ensuring to pick the “Developer Command Prompt for VS 2019”      &lt;br /&gt;&amp;#160;&amp;#160;&amp;#160; &lt;a href="https://www.davidyardy.com/Posts/files/image_637275041293550042.png"&gt;&lt;img title="image" style="display: inline;" alt="image" src="https://www.davidyardy.com/Posts/files/image_thumb_637275041294681187.png" width="255" height="408" /&gt;&lt;/a&gt;&lt;/p&gt;    &lt;p&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;br /&gt;Now, I ensured that nuget.exe was available and it was! &lt;strong&gt;So I retried my nuget push&lt;/strong&gt;.&amp;#160; You can see finally, that it used the Credential Provider      &lt;br /&gt;      &lt;br /&gt;&amp;#160;&lt;a href="https://www.davidyardy.com/Posts/files/image_637275041296161377.png"&gt;&lt;img title="image" style="display: inline;" alt="image" src="https://www.davidyardy.com/Posts/files/image_thumb_637275041297564617.png" width="1049" height="162" /&gt;&lt;/a&gt;&lt;/p&gt;        &lt;p&gt;The entire process probably 1 hour of effort, but essentially using the VS.NET 2019 command prompt, download the ps1 for the credprovider, execute using powershell then retry.&amp;#160; Finally.     &lt;/p&gt;</description>
  <author>test@example.com</author>
  <category>azure</category>
  <guid isPermaLink="false">https://www.davidyardy.com/blog/devops–pushing-nuget-package-to-azure-artifacts-repository/</guid>
  <pubDate>Thu, 11 Jun 2020 20:28:49 GMT</pubDate>
</item>
<item>
  <title>Azure DevOps–File Transformation Pipeline</title>
  <link>https://www.davidyardy.com/blog/azure-devops–file-transformation-pipeline/</link>
  <description>&lt;p&gt;Running locally via Visual Studio and JetBrains Rider and managing the ASPNETCORE_ENVIRONMENT variable has been challenging.&amp;nbsp; Changing and setting ASPNETCORE_ENVIRONMENT within launchSettings.json and/or within Project Properties impacts the web.{envrionment}.config files.&amp;nbsp; Without the appropriate configuration within the publish steps the site was being deployed with incorrect settings and it was time consuming to track it back to the best approach.&amp;nbsp; So for now I have a pipeline build process setup for each AppService &amp;lsquo;slot&amp;rsquo; setting different BuildConfiguration within each to ensure the most appropriate web.config is deployed. &lt;br /&gt; &lt;br /&gt;This is a .net core asp.net web application so why the web.config? It appears that locally during IIS Express/IIS there is still a dependency on this web.config to identify the hosting model (inprocess) and reference to the exe that would be run.&amp;nbsp; This is of course when deploying to Windows infrastructure. &lt;/p&gt;
&lt;p&gt;Project Properties &amp;ndash; Environment variables &lt;br /&gt; &lt;br /&gt;&lt;a href="https://www.davidyardy.com/Posts/files/image_637262774405512580.png"&gt;&lt;img style="display: inline;" title="image" src="https://www.davidyardy.com/Posts/files/image_thumb_637262774407471496.png" alt="image" width="457" height="345" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;My launchSettings.json &amp;ndash; you can see I can modify before running how IIS or IIS Express identifies the environment variable&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.davidyardy.com/Posts/files/image_637262774409386358.png"&gt;&lt;img style="display: inline;" title="image" src="https://www.davidyardy.com/Posts/files/image_thumb_637262774411646559.png" alt="image" width="463" height="415" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;The resultant/related web.configs looks like the following for Development and Staging environments.&lt;/p&gt;
&lt;p&gt;web.config &lt;br /&gt;&lt;a href="https://www.davidyardy.com/Posts/files/image_637262774414383837.png"&gt;&lt;img style="display: inline;" title="image" src="https://www.davidyardy.com/Posts/files/image_thumb_637262774416208149.png" alt="image" width="484" height="113" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;web.Staging.config (you can see the addition of the xdt:Transform=&amp;rdquo;Replace&amp;rdquo; attribute which informs publish that when building for Staging to replace this variable within web.config with this value) &lt;br /&gt;&lt;a href="https://www.davidyardy.com/Posts/files/image_637262774419133421.png"&gt;&lt;img style="display: inline;" title="image" src="https://www.davidyardy.com/Posts/files/image_thumb_637262774421036401.png" alt="image" width="484" height="117" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;By default the build process on Azure DevOps &amp;ndash; Pipelines was ignoring any file transformation requirements.&amp;nbsp; In order to establish File Transformation on publish notice the &amp;ndash;configuration $(BuildConfiguration) &lt;br /&gt;&lt;a href="https://www.davidyardy.com/Posts/files/image_637262774423325714.png"&gt;&lt;img style="display: inline;" title="image" src="https://www.davidyardy.com/Posts/files/image_thumb_637262774425301819.png" alt="image" width="661" height="295" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;and the respective variable that is used during publish to identify the appropriate configuration to use (development/staging etc.) &lt;br /&gt;&lt;a href="https://www.davidyardy.com/Posts/files/image_637262774427383207.png"&gt;&lt;img style="display: inline;" title="image" src="https://www.davidyardy.com/Posts/files/image_thumb_637262774428896829.png" alt="image" width="702" height="164" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;After the build and using App Service Editor my web.config was successfully transformed&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.davidyardy.com/Posts/files/image_637262774431201007.png"&gt;&lt;img style="display: inline;" title="image" src="https://www.davidyardy.com/Posts/files/image_thumb_637262774433117797.png" alt="image" width="700" height="190" /&gt;&lt;/a&gt;&lt;/p&gt;</description>
  <author>test@example.com</author>
  <category>azure</category>
  <guid isPermaLink="false">https://www.davidyardy.com/blog/azure-devops–file-transformation-pipeline/</guid>
  <pubDate>Thu, 28 May 2020 15:44:03 GMT</pubDate>
</item>
<item>
  <title>Path to Resources (JavaScript, Images etc.) Not Found with Vue.js Build</title>
  <link>https://www.davidyardy.com/blog/path-to-resources-javascript-images-etc-not-found-with-vuejs-build/</link>
  <description>&lt;p&gt;Using @vue/cli 4.3.1&lt;/p&gt;
&lt;p&gt;With minimal changes to code/solution I found that resources (path to files) was not found after performing npm run build.&amp;nbsp; I was hoping to just run the newly built web application in the client side browser from File Explorer.&amp;nbsp; I ran the page and saw an empty screen.&amp;nbsp; So what was the issue and resolution?&lt;/p&gt;
&lt;p&gt;The issue (visible within the screen capture &amp;ndash; white screen and ERR_FILE_NOT_FOUND error message from the Chrome Debugger &amp;ndash; Network Tools)&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.davidyardy.com/Posts/files/image_637255046941289166.png"&gt;&lt;img style="display: inline;" title="image" src="https://www.davidyardy.com/Posts/files/image_thumb_637255046943290619.png" alt="image" width="1124" height="286" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Doing a view source the problem started to surface.&amp;nbsp; You can see below the path was relative to the root directory.&amp;nbsp; While running from File Explorer this must be relative path.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&amp;lt; !DOCTYPE html&amp;gt; &lt;br /&gt;&amp;lt; html lang="en"&amp;gt; &lt;br /&gt;&amp;nbsp; &amp;lt;head&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;meta charset="utf-8"&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;meta name="viewport" content="width=device-width,initial-scale=1.0"&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;link rel="icon" href="/favicon.ico"&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;title&amp;gt;Cargo&amp;lt;/title&amp;gt; &lt;br /&gt;&amp;nbsp; &amp;lt;link href="/js/cargo.js" rel="preload" as="script"&amp;gt;&amp;lt;link href&lt;strong&gt;="/js/chunk-common&lt;/strong&gt;.js" rel="preload" as="script"&amp;gt;&amp;lt;link href="/js/chunk-vendors.js" rel="preload" as="script"&amp;gt;&amp;lt;/head&amp;gt; &lt;br /&gt;&amp;nbsp; &amp;lt;body&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt; noscript&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;strong&amp;gt;We're sorry but Cargo doesn't work properly without JavaScript enabled. Please enable it to continue.&amp;lt;/strong&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/noscript&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;div id="app"&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;!-- built files will be auto injected --&amp;gt; &lt;br /&gt;&amp;nbsp; &amp;lt;script type="text/javascript" src="/js/chunk-vendors.js"&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;script type="text/javascript" src="/js/chunk-common.js"&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;script type="text/javascript" src="/js/cargo.js"&amp;gt;&amp;lt;/script&amp;gt;&amp;lt;/body&amp;gt; &lt;br /&gt;&amp;lt; /html&amp;gt;&lt;/p&gt;
&lt;p&gt;The &lt;strong&gt;resolution&lt;/strong&gt; while difficult to find, was easy to implement.&amp;nbsp; Opening up my vue.config.js I simply referenced the publicPath with a vlaue of&amp;nbsp; &lt;strong&gt;publicPath: './'&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.davidyardy.com/Posts/files/image_637255046945239780.png"&gt;&lt;img style="display: inline;" title="image" src="https://www.davidyardy.com/Posts/files/image_thumb_637255046947319889.png" alt="image" width="567" height="375" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Finding the &lt;a href="https://cli.vuejs.org/config/#vue-config-js" target="_blank" rel="noopener"&gt;documentation&lt;/a&gt;, the default value is &amp;lsquo;/&amp;rsquo; which is what I was finding.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;The base URL your application bundle will be deployed at (known as baseUrl before Vue CLI 3.3). &lt;strong&gt;This is the equivalent of webpack's output.publicPath, but Vue CLI also needs this value for other purposes, so you should always use publicPath instead of modifying webpack output.publicPath.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;By default, Vue CLI assumes your app will be deployed at the root of a domain, e.g. https://www.my-app.com/. If your app is deployed at a sub-path, you will need to specify that sub-path using this option. For example, if your app is deployed at https://www.foobar.com/my-app/, set publicPath to '/my-app/'.&lt;/p&gt;
&lt;p&gt;The value can also be set to an empty string ('') or a relative path (./) so that all assets are linked using relative paths. This allows the built bundle to be deployed under any public path, or used in a file system based environment like a Cordova hybrid app.&lt;/p&gt;</description>
  <author>test@example.com</author>
  <category>vue.js</category>
  <guid isPermaLink="false">https://www.davidyardy.com/blog/path-to-resources-javascript-images-etc-not-found-with-vuejs-build/</guid>
  <pubDate>Tue, 19 May 2020 17:04:54 GMT</pubDate>
</item>
<item>
  <title>Vue CLI Creating a Project–Issue with Hot Reload</title>
  <link>https://www.davidyardy.com/blog/vue-cli-creating-a-project–issue-with-hot-reload/</link>
  <description>&lt;p&gt;I noticed today after creating a new vue project via “vue create new-app” that hot reload was not working while modifying html within App.vue.&amp;#160; How can this be, it is brand new app on the latest bits.&amp;#160; Following the instructions on &lt;a href="https://cli.vuejs.org/guide/creating-a-project.html" target="_blank"&gt;cli.vuejs.org&lt;/a&gt; it states that vue-clie-service starts webpack-dev-server out of the box     &lt;br /&gt;    &lt;br /&gt;”The &lt;code&gt;vue-cli-service serve&lt;/code&gt; command starts a dev server (based on &lt;a href="https://github.com/webpack/webpack-dev-server"&gt;webpack-dev-server&lt;/a&gt;) that comes with Hot-Module-Replacement (HMR) working out of the box.”&lt;/p&gt;  &lt;p&gt;Why.&amp;#160; Brand new project, with the latest bits and it still did not work.&amp;#160; &lt;/p&gt;  &lt;p&gt;I found 2 solutions.&amp;#160; The first fix was for me, was to add a vue.config.js file to the root directory (alongside the package.json) and add the following devServer property&lt;/p&gt;  &lt;pre&gt;devServer: {       &lt;br /&gt;   useLocalIp: false,&lt;br /&gt;   proxy: 'http://localhost:8080',&lt;br /&gt;   public: '172.23.3.180:8080'       &lt;br /&gt;}&lt;/pre&gt;

&lt;p&gt;Note: the public ip address that I used here was from “IPv4 Address” after performing ipconfig in a command prompt. So documenting here will help me find/resolve this next week when this comes up again. But why, and why was it so difficult to find this resolution? &lt;/p&gt;

&lt;p&gt;The second solution which &lt;strong&gt;I liked better &lt;/strong&gt;(and seems faster) was as-follows.&amp;#160; Again, a modification to the vue.config.js and also adding a new ‘script’ to package.json&lt;/p&gt;

&lt;pre&gt;configureWebpack: {&lt;br /&gt;   devServer: {&lt;br /&gt;      watchOptions: {&lt;br /&gt;         poll: true&lt;br /&gt;      }&lt;br /&gt;   }&lt;br /&gt;}&lt;/pre&gt;

&lt;p&gt;The script within package.json.&amp;#160;&amp;#160; Here you can see I am setting environment NODE_ENV to development using the &lt;a href="https://www.npmjs.com/package/cross-env#installation" target="_blank"&gt;cross-env&lt;/a&gt; npm package (I had to install via npm installl –save-dev cross-env) 

  &lt;br /&gt;&lt;/p&gt;

&lt;pre&gt;&amp;quot;dev&amp;quot;: &amp;quot;cross-env NODE_ENV=development vue-cli-service serve --open --host localhost&amp;quot;,&lt;/pre&gt;</description>
  <author>test@example.com</author>
  <category>vue.js</category>
  <guid isPermaLink="false">https://www.davidyardy.com/blog/vue-cli-creating-a-project–issue-with-hot-reload/</guid>
  <pubDate>Mon, 18 May 2020 21:10:10 GMT</pubDate>
</item>
<item>
  <title>WindowsCryptographicException: The system cannot find the file specified.</title>
  <link>https://www.davidyardy.com/blog/windowscryptographicexception-the-system-cannot-find-the-file-specified/</link>
  <description>&lt;p&gt;Azure &amp;ndash; while trying to read pfx (certificate) from disk I came across a number of issues, but thought this might help some out.&lt;/p&gt;
&lt;p&gt;The fix was adding the final parameter X509KeyStorageFlags&lt;/p&gt;
&lt;p&gt;var cert = new X509Certificate2($"{Environment.ContentRootPath}/App_Data/mycert.pfx", "{password}", &lt;strong&gt;X509KeyStorageFlags.MachineKeySet&lt;/strong&gt;);&lt;/p&gt;
&lt;p&gt;&lt;br /&gt; &lt;br /&gt;Other references: &lt;br /&gt;&lt;a href="https://support.microsoft.com/en-us/help/950090/installing-a-pfx-file-using-x509certificate-from-a-standard-net-applic"&gt;https://support.microsoft.com/en-us/help/950090/installing-a-pfx-file-using-x509certificate-from-a-standard-net-applic&lt;/a&gt; &lt;br /&gt;&lt;a href="https://stackoverflow.com/questions/52750160/what-is-the-rationale-for-all-the-different-x509keystorageflags"&gt;https://stackoverflow.com/questions/52750160/what-is-the-rationale-for-all-the-different-x509keystorageflags&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;An unhandled exception occurred while processing the request. &lt;br /&gt;WindowsCryptographicException: The system cannot find the file specified. &lt;br /&gt; System.Security.Cryptography.CngKey.Open(string keyName, CngProvider provider, CngKeyOpenOptions openOptions)&lt;/p&gt;
&lt;p&gt;Exception: An error was encountered while handling the remote login. &lt;br /&gt; Microsoft.AspNetCore.Authentication.RemoteAuthenticationHandler&amp;lt;TOptions&amp;gt;.HandleRequestAsync()&lt;/p&gt;
&lt;p&gt;Stack Query Cookies Headers Routing &lt;br /&gt;WindowsCryptographicException: The system cannot find the file specified. &lt;br /&gt; System.Security.Cryptography.CngKey.Open(string keyName, CngProvider provider, CngKeyOpenOptions openOptions) &lt;br /&gt; System.Security.Cryptography.CngKey.Open(string keyName, CngProvider provider) &lt;br /&gt; Internal.Cryptography.Pal.CertificatePal.GetPrivateKey&amp;lt;T&amp;gt;(Func&amp;lt;CspParameters, T&amp;gt; createCsp, Func&amp;lt;CngKey, T&amp;gt; createCng) &lt;br /&gt; Internal.Cryptography.Pal.CertificatePal.GetRSAPrivateKey() &lt;br /&gt; System.Security.Cryptography.X509Certificates.X509Certificate2.get_PrivateKey() &lt;br /&gt; Microsoft.IdentityModel.Tokens.X509SecurityKey.get_PrivateKey() &lt;br /&gt; Microsoft.IdentityModel.Tokens.X509SecurityKey.get_PrivateKeyStatus() &lt;br /&gt; Microsoft.IdentityModel.Tokens.AsymmetricSignatureProvider.FoundPrivateKey(SecurityKey key) &lt;br /&gt; Microsoft.IdentityModel.Tokens.AsymmetricSignatureProvider..ctor(SecurityKey key, string algorithm, bool willCreateSignatures) &lt;br /&gt; Microsoft.IdentityModel.Tokens.AsymmetricSignatureProvider..ctor(SecurityKey key, string algorithm, bool willCreateSignatures, CryptoProviderFactory cryptoProviderFactory) &lt;br /&gt; Microsoft.IdentityModel.Tokens.CryptoProviderFactory.CreateSignatureProvider(SecurityKey key, string algorithm, bool willCreateSignatures) &lt;br /&gt; Microsoft.IdentityModel.Tokens.CryptoProviderFactory.CreateForSigning(SecurityKey key, string algorithm) &lt;br /&gt; Microsoft.IdentityModel.JsonWebTokens.JwtTokenUtilities.CreateEncodedSignature(string input, SigningCredentials signingCredentials) &lt;br /&gt; System.IdentityModel.Tokens.Jwt.JwtSecurityTokenHandler.WriteToken(SecurityToken token) &lt;br /&gt; Sample.Idp.Startup+&amp;lt;&amp;gt;c__DisplayClass7_0.&amp;lt;ConfigureServices&amp;gt;b__8(AuthorizationCodeReceivedContext context) in Startup.cs &lt;br /&gt; Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectEvents.AuthorizationCodeReceived(AuthorizationCodeReceivedContext context) &lt;br /&gt; Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.RunAuthorizationCodeReceivedEventAsync(OpenIdConnectMessage authorizationResponse, ClaimsPrincipal user, AuthenticationProperties properties, JwtSecurityToken jwt) &lt;br /&gt; Microsoft.AspNetCore.Authentication.OpenIdConnect.OpenIdConnectHandler.HandleRemoteAuthenticateAsync()&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.davidyardy.com/Posts/files/image_637245590895788914.png"&gt;&lt;img style="border: 0px currentcolor; display: inline; background-image: none;" title="image" src="https://www.davidyardy.com/Posts/files/image_thumb_637245590899400228.png" alt="image" width="551" height="629" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;</description>
  <author>test@example.com</author>
  <category>azure</category>
  <guid isPermaLink="false">https://www.davidyardy.com/blog/windowscryptographicexception-the-system-cannot-find-the-file-specified/</guid>
  <pubDate>Fri, 08 May 2020 18:24:50 GMT</pubDate>
</item>
<item>
  <title>Synchronous operations are disallowed. Call ReadAsync or set AllowSynchronousIO to true instead.</title>
  <link>https://www.davidyardy.com/blog/synchronous-operations-are-disallowed-call-readasync-or-set-allowsynchronousio-to-true-instead/</link>
  <description>&lt;p&gt;Using JetBrains Rider using IIS Express to run asp.net core 3.1 web application, my httpcontext was null and had issues getting request bodies etc.&amp;nbsp; The exception message was&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Synchronous operations are disallowed. Call ReadAsync or set AllowSynchronousIO to true instead.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;I could run the application with Visual Studio 2019 without any issue (on IIS Express), definitely confusing.&lt;/p&gt;
&lt;p&gt;The issue was related to the following..&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/dotnet/aspnetcore/issues/8302"&gt;https://github.com/dotnet/aspnetcore/issues/8302&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/dotnet/aspnetcore/issues/7644"&gt;https://github.com/dotnet/aspnetcore/issues/7644&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;The solution&amp;hellip; &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&lt;span style="font-family: Calibri;"&gt;public void ConfigureServices(IServiceCollection services)
{
   &lt;strong&gt; // If using Kestrel:
    services.Configure&amp;lt;KestrelServerOptions&amp;gt;(options =&amp;gt;
    {
        options.AllowSynchronousIO = true;
    });&lt;/strong&gt;

    // If using IIS:
    services.Configure&amp;lt;IISServerOptions&amp;gt;(options =&amp;gt;
    {
        options.AllowSynchronousIO = true;
    });
}&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;</description>
  <author>test@example.com</author>
  <category>jetbrains</category>
  <guid isPermaLink="false">https://www.davidyardy.com/blog/synchronous-operations-are-disallowed-call-readasync-or-set-allowsynchronousio-to-true-instead/</guid>
  <pubDate>Wed, 22 Apr 2020 18:48:09 GMT</pubDate>
</item></channel>
</rss>