Why To Use ASP.Net Core and ASP.Net Platform.

Error Handling

In ASP.Net Core it has an built in feature for handling any error in applications which includes a developers execption pages, static code pages,custom error pages and startup execption handling which are crucial in Core applications.

Example:
[Route("/Error")]
public IActionResut Index()
{
// User can Write Handle code Here.
}

Configuration

ASP.Net Core has an configuration which is based on an name and value pairs.

configuration model is based on web.config or system.configuration.

Each and every configuration providers has different set of formats as (XML,JSON).


Example:
var appConfig =
config.GetSection("App").Get();

Logging

ASP.Net Core has a Logging feature logging API which basically works on a different logging Providers.
In ASP.Net Core built in providers provides sending logs to on or more destinations as such.
There are different Third party logging frameworks can be used by easily downloading from NuGet-Package manager.

Example:
_logger.LogInformation("Parameter values: {a2},{a1}",a1,a2)
config.GetSection("App").Get();

WebSockets

ASP.Net has an WebSocket which is a protocal that enables two way communication channels over any TCP connections.

Mainly Socketing is used for chat apps,games and internal office perpose applications.

Example:
var webSocketOpt = new webSocketOpt()
{
KeepAliveInterval = TimeSpan.FromSeconds(120),
ReceiveBufferSize = 4 * 1024
};

app.UseWebSockets(webSocketOpt);

Fundamentals

  • Static Files

    ASP.Net Core has many Static Files which are rendured during the page source such as HTML.Css, JavaScript, JQuery and Images.

  • Session and Application State

    In an ASP.Net Core Session state is a feature which allows save and store data while an user browse an web applications.

  • Content root

    Content root is an base path for any content used by an app as Razor Pages,ASPX Pages and some static assets.By default in any web applications the path is considered as a root path for hosting an app.

  • Middleware

    In an ASP.Net Core a request is pipeline using a middleware.It Performs an asynchronous logic on HttpContext and also interset an next middleware in step by step sequence.