Nizamuddin Siddiqui has Published 2307 Articles

How can we inject the service dependency into the controller C# Asp.net Core?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 25-Sep-2020 10:39:25

1K+ Views

ASP.NET Core injects objects of dependency classes through constructor or method by using built-in IoC container.The built-in container is represented by IServiceProvider implementation that supports constructor injection by default. The types (classes) managed by built-in IoC container are called services.In order to let the IoC container automatically inject our application ... Read More

What are the various JSON files available in C# ASP.NET Core?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 25-Sep-2020 10:37:56

5K+ Views

ASP.net Core is re-architected from prior versions of ASP.net, where the configuration was relying on System.Configuration and xml configurations in web.config file. In ASP.net Core, a new easy way to declare and access the global settings for solution, project specific settings, client specific settings etc..The new configuration model, works with ... Read More

How to enable Session in C# ASP.NET Core?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 24-Sep-2020 13:14:50

16K+ Views

Session is a feature in ASP.NET Core that enables us to save/store the user data.Session stores the data in the dictionary on the Server and SessionId is used as a key. The SessionId is stored on the client at cookie. The SessionId cookie is sent with every request.The SessionId cookie ... Read More

What is routing in C# ASP.NET Core?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 24-Sep-2020 13:13:10

4K+ Views

Routing is used to map requests to route handlers.Routes are configured when the application starts up, and can extract values from the URL that will be used for request processing.Routing basicsRouting uses routes (implementations of IRouter)map incoming requests to route handlersgenerate URLs used in responsesRouting is connected to the middleware ... Read More

What is the difference between IApplicationBuilder.Use() and IApplicationBuilder.Run() C# Asp.net Core?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 24-Sep-2020 13:12:02

4K+ Views

We can configure middleware in the Configure method of the Startup class using IApplicationBuilder instance.Run() is an extension method on IApplicationBuilder instance which adds a terminal middleware to the application's request pipeline.The Run method is an extension method on IApplicationBuilder and accepts a parameter of RequestDelegate.signature of the Run methodpublic ... Read More

What is the use of "Map" extension while adding middleware to C# ASP.NET Core pipeline?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 24-Sep-2020 13:09:03

3K+ Views

Middleware are software components that are assembled into an application pipeline to handle requests and responses.Each component chooses whether to pass the request on to the next component in the pipeline, and can perform certain actions before and after the next component is invoked in the pipeline.Map extensions are used ... Read More

What is the use of the Configure() method of startup class in C# Asp.net Core?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 24-Sep-2020 13:06:30

1K+ Views

The configure method is present inside startup class of ASP.NET Core applicationThe Configure method is a place where you can configure application request pipeline for your application using IApplicationBuilder instance that is provided by the built-in IoC containerThe Configure method by default has these three parameters IApplicationBuilder, IWebHostEnvironment and ILoggerFactory ... Read More

How to run an external application through a C# application?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 24-Sep-2020 13:04:32

4K+ Views

An external application can be run from a C# application using Process. A process is a program that is running on your computer. This can be anything from a small background task, such as a spell-checker or system events handler to a full-blown application like Notepad etc.Each process provides the ... Read More

How do we specify MIME type in Asp.Net WebAPI C#?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 24-Sep-2020 13:02:13

1K+ Views

A media type, also called a MIME type, identifies the format of a piece of data. In HTTP, media types describe the format of the message body. A media type consists of two strings, a type and a subtype. For example −text/htmlimage/pngapplication/jsonWhen an HTTP message contains an entity-body, the Content-Type ... Read More

How to set a property having different datatype with a string value using reflection in C#?

Nizamuddin Siddiqui

Nizamuddin Siddiqui

Updated on 24-Sep-2020 12:54:37

1K+ Views

Reflection is when managed code can read its own metadata to find assemblies. Essentially, it allows code to inspect other code within the same system. With reflection in C#, we can dynamically create an instance of a type and bind that type to an existing object. Moreover, we can get ... Read More

Advertisements