Custom IHttpHandler 404 not found in .NET Framework 4.7.2

0 Comments

  When you add a custom IHttpHandler to your ASP .NET Framework 4.7.2 project in a root folder like /Handlers/MyHandler.ashx and you access the url /Handlers/MyHandler.ashx, this handler will be executed, But if you want…

.NET 4.7.3 How to fix: The CodeDom provider type “Microsoft.VisualC.CppCodeProvider, CppCodeProvider, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a” could not be located.

0 Comments

  Solution Close Visual Studio 2019 Remove package.lock.json Execute: npm i Open Visual Studio 2019 Rebuild project       Error The CodeDom provider type "Microsoft.VisualC.CppCodeProvider, CppCodeProvider, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" could not be located. File:…

PowerShell – Negate boolean – use -Not

0 Comments

  https://stackoverflow.com/questions/8095638/how-do-i-negate-a-condition-in-powershell     function FolderExists {     param($folder)       $folderExists = Test-Path "$($folder)"     If ($folderExists -eq $True) {         Write-Host "Folder [$($folder)] exists."     } Else {         Write-Host "Folder [$($folder)] does NOT exist."     }     return $folderExists }   if(-Not (FolderExists -folder "C:\ThisFolderDoesNotExistOnThisSystem")) {     Write-Host "Folder does not exists!!!!!" < p style="background: #1e1e1e">}        

.NET 2.2 => NET 5.0 – Endpoint Routing does not support ‘IApplicationBuilder.UseMvc(…)

0 Comments

  Solution   Use "endpoint" routing Old app.ConfigureExceptionHandler(loggerFactory); app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseSpaStaticFiles(); app.UseAuthentication(); app.UseCors("CorsPolicy"); app.UseMvc(routes => { routes.MapRoute( name: "default", template: "{controller}/{action=Index}/{id?}"); });   New   app.ConfigureExceptionHandler(loggerFactory); app.UseHttpsRedirection(); app.UseStaticFiles(); app.UseSpaStaticFiles(); app.UseRouting(); app.UseCors("CorsPolicy"); app.UseAuthentication(); app.UseEndpoints(endpoints => {…

NET 5 – Fix – ‘IConfigurationSection’ does not contain a definition for ‘Get’ and no accessible extension method ‘Get’ accepting a first argument of type ‘IConfigurationSection’ could be found (are you missing a using directive or an assembly reference?)

0 Comments

  'IConfigurationSection' does not contain a definition for 'Get' and no accessible extension method 'Get' accepting a first argument of type 'IConfigurationSection' could be found (are you missing a using directive or an assembly reference?)…

Tags

Archive