Main Content

Please wait...
Authentication refers to giving access to the specific system. It gives security from unwanted people from accessing data or site. ASP.NET core | SQL Stored Procedure | SQL SERVER | Encryption and Decryption | Authentication and Authorization Authorization refers to limiting the access of the system to the user according to their roles. There are different roles in an organization and we can provide access to the resources according to their position or role in the organization. There are ....Read More
ASP.NET Core, developed by Microsoft and the community is a free and open-source web framework and higher performance than ASP.NET. It runs on both the full .NET Framework, on Windows, and the cross-platform .NET Core. ASP.NET Core is the versatile framework and can be used to build all kinds of software including Web applications, Mobile apps, Desktop applications, APIs, Cloud services, Games, Microservices, and IoT applications. .Net Core 3.0 ASP .NET Core 3.0 is still in preview 7. This ....Read More
Get File Size in C#. How to get a file size in bytes using C# using the FileInfo.Length property. The size of any file in bytes can be returned by the Length property of FileInfo Class. Following code returns the size of file: // To Get size of any file long FileSize = MyFile.Length; Console.WriteLine("File Size in Bytes: {0}", FileSize); Here, to run it we must import System.IO and System.Text namespaces in the project. Coding Implementation Here is the complete coding impl ....Read More

JIT(Just In Time) Compiler in .NET

JIT(Just In Time) Compiler in .NET As we know that .Net Framework supports various Microsoft .Net Languages and all them use a Common Language Runtime rather than using a separate runtime for single one of languages. So, when .NET Common Language is installed in a computer it can support any language that is Microsoft .NET compatible. So, the purpose of JIT Compiler is to convert the .NET Language into the native code which is CPU specific. First the source code is converted to Intermediate L ....Read More
If your self hosted application acquired memory and it's not released then (or your core application lead to system out of memory), the tips in this post will help you. Once on my application what I had seen at the time of high traffic the memory acquired by ASP.NET Core application is not free and the server is running out of memory. To fix this issue my team and me started to find the problem in the application and after some hour of profiling, what we had seen there is not a b ....Read More

How to Trim the string in Model in Aspnet core?

How to Trim the string in Model in Aspnet core? Why trimming the text is important? Simply, because we don’t need any white space in a string. When you are doing any web project and implementing Rest API Service, we need to create a lot of forms, trimming every string value that the user supplied is time-consuming. So Here we have an easier and effective solution for the problem. First, we need the IModelBinder and IModelBinderProvider. Model Binder is now at a single place on inf ....Read More

Find prime porcupine number.

A prime number is an integer that is divisible by 1 an itself. A porcupine number is a prime number whose last digit is 9 and the next prime number that follows it also ends with the digit 9. For example 139 is a porcupine number because: It is prime It ends in a 9 The next prime number after it is 149 which also ends in 9. Note that 140, 141, 142, 143, 144, 145, 146, 147 and 148 are not prime so 149 is the next prime number after 139. Write a function name isproc() that take two inpu ....Read More

Find prime number between two range.

Write a function named prime count with a signature in int PrimeCount(int start, int end); the function print the prime number from the given range. Recall the prime is an integer greater than 1whose only integer factor is one or itself. if start is And end is reason 10 30 The prime between 10 to 30 are 11 ,13 ,17 ,19, 23 ,29. 11 29 The prime between 10 to 30 are 11 ,13 ,17 ,19, 23 ,29. 20 22 20,21,22 are all non-prime ....Read More

Finding Next Perfect Square using math function.

Write a function named nextPerfectSquare that returns the first perfect square that is greater that its integer argument. A perfect square is an integer that is equal to some integer squared. For example 16 is a perfect square because 16=4*4. However 15 is not a perfect square because there is no integer n such that 15=n*n. Examples:- n next perfect square 6 9 36 49 0 1 -5 0 Solution:- using System; namespace perfectSqua ....Read More

Check squareRoot of integer without using sqrt().

Write a function named isSquare that returns 1 if its integer is a square of some integer, otherwise it returns 0. Your function must not use any function or method (e.g.sqrt) that comes with a runtime library or class library! The signature of the functions: int isSquare(int n) Example: If n is return reason 4 1 Because ....Read More