Thursday, 27 May 2021

Windows - long file paths

Windows Home

https://www.howtogeek.com/266621/how-to-make-windows-10-accept-file-paths-over-260-characters/


  • Open regedit

  • go to   HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
  • On the right, find a value named LongPathsEnabled and double-click it. If you don’t see the value listed, you’ll need to create it by right-clicking the FileSystem key, choosing New > DWORD (32-bit) Value, and then naming the new value LongPathsEnabled .

  • In the value’s properties window, change the value from 0 to 1 in the “Value data” box and then click OK.

Windows Pro/ Enterprise

Open the Group Policy Editor by going to the Start menu and typing in gpeditOnce the Group Policy Editor opens, navigate to Computer Configuration > Administrative Templates > System > Filesystem. There you’ll see the policy Enable Win32 long paths.




Tuesday, 25 May 2021

git pull hang?

 remove unnecessary git objects such as dangling commits & blobs:

git fsck && git gc --prune=now

Thursday, 13 May 2021

https://dotnetgenetics.blogspot.com/2013/03/iorderedqueryable-extension-method-c.html

Extension method on IQueryable class

  public static class IQueryableExtensions

    {

        public static IQueryable<TSource> GetPagedData<TSource>(this IQueryable<TSource> query, int pageNumber, int pageSize)

        {

            return query.Skip((pageNumber - 1) * pageSize).Take(pageSize);

        }

    }

To Use

   var query = _appDbContext.<dbSetName>.

                .OrderBy(p => p.<col_name>).GetPagedData(pageNumber, pageSize);



Wednesday, 12 May 2021

Jenkins - .net Core app

  1. Install Jenkins
  2. Go to Dashboard -> New Item (for configuring new project)
  3. Go to Dashboard -> Edit Item (for changing existing project configuration)
  4. click on "Source Code Management" tab, set scm details
  5. Go to "Build' tab. 
  6. Add Build step -> Execute Windows Batch command
      • cd E:\Nagesh\github\todo\myApp.web
        • e:
          • dotnet publish -c debug -o C:\inetpub\wwwroot\myapp 

        .Net Core Support

        https://dotnet.microsoft.com/download/dotnet

        Supported versions

        Versions of .NET Core available for download

        Version Status Latest release Latest release date End of support

        .NET 6.0 Preview 6.0.0-preview.3 April 08, 2021

        .NET 5.0 (recommended) Current 5.0.6 May 11, 2021

        .NET Core 3.1 LTS 3.1.15 May 11, 2021 December 03, 2022

        .NET Core 2.1 LTS 2.1.28 May 11, 2021 August 21, 2021


        Out of support versions

        The following releases have reached end of life, meaning they're no longer supported. We recommend moving to a supported release.

        Version Latest release Latest release date End of support

        .NET Core 3.0 3.0.3 February 18, 2020 March 03, 2020

        .NET Core 2.2 2.2.8 November 19, 2019 December 23, 2019

        .NET Core 2.0 2.0.9 July 10, 2018 October 01, 2018

        .NET Core 1.1 1.1.13 May 14, 2019 June 27, 2019

        .NET Core 1.0 1.0.16 May 14, 2019 June 27, 2019

        .Net Framework support

        https://dotnet.microsoft.com/download/dotnet-framework

        Supported versions

        Version Release date End of support

        .NET Framework 4.8 (recommended) April 18, 2019

        .NET Framework 4.7.2 April 30, 2018

        .NET Framework 4.7.1 October 17, 2017

        .NET Framework 4.7 April 05, 2017

        .NET Framework 4.6.2 August 02, 2016

        .NET Framework 4.6.1 November 30, 2015 April 26, 2022

        .NET Framework 4.6 July 20, 2015 April 26, 2022

        .NET Framework 4.5.2 May 05, 2014 April 26, 2022

        .NET Framework 3.5 SP1 November 18, 2008 October 10, 2028


        Out of support versions

        The following releases have reached end of life, meaning they're no longer supported. We recommend moving to a supported release.


        Version Release date End of support

        .NET Framework 4.5.1 October 17, 2013 January 12, 2016

        .NET Framework 4.5 August 15, 2012 January 12, 2016

        .NET Framework 4.0 April 12, 2010   January 12, 2016

        Deploying in IIS

         Asp.net MVC

        • depend on .net framework version. Register IIS using below command
          • %windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis -u
          • %windir%\Microsoft.NET\Framework\v4.0.30319\aspnet_regiis -i

          • Reset IIS
          • if you are getting something related to server not reachable or could not able to reach
            • check for web site bindings 
            • if same port has been assigned to some other site then this could cause unexpected behavior
            • Try stopping all other site even the default one and only keep the one started which you are trying to deploy
          • 404 (check developer tools network tab) - if you are getting 404 that means server is reachable the route is incorrect or is not defined in your web app
          • 500 (check developer tools network tab)  - if you are getting 500 that means some error from application. Check application log for more details
          • Check website physical path security settings. It should have appropriate rights such as 
            • IIS_IUSRS

           Asp.net Core
          • Reset IIS
          • check IIS binding
          • physical path security

          Thursday, 6 May 2021

          Changing repository from TFS to Git

          1. Create empty git repo

          2. Add .gitignore with all required values

          3. Copy source code with all folders

          4. Run git add .

          5. Check git status to see if only relevant files are added and unwanted files are ignored

          6. git push

          Search This Blog

          Creating your first "Alexa" Skill

          Index What is Alexa What is Alexa Skill? Why is it required when Alexa already equipped with voice assistant? Dev...