Posts

Step by step migration of ASP.NET Core 2.2 to 3.1

In order to upgrade/migrate asp.net core version to 3.1 following steps to be perform.
Download and install Visual Studio 2019 version 16.4 or higher.Download and install .NET Core 3.1  https://dotnet.microsoft.com/download/dotnet-core/3.1Upgrade the projects of solution to .NET Core 3.1 , because ASP.NET Core 3.1 requires it.Update existing Nuget packages to a version compatible with ASP.NET Core 3.1 in each projectUse IHost interface from a IHostBuilder instead of building and running a IWebHost from a IWebHostBuilder in Program.cs public static IHostBuilder CreateWebHostBuilder(string[] args) => Host.CreateDefaultBuilder(args) .ConfigureWebHostDefaults(webBuilder => { webBuilder.UseKestrel() .UseSerilog() .UseStartup<Startup>(); }) Change AddMvc method has been replaced by AddControllers in Startup.cs of each projects.In Startup.cs,UseMvc method to be replaced by…

Getting Started Build Angular 6 Web Application step by step

Image
In this article we will be building an Angular 6 application step by step from scratch with sample example. We will be generating our Angular 6 hello world application using angular CLI and then modify it to have a user management project where there will be a login screen for an admin and post login he can perform CRUD operations such as create, read, update and delete user with the sample REST API exposed using HttpClientModule. We will also be using RouterModule to have routing enabled. Also, at the end we will be integrating material designing with our Angular 6 app.

Table of Contents1. Angular 6 Highlights 2. Generating Angular 6 Project 3. Angular 6 Project Structure 4. Angular CLI Useful Commands 5. Angular 6 Routing 6. Spring Boot Implementation 7. Service in Angular 6 Application 8. Creating Components in Angular 6 9. Testing Angular 6 Application 10. Adding Material Design in Angular 6 App Angular 6 Release Highlights Angular v6 is the first release of Angular tha…

Creation of the virtual directory failed issue whle opening the older version projects in VS2017[solved]

I attempted to load the new VS2015 project in VS2017, but it immediately failed to load.and i am getting below error popup

Creation of the virtual directory http://localhost:32999/
failed with the error: Filename: redirection.config
Error: Cannot read configuration file

there are two solution for this issue

1) Renaming applicationhost.config :


  Close VS2017    Go into folder %userprofile%\Documents\IISExpress\config    Rename applicationhost.config    Restart VS and load the solution/project    VS should have recreated applicationhost.config, and project should load

2) Copy config files to IISExpress directory

copy all files from

    C:\Program Files\IIS Express\config\templates\PersonalWebServer

to

    %userprofile%\Documents\IISExpress\config


any of above solution will resolve your problem..

Security Exception in ASP.NET on shared hosting environment [solved]

When i was trying to host my newly developed website on shared server and i stuck with following exception

Security Exception in ASP.NET

[SecurityException: Request failed.] System.Security.CodeAccessSecurityEngine.ThrowSecurityException(RuntimeAssembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandleInternal rmh, SecurityAction action, Object demand, IPermission permThatFailed) +165 System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object assemblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandleInternal rmh, SecurityAction action, Object demand, IPermission permThatFailed) +100 System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandleInternal rmh, Object assemblyOrString, SecurityAction action, Boolean throwException) +284 System.Security.CodeAccessSecurityEngine.CheckSetHelper(CompressedStack cs, PermissionSet grants, Permissio…

writing clean code matters for better maintenance of application

Clean code — a term first coined by Robert C. Martin in his book 'Clean Code: A Handbook of Agile craftmanship' — is very relevant in today's fast-paced, highly complex software development and lifecycle management environments. It makes it easier to evolve or maintain a finished product. Compare it, if you will, to the work of an electrician; a cabinet of tidy wires and connectors, all clearly organized and labeled, will make future changes that much easier and faster, with fewer risks of error and maybe even reduced costs over time.

Part of clean code is also being considerate of others. Writing code that everyone understands, that the developer is confident is error-free and supported by clear documentation is being respectful of other team members. 'Do as you would be done by' is an applicable motto here; code that breaks once beyond the experimentation stage is likely to annoy colleagues, be embarrassing for the developer and even damage his or her reputation.

Solved- goto option of notepad disabled

I am using notepad most of time for easy way to store text of my day to day job.  But suddenly I am not able to use the go to functionality of note pad to move to specific line no.

In notepad to enable goto option you need to check and act on below things.


Go to format menu and check word wrap option is on or notIf it is on then keep it off so that goto option will enable again.
This is what the solution you can use for disable goto functionality.

Email validation using regular expression in jQuery

To validate user input for email-id it's very easy using regular expressions. Using regular expressions you do not need to write lengthy logical code in jQuery. Following are the steps to do the same.

Pass a string to RegExp or create a regex using the //syntaxCall regex.test(string) So code would be... jQuery(function(){ $(".mail").keyup(function(){var VAL =

Using Ng-grid in AngularJS Pages

Image
It is a common requirement for any project to display data in a tabular format. The easiest way to do this is by using HTML tables, but soon this gets complex, you need a way to support sorting (single & multi columns), resizable columns, inline editing, filtering, pagination (client-side and server-side) and so on. There is a way to bind data to a HTML Table in AngularJs, but when it comes to sorting, paging, editing and dragging the columns, the grid choice is useful. ng-grid is Angular's native implementation of the Grid. There are many plugins from third-parties that can be integrated into AngularJS Pages, but ng-grid exists inside the AngularJs framework and is very rich in functionality and compatibility.

Let us create a sample ng-grid and understand how ng-grid works.

To use AngularJS, you have to include it in your page before the closing <body> tag. Google's CDN is recommended for a faster load time:

<scriptsrc="https://ajax.googleapis.com/ajax/libs/…