Live Help (Start Chat)
View Count: 0
Duration: 28 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 10 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 27 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 13 mins
Accessed date:
Not Yet Viewed
Post your comment / feedback here
 
 

Be the first one to comment about this video

Sorry!For this module there is no Sample Code.
Sorry!For this module there is no Assignments.
Question No: 1 of 12
Web.config contains sections marked as allowDefinition="MachineToApplication", These configuration settings can be present in 
Options:
  1. machine.config
  2. web.config in root folder of web application
  3. web.config in views
  4. app.config
View Answer/Explanation:
a b
Explanation:
Web.config have configuration settings for the application and it is a XML based file present in the Machine.config and web.config in root folder of web application. Machine config file is present in below location C:\Windows\Microsoft.NET\Framework\v4.0.30319\Config.

Question No: 2 of 12
Which API function is used to read web.config appSettings 
Options:
  1. System.Configuration.AppSettings["k1"];
  2. System.ConfigurationManager.AppSettings["k1"];
  3. System.ConfigurationManager.AppSettings["k1"];
  4. System.Configuration.WebSettings["k1"];
  5. None of the above
View Answer/Explanation:
e
Explanation:
Actual API method is System.Configuration.ConfigurationManager.AppSettings["k1"]

Question No: 3 of 12
How can we have different settings in web.config for a specific Action Methods of a controllers? 
Options:
  1. By using Location path tag
  2. We have to mention different controller path in appSettings.
  3. We can have different web.config.
  4. None of the above.
View Answer/Explanation:
a
Explanation:

Question No: 4 of 12
Location section in web.config is used 
Options:
  1. To overwrite configuration settings from parent directory web.config
  2. To specify configuration settings for a given URL/Path
  3. To block overriding of configuration settings in sub directory web.config
  4. To specify location of Views on MVC application
View Answer/Explanation:
b c
Explanation:
Location section is used to specify configuration settings for specified path and also to lock overriding of settings in sub directory.

Question No: 5 of 12
Web.config in Views folder of an application is not used to 
Options:
  1. Specify configuration settings for all .cshtml files
  2. Specify configuration settings for all Controllers and Models
  3. Setup default import namespaces for the view pages
  4. Block request for all direct access to files in the views folder.
View Answer/Explanation:
b
Explanation:
Generally web.config in Views folder of an application is used to specify configuration settings for all views and importing namespaces for views.It is not used to specify configuration settings for Controllers

Question No: 6 of 12
When Application_Start method in Global.asax is executed 
Options:
  1. When the application receives the first request and is loaded to create an AppDomain
  2. For every Request received by an application
  3. When the web server is started
  4. For every client when the application receives the first request from that client.
View Answer/Explanation:
a
Explanation:
Application_Start method in Global.asax is executed, when the application receives the first request and is loaded to create an AppDomain

Question No: 7 of 12
Session_Start method in Global.asax is executed 
Options:
  1. When the application receives the first request and is loaded to create an AppDomain
  2. For every Request received by an application
  3. When the web server is started
  4. For every client when the application receives the first request from that client.
View Answer/Explanation:
d
Explanation:
Session_Start method in Global.asax is executed when the application receives the first request from that client for every client.

Question No: 8 of 12
Application_BeginRequest method in Global.asax is executed 
Options:
  1. When the application recieves the first request
  2. For every Request received by an application
  3. When the web server is started
  4. For every client when the application receives the first request from that client.
View Answer/Explanation:
b
Explanation:
Application_BeginRequest method in Global.asax is executed for every Request received by an application

Question No: 9 of 12
Which of the following is correct syntax for mentioning Database ConnectionString 
Options:
  1. <Configuration> <system.web> <connectionStrings> <add name="MySqlCS" connectionString="Data Source=localhost;Integrated Security=True;Initial Catalog=Northwind;"/> </connectionStrings> </system.web> </configuration>
  2. <Configuration> <connectionStrings><add name="MySqlCS" connectionString="Data Source=localhost;Integrated Security=True;Initial Catalog=Northwind;" /> </connectionStrings> </configuration>
  3. <Configuration> <system.web> <connectionString> <add name="MySqlCS" connectionString="Data Source=localhost;Integrated Security=True;Initial Catalog=Northwind;"/> </connectionString> </system.web> </system.configuration>
  4. <Configuration> <connectionString> <add name="MySqlCS" connectionString="Data Source=localhost;Integrated Security=True;Initial Catalog=Northwind;" /> </connectionStrings> </configuration>
View Answer/Explanation:
b
Explanation:
The ConnectionString is present nested under Configuration Section.

Question No: 10 of 12
Which of the following is recommended while moving the application from development to production environment 
Options:
  1. <compilation debug="false" />
  2. <compilation mode="production" />
  3. <compilation production="true" />
  4. <compilation debugging="false" />
View Answer/Explanation:
a
Explanation:
Set the Compilation debug = false while moving the application from development to production environment. if we set Compilation debug = true it causes a number of non-optimal things

  1