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 5.0 – Windows Server 2008 R2 Standard – Unable to load ‘D:\Websites\VBV\.\hostfxr.dll’. This might be caused by a bitness mismatch between IIS application pool and published application.

0 Comments

  Solution By default the application was created with “Enable 32-Bit Applications” set to true. After changing this to “false”, the error was resolved.     Error Failed to start application ‘/LM/W3SVC/3/ROOT’, ErrorCode ‘0x800700c1’. Could

.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 2.2 => NET 5 – Fix – The call is ambiguous between the following methods or properties: ‘ServiceCollectionExtensions.AddAutoMapper(IServiceCollection, params Assembly[])’ and ‘ServiceCollectionExtensions.AddAutoMapper(IServiceCollection, params Type[])’

0 Comments

  To fix this error I followed: https://www.thecodebuzz.com/configure-automapper-asp-net-core-profile-map-object/   services.AddAutoMapper(typeof(Startup).Assembly);

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?)