1.What is the use of web.config? Difference between machine.config and
Web.config?
ASP.NET configuration files are XML-based text files--each named web.config--that can
appear in any directory on an ASP.NET Web application server. Each web.config file
applies configuration settings to the directory it is located in and to all virtual child
directories beneath it. Settings in child directories can optionally override or modify
settings specified in parent directories. The root configuration file--
WinNT\Microsoft.NET\Framework\\config\machine.config--provides default
configuration settings for the entire machine. ASP.NET configures IIS to prevent direct
browser access to web.config files to ensure that their values cannot become public
(attempts to access them will cause ASP.NET to return 403: Access Forbidden). At run
time ASP.NET uses these web.config configuration files to hierarchically compute a
unique collection of settings for each incoming URL target request (these settings are
calculated only once and then cached across subsequent requests; ASP.NET
automatically watches for file changes and will invalidate the cache if any of the
configuration files change).
2.What is the use of sessionstate tag in the web.config file?
Configuring session state: Session state features can be configured via the section in a
web.config file. To double the default timeout of 20 minutes, you can add the following
to the web.config file of an application:
3.What are the different modes for the sessionstates in the web.config file?
•
Off -Indicates that session state is not enabled.
•
Inproc - Indicates that session state is stored locally.
•
StateServer-Indicates that session state is stored on a remote server.
•
SQLServer-Indicates that session state is stored on the SQL Server.
4.What is smart navigation?
When a page is requested by an Internet Explorer 5 browser, or later, smart navigation
enhances the user's experience of the page by performing the following:
•
eliminating the flash caused by navigation.
•
persisting the scroll position when moving from page to page.
•
persisting element focus between navigations.
•
retaining only the last page state in the browser's history.
Smart navigation is best used with ASP.NET pages that require frequent postbacks but
with visual content that does not change dramatically on return. Consider this carefully
when deciding whether to set this property to true.Set the SmartNavigation attribute to
true in the @ Page directive in the .aspx file. When the page is requested, the dynamically
generated class sets this property.
5.What base class do all Web Forms inherit from?
System.Web.UI.Page
Tuesday, March 10, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment