Tuesday 20 April 2021

Custom Error message | Hide Yellow Screen Of Death (YSOD) page in ASP .Net

ASP.Net MVC has a default error view in the Shared folder. which shows when any unexpected error arises. By default a fixed static error message display, No details of error shows. So if you want to show error details then this post will help you.




Yellow Screen Of Death (YSOD)

When an unhandled exception arises in an ASP.NET application one of three types of error pages is displayed: By default, ASP.NET displays an error page that is affectionately referred to as the Yellow Screen of Death (YSOD). YSOD showed some Sensitive information that can be used by attackers . Show its good practice to show custom error info in front of your users.

Setting in Webconfg file

<system.web>

    <compilation debug="true" targetFramework="4.7.2" />

    <httpRuntime targetFramework="4.7.2" />

       <trust level="Full" />

      

       <customErrors mode="RemoteOnly"

                      defaultRedirect="~/Shared/Error.cshtml" />

  </system.web>


Show error in custom error file



 @model System.Web.Mvc.HandleErrorInfo 

<div class="container">       

        <h1>Error.</h1>

        <h2>An error occurred while processing your request.</h2>

        <h3 style="color:red"><p style="color:red"> @Model.Exception.Message</p></h3>

        <br /><br />

    </div>

Next Topic

Sunday 18 April 2021

Array an introduction | C Language

 


Array

An array is a collection of similar data type which occupies continuous location on memory. Array is useful bulk process is required on similar data type. Name of array is a constant pointer which point first element of array. Elements of array are access through index number. Index donates numeric position of data in an array. Index start with zero and last element less than one from the specified size of array.

Syntaxt :

Data_type arr_name[size_int]


 

 

Tuesday 13 April 2021

Answer : PROGRAMMING & PROBLEM SOLVING THROUGH ‘C’ LANGUAGE , January 2020 | NIELIT O Level

Answer : PROGRAMMING & PROBLEM SOLVING THROUGH ‘C’ LANGUAGE , January 2020 | NIELIT O Level

1. Objective Answer

1.1 : B
1.2 : D
1.3 : C
1.4 : B
1.5 : B
1.6 : C
1.7 : C
1.8 : C
1.9 : C
1.10 : B

Sunday 11 April 2021

Develop a flowchart to find out the minimum of the given three numbers.

  Develop a flowchart to find out the minimum of the given three numbers.