Codechef4u is a community for computer professionals,by computer professionals,just like you; who loves sharing and helping each others,Join them
Share your post

Web.config Interview Questions Part ||

11.  Can you tell the location of the root web.confit file from which all web.config file inherit?

All the Web.config files inherit the root Web.config file available at the following location 


12.  What is the root tag of web.config file ?

For Web.config <configuration> tag is the root element under which it has all the remaining sub elements.

13.  For which purpose you use <appSettings> tag?

<appSettings> helps us to store information like connectionstring ,url ,path, port numbers ,custom key values. Also you can add custom setting values for application i.e. Timeout for transactions.


<add key="loginUrl" value="~/Account/LogOn" />
<add key="TimeOut" value="1000" />


14.  Explain <httpHandlers> tag in web.config ?

Maps incoming requests to the appropriate handler according to the URL and the HTTP verb that is specified in the request

ASP.NET HTTPHandlers are responsible for intercepting requests made to your ASP.NET web application server. They run as processes in response to a request made to the ASP.NET Site.

ASP.NET offers a few default HTTP handlers:

Page Handler (.aspx): handles Web pages
User Control Handler (.ascx): handles Web user control pages
Web Service Handler (.asmx): handles Web service pages
Trace Handler (trace.axd): handles trace functionality


15.   Web.config file is stored in which form?

Web.config files are stored in XML format.

16.   What is the difference between web config and machine config?

Main difference between web.config and machine.config is ,

Web.config file is specific to a web application where as machine.config is specific to a machine or server.

The settings made in the Web.config file are applied to that particular web application only whereas the settings of Machine.config file are applied to the whole application.

17.  What is the difference between web.config and app.config?

App.Config is used for Windows Forms, Windows Services, Console Apps and WPF applications.

For standalone application you can use app.config ,for web application you can use web.config.

18.  In what scenarios will a project have two Web.configfiles ?

If your project is divided into modules and modules are hierarchically connected, in that case you there are multiple web.config files used.


Financial inventory web application has modules Sales, Accounts, Administration for all modules you can use separate web.config. 


Unable to start debugging, stops application pool


Unable to start debugging on the web server. Could not start ASP.NET debugging.


If you are facing this issue and websites stops application pool then this is permission issue.
Check all websites associated with has permission (if required admin permission provide that).
Ensure your website using domain account and require admin permission.


You was using an application pool that that used a domain account. Windows on your computer wanted to make a profile for this user and wasn't able to do so due to a permissions problem.


In this article I will explain in detail latest 5 preview era started with first preview release ASP.NET 1.0 around 15 years ago, millions of developers have used it to build and run web applications, and over the years Microsoft added great features in


ASP.NET 5 is a significant change of ASP.NET, in this article I will introduce you 5 purviews.
ASP.NET 5 is a new open-source and cross-platform framework for building modern cloud-based Web apps. using .NET.
You can develop and run your ASP.NET 5 applications cross-platform on Windows, Mac and Linux. open source code is available in GitHub.


Some new features with 5:

1.  New light-weight and modular HTTP request pipeline

2.  Ability to host on IIS or self-host in your own process

3.  Built on .NET Core, which supports true side-by-side app versioning

4.  Ships entirely as NuGet packages

5.  Integrated support for creating and using NuGet packages

6.  Single aligned web stack for Web UI and Web APIs

7.  Cloud-ready environment-based configuration

8.  Built-in support for dependency injection

9.  New tooling that simplifies modern web development

10. Build and run cross-platform ASP.NET apps on Windows, Mac and Linux

12. Open source and community focused


.NET Execution Environment (DNX):

ASP.NET 5/DNX is a lean .NET stack for building modern cloud and web apps that run on OS X, Linux, and Windows.
Microsoft team making number of changes of architectural changes that makes the core web framework much leaner (it no longer requires System.Web.dll).
SP.NET 5 applications are built and run using the new .NET Execution Environment (DNX). Every ASP.NET 5 project is a DNX project.

Every 5 applications defined using a public start-up class:

Sample example:

       public class Startup
public void ConfigureServices(IServiceCollection myservices)
public void Configure(IApplicationBuilder myapp)


ConfigureServices: Method used to define services used by your application.

Configure: Method used to define what middleware makes up your request pipeline.


Service is a component available through dependency injection. Services in ASP.NET 5 come in three varieties: singleton, scoped and transient. Transient services are created each time they’re requested from the container. Scoped services are created only if they don’t already exist in the current scope. For Web applications, a container scope is created for each request, so you can think of scoped services as per request. Singleton services are only ever created once.  


ASP.NET 5 includes server support for running on IIS or self-hosting in your own process. You can use cross platform servers also to host your ASP.NET 5 web application.

Web Root:

The Web root of an ASP.NET 5 application is configured using the “webroot” property in your project.json file.

Client-side development: 5 supports or you can integrate seamlessly with a variety of client-side frameworks like Bootstrap,AngularJS,KnouckoutJS.

Configuration: 5 new configuration model is not based on System.Configuration or Web.config. This new configuration model pulls from an ordered set of configuration providers. The built-in configuration providers support a variety of file formats (XML, JSON, INI) and also environment variables to enable environment-based configuration. You can also write your own custom configuration providers.