§ ASP Question & Answers
1. JavaScript File?
Java Script file is a collection of sub programs, which provides reusability for set of WebPages.
2. What is the Basic Function of Web Server?
Managing resources and responding to client request is basic function of server.
3. Web Server?
It is software for managing web pages this will accept HTTP request and responds with HTTP response hence it is called as HTTP server.
- Web server will provide security for the file system.
- Web server will provide server side execution for communicating with database server so on
- Microsoft:
· Personal web server (PWS)
· Peer web server
· Internet Information services (IIS)
4. IIS?
Internet Information services, It will carry website. It is called as default website. It will map to physical path C:\Inetpub\wwwroot
5. Virtual Directory?
Virtual directory is an alias for physical directory managed by web server. This is required to perform categorization of web pages for faster access and to implement security.
6. Inetmgr.exe?
Internet Services Manager, Tool for configuring web server.
Creating virtual directory or creating website
And Changing physical path of website.
7. ASP?
Active Server Page, Is not a language. It can be called as technology integrated with web server IIS. This comes in the form of a DLL file called ASP.DLL.
This ASP provides server side execution.
It provides collection of objects called as ASP objects (Response, Request, Session, Application, Server, AspError)
8. ASP page?
Its Extension is .asp. It can have HTML Tags, Text, Client side Scripting
9. Response & Request Objects?
When client makes a request to the web server lot of information will be transmitted from client system to the web server. This information includes IP Address of the client system, browser information, form data…etc.
Request Object is required to read the information, which comes with client.
Response object is required to send information from the web server system to the client browser.
10. What is submission of Data?
When client is providing data to the web server then it is called as submission of data or page submission.
Page submission: 1) HTML Page---------ASP Page
2) ASP Page ----------- ASP Page
11. What is Postback Implementation?
When the page is submitting to the itself then it is called as postback implementation. Ex: sum.asp-------sum.asp
12. ASP.Net?
ASP.Net is a technology integrated with .Net framework for web based application development.
NET Framework installation will configure web server with a run time module called as ASPNET_ISAPI.DLL. This will act as a mediator between web server and .NET framework.
ISAPI- Internet server Application Programming interface.
· In ASP.Net by default method will be post.
· ASP.Net web page will support only one form with runat server
· ASP.Net web page will support only one .Net language through out web page.
13. Differences between ASP 3.0 & ASP.NET?
ASP
ASP.NET
It supports scripting languages VB, Java Script. These languages are interpreter based. This makes execution slow which will affect performance of the server.
It supports .NET languages VB.NET,C#.NET … .These languages are compiler based. This makes execution faster. It will improve the performance of server.
No proper memory management.
Provides proper memory management
It does not support server side controls. This makes developer job complex.
It supports server side controls. This make developer job easier & more clarity comes into coding.
It supports only Inpage technique.
It supports Inpage technique & code behind technique.
It requires manual coding to perform validations.
It does not require manual coding to perform validation. This makes application development faster.
It supports only inprocess session & optimization of session of state is not supported.
It supports inprocess, outprocess session & optimization of session state is supported
It supports ADO library for database connectivity ADO doesn’t support complete disconnected architecture & XML integration.
It supports ADO.NET for database connectivity ADO.NET supports complete disconnected architecture & XML integration.
It supports only entire page caching towards client system.
It supports 3 types of caching
1. Output caching
2. Fragment caching
3. Data caching
It doesn’t provide built in security.
It provides built in security in the form of authentication and authorization. It supports 3 types of authentication.
1. Windows based
2. Forms based
3. Passport Authentication
It does not support setup creation.
It supports setup creation
It does not support business-to-business communication.
It supports business to business communication with XML web-services
14. Base Class Libraries?
The Libraries, which comes with .Net framework installation, are called as base class libraries.
This will be around 64 libraries developed by Microsoft with using c# . These will be common libraries for all the .Net languages.
Ex: System.Dll,
System.Data.Dll,
System.Web.Dll (for ASP.Net)
Microsoft.Visualbasic.Dll
15. Is C# case Sensitive language?
Yes.
16. What is InPage Technique?
When the designing part & logic part is maintained within a single file called as ASPX then it is called as Inpage Technique This is required for the migration of projects. I.e. converting ASP page to ASP.Net.
17. What is Code Behind Technique?
When the designing part is maintained with in ASPX file & logic part is maintained within a DLL file then it is called as code behind technique. This supports parallel development of designing part & logic part, this makes application development faster and the security is provided to the logic part.
18. Features of Server side control?
i. It will reduce burden on the developer.
ii. It provides more clarity into the web page.
iii. It supports view state implementation.
iv. Server side control will produce HTML content. i.e., client side control to the browser
Microsoft is providing two types of web server controls.
1) HTML Server controls.
2) Web Server Controls
19. HTML Server Control?
1) This control will follow similar syntax of HTML client side controls.
2) It does not support extensibility. Microsoft does not provide new controls into this category in the future versions of ASP.Net.
3) The purpose of HTML server controls is to be making migration easier.
System.web.Dll:
System.web.ui.HTMLControls
HTML Control is a base class for all the HTML server controls.
HTML Input Controls: Button, Textbox
HTML Container: Form, select, Button, Span
HTML Image etc.
· In ASP.Net by default method will be post.
· ASP.Net web page will support only one form with runat server.
· ASP.Net web page will support only one .Net Language through out web page.
20. Web Server Controls?
1) These controls are advanced controls compared to HTML server controls.
2) These Controls are called as smart controls; these controls will produce HTML contents based on requested browser.
3) These Controls will support extensibility where the Microsoft can provide new controls in the future versions & developer can create user defined web server controls.
4) These controls will support data binding.
5) These controls will support XML based Syntax.
6) Web server controls can be categorized into four types.
· Basic controls: label,textbox,checkbox,radiobutton,button
· Rich Controls: AdRotator, Calendar.
· List Controls: Data grid,Repeater,Datalist.
· Validation Controls: Required field validator, Range validator, compares valuator
21. View State Architecture?
View state is a concept of maintaining controls properties under post implementation. This is implemented using the hidden fields
1) It will reduce burden on the developer, as it does not require any programming from the developer.
2) It will not reserve the memory permanently at client side or server side.
3) The problem with the view state is more amount of date transmission will take place.
4) The view state can be controlled i.e. configured at 3 levels
· Control level.
· Page level.
· Application level.
22. ASP .Net Worker Process?
ASP.Net Worker process can be called as ASP.Net run time.
This will maintain HTTP application factory & page handler factory.
HTTP application factory will maintain all the application names, which are load into worker process.
Page Handler factory will maintain all the web page names for which DLL exists.
When client makes a request to the web server. It will forward the request to ASPNET-ISAPI.DLL.
ASPNET-ISAPI.DLL will send application name & web page name to worker process. ASP.Net worker process will verify application name with HTTP application factory. If it is not available then it will create a block of memory & files related to the application will be loaded into memory.
This memory block is called application domain.
The requested web page will be verified with page handler factory if it is not available the request will be forwarded to the HTTP pipeline.
HTTP Pipeline is a collection of .Net framework classes, which will produce DLL file for the web page.
The request will be forwarded to HTTP runtime, this will create an object of web page class & makes a call to process request method.
This process request method will start the page execution. It will perform following things.
· Initializing memory.
· Loading viewstate Data & executing post back event.
· Producing i.e. Rendering HTML content.
· Releasing Memory.
The set of events will be executed for the page class towards process request. Method execution. These events are called as page lifecycle events.
Init Event
Load Event
Pre Render Event
Unload Event
23. Difference Between Web Matrix and Visual Studio.Net?
Web Matrix
VisualStudio.NET
It supports only web based application development i.e., ASP.Net web page or ASP.Net web service.
It supports different types of .NET application development.
It will consume less amount of memory.
It will consume more amount of memory.
It does not support intellisense.
It supports intellisense.
It does support debugging.
It supports debugging.
It does not require IIS. It will carry a personal web server called as CASSINI server.
It requires IIS for ASP.Net web page creation.
24. Response. Redirect?
It will send the instruction to the browser to call a particular web page.
Response. Redirect will have an overhead of request & response. This will make communication slow; this problem can be overcome using Server. Transfer method.
25. Server. Transfer?
Server.Transfer is applicable to redirection of the page within the application. If it is between applications. Response.Redirect is applicable.
26. Auto Post Back?
By default postback functionality i.e., making request to the server is provided with button link button & image button. When we want to provide postback functionality to other controls Auto PostBack property is required.
This property is not provided with HTML server controls.
27. Use of Validation Controls?
· It will reduce burden on the developer and makes application development faster.
· Developer will lose certain flexibility.
· It supports client side validation or server side validation.
· When it is client side validation the controls are browser dependents. I.e., supported by only Internet explorer.
· More than one validation control can be used with a single textbox.
· When the validation fails within the web page. The page submission will not take place.
· The server side validation can be performed by providing enable client script property as FALSE
28. How the Compare Validator Works?
It Support 3 types of validations.
· Data Type Checking
· Comparing Textbox data with constant using relational operator.
· Comparing two textboxes using relational operator.
29. XML file?
The Extensible Markup Language (XML) is a general-purpose markup language. Its primary purpose is to facilitate the sharing of data across different information systems, particularly via the Internet.
It is a simplified subset of the Standard Generalized Markup Language (SGML), and is designed to be relatively human-legible. By adding semantic constraints, application languages can be implemented in XML. These include XHTML, RSS, MathML, GraphML, Scalable Vector Graphics, MusicXML, and thousands of others. Moreover, XML is sometimes used as the specification language for such application languages.
The World Wide Web Consortium recommends XML. It is a fee-free open standard. The W3C recommendation specifies both the lexical grammar, and the requirements for parsing.
30. Advantages of Code Behind Technique?
· It Support parallel development of designing part & logic part. This makes application development faster.
· If provides security for the logic part by maintaining in the form of DLL file.
31. What is Impression Tag in advertisement on Web page?
Impression tag will specify priority or importance of the advertisement. The advertisement with more impression will be given to more number of clients.
If there is no impressions for the advertisement one advertisement after another advertisement will be given to clients.
32. What is Frameset?
Frameset is used to split a browser window into different partitions. Where each partition is called as a frame. A frame can display one web page information.
33. What is Required Field Validator?
Textbox should not be blank.
34. What is Range validator?
It will validate textbox data within a particular Range only.
35. Validation control Architecture?
When client makes a request to the web page concern java script file webuivalidation.js (say) file will be downloaded to the client system and validation control will produce span tag. This span tag will make a call to JavaScript junction present within webuivalidation.js file to validate textbox.
36. Regular Expression Validator?
Textbox data will be validated based on a particular pattern (or) expression.
Ex: Expression:\d{5}------ only 5 digit number
\d{1,5}----1-5 digit number
\D {5}------String with 5 characters
[A-Z]{5}—Upper Case only 5 char
[a,e,i,o,u]{3}—
37. Custom validator control?
· This control supports client-side validation & server –side validation.
· The developer has to provide logic for validation.
· When the developer wants to synchronize custom validation with validation controls, then custom validator control is required.
38. Validation summary control?
It will display all the error messages at one place. It will show in a single page. It will not show individual error messages.
· If show summary is true in property then error messages will be displayed on the browser window.
· If show message box is true in property then error messages will be within dialogbox
· If all the validations within a web page is successful, isvalid property of the page class will be true..
39. Various Techniques of State Management?
1) Page submission, query string (appending data to the URL).
Asp.Net supports only Post-back implementation i.e. submitting page to itself. Asp.Net 2.0 supports cross-page submission.
2) View State (New in ASP.Net), hidden field.
3) Cookies
4) Session
5) Application
6) Cache (new in ASP.Net)
40. Cookies?
Cookie can be defined as small amount of memory used by the web server within client system.
The purpose of cookies is to maintain personal information of the client i.e., username, password, no. of visits last visit date etc.,
The cookies can be classified into two types.
1) Inmemory cookie
2) Persistent cookie.
41. What is Inmemory Cookie?
When the cookie is represented within browser process memory then its is called as in-memory cookie. This will be a temporary cookie.
42. What is Persistent Cookie?
When the cookie is maintained on the hard-disk memory, then it is called as persistent cookie. This will be provided with a particular life-time.
43. Restrictions in using Cookies?
1) No security for cookies.
2) A cookie can represent maximum of 4kb data only.
3) Browser will support maximum of 20 cookies towards a web-side.
4) If the requirement is more than 20 cookies, the solution will be “Dictionary Cookie”(Multi value cookie).
5) Dictionary cookie can be defined as collection of key and value pairs
44. Object models in Database connectivity by Microsoft?
Driver provider will act as an interpreter between client application and database server. When the developer is using API functions, lot of manual coding is required this will be a burden for the developer to reduce this burden. Microsoft is providing object models.
· DAO
· RDO
· ADO
45. What is DAO?
DAO (data Access Objects) DAO is a layer designed above Jet Driver.
DAO has become bulky library with 124 objects. It is not recommended for the remote database communication. This has been let to the invention of RDO library.
46. What is RDO?
RDO (Remote Data Objects) is designed based on ODBC driver programming for remote DB connectivity.
RDO is a thin layer; above ODBC this will provide faster communication. It will improve the performance of application.
The main problem with RDO is maintenance will not be easier because, ODBC driver will be maintained in the client system.
Requirement:
· Single technology for accessing any type of data.
· The technology should be maintained on the server machine.
Towards this requirement Microsoft has introduced OLEDB technology. Which will replace ODBC
47. What is ADO?
ADO (Activex Data Objects) is designed based on OLEDB (Object linking Embedded Data Base) provider programming for accessing any type of data i.e., universal data access.
Problems with ADO:
· It is based on COM; COM is a binary standard to windows operating system, so it is platform dependent.
· It does not support compete disconnected architecture.
· It does not support integration with XML.
· It requires performance improvement
These problems has been over come under .NET framework, by introducing ADO.NET
48. What is Connected and Disconnected Architecture?
When the application is maintaining Database Table information by maintaining connectivity with database server, then it is called as connected architecture.
When the application maintains Database Table information without maintaining connectivity with database server, then it is called as disconnected architecture.
49. What is ADO.NET?
System.Data.DLL
· .Net managed –Data provider—It provides connected architecture.
· Dataset—Data storage – It provides complete disconnected Architecture with XML Integration
.Net Managed Data provider:-
Microsoft is providing 4 .Net managed Data providers.
1. OLEDB.NET from .Net 1.0
2. SQLSERVER.NET from .Net 1.0
3. ORACLE.NET from .Net 1.1
4. ODBC.NET from .Net 1.1
Oracle Corporation is providing a .Net managed data provider called as ODP.Net. This is called as third party .Net managed data provider.
This is compatible with oracle 9i & later versions of Oracle.
50. OLEDB.NET?
OLEDB.Net will communicate with COM based code, this requires set of conversions internally, this will consume more time for processing, this will effect the performance of the application.
Developer is bounded to use OLEDB.Net, in following cases.
· To communicate with Oracle version less than 8i.
· To communicate with SQL-Server version less than 7.0
· To communicate with local Data Bases.
51. OLEDB Connection?
Dim Con as new OLEDBConnection (“Provider=
; User Id=; password=; Data Source=”)
Con.open ()------It will establish connection
Con.close ()-----It will close connection
Provider Name:-
· MSDAORA.1 --------------------------Oracle
· SQLOLEDB.1 -------------------------SQL Server
· Microsoft.Jet.OLEDB.3.5.1 or 4.0---JET (Dbase, foxpro, Access)
· MSIDXS.1------------------------------Index server
52. OLEDB Command?
It will represent SQL statements.
Dim Cmd as new OLEDBCommand (“SQL statement”, Con)
53. DataReader?
Data Reader will read only one record at a time into the client application process, this will allocate less amount of memory, within the client application process i.e., only one record memory will be allocated.
Data reader is strongly recommended when the application has to read data only once & there is large amount of data.
Dim Dr as OLEDBDataReader
Dim cmd As New OLEDBCommand (“select * from Dept”,con)
Dr.= cmd.ExecuteReader
Data Reader is connection oriented it will make use connection exclusively.
A Database server will support only one memory block for the connection; this makes datareader-using connection exclusively.
SQL Server 2005 will support more than one memory block for a single connection in this case; connection will not be used by datareader exclusively
54. Stored Subprogram?
Stored subprogram (procedure) can be defined as unit of compiled code maintained by database server with a particular name.
Advantages:-
· It will reduce network traffic
· It provides reusability
· Better performance, execution faster.
· Better maintenance.
· It provides security for Database tables. The privilege can be given on the stored sub program without providing access to database tables.
55. DataSet?
Towards Business to business (B2B) Requirement Record Set can not be used for the following reasons.
· Record set will manage data in the form of single table format. If the requirement is multiple tables information joint condition is required, This will break the normalization it occupies more memory and manipulation will not be supported.
· Record set can not maintain data from multiple databases.
· Recordset does not support constraints.
· Recordset will manage data internally in the form of ADTG format [Active Data Table Gram Format] this is binary format.
· This is a binary standard format i.e., O/S specific, so it can transmitted only under windows network.
These all problems have been over-come under ADO.Net by introducing DataSet.
DataSet:
· Dataset can be defined as inmemory database for the client application process. This will maintain collection of tables called as data tables.
· Dataset is purely disconnected implementation with XML representation of Data storage.
56. DataAdapter?
Data Adapter will act as a mediator between dataset and database server, this will maintain collection of command objects.
Data Adapter will perform two things
· It will read Data from Database into Dataset
· It will update dataset manipulations to database sever.
57. Oracle.Net?
Oracle.Net will implement native protocol programming of oracle Database server. This provides faster communication; It will improve the performance of application.
According to M/S testing it will provide 60 to 70% performance gain over OLEDB.NET.
It is supported with Oracle 8i and later versions.
Ex:
Dim Con as new OracleConnection(“User id=Scott;password=tiger;data source=servername”)
Dim Da as new Oracle DataAdapter (“Select * from emp”,Con)
Dim Ds as new DataSet
Da.Fill(Ds,”emp”)
Ds.Tables(“emp”)
58. Datatable fill method by dataadapter?
· It will establish connection to database server.
· It will send select statement to database server using datareader. It will read record by record into dataset memory.
· It will close connection
59. When Paging with Data Grid is recommended?
Paging is a concept of maintaining dataset table information into different blocks where each block is called as page information at a time to the client. This is recommended when there is more no. of records.
60. Why DataGrid does not support paging with datasource as datareader?
Because DataReader doesn’t have a property to provide total no. of records.
61. What are the Columns in DataGrid?
· Bound Column----default
· Template column
· Edit command column.
· Button column
· Hyper link column.
62. What is Template Column in DataGrid?
This column will act as a container for placing web-server control within datagrid.
This provides two templates
· Item template (Item template will be presented when the record is in normal mode. Edit)
· Edit item template (item template will be presented when the record is in edit mode)
Using find control method can access the Control within the template column.
63. What is Typed DataSet?
A typed Dataset is a class inherited from dataset class with additional properties & methods called as strongly typed properties & methods.
Features of Typed Dataset:
· It will make developer job easier.
· It provides more clarity into application
· Data type checking will be done at compilation time.
· Primary key constraint will be applied for the dataset table if the back end table having primary key column.
Ex:
Dim Ds as new dataset------untyped dataset
Ds.Tables(“emp”)
Ds.Emp ----X
Ds.Tables(“emp”).Rows(0).Item(0)
Ds.emp(0).empn-------X
Searching Record.
Dim R as DataRow
R=Ds.Tables(“emp”).Rows.find(---)
R=Ds.Emp.FindByEmpno(--)
Class dataset1 inherits dataset
Properties..
Methods…
End class
64. What is UnTyped DataSet?
· When there is a possibility of changing the tables structure. It is not recommended to go with typed dataset because it will not be reflected on the typed dataset table. I.e.,
Dim Ds as new Dataset1
· When the method call is returning a dataset it can be ferenced by using untyped dataset.
65. What is Edit Command Column?
It is a collection of 3 buttons Datagrid
Edit itemindex-----property
· -1 --------All the rows will be proved with edit button.
· >=0-------Row will be provided with save, cancel buttons and bound columns will be provided with textboxes.
Edit Button:
· This will perform post-back, edit command event of the datagrid will be executed. This event will provide row index selected by the user. Private sub DataGrid_EditCommand(__,e __)
Response.Write(e.item.itemindex)
Datagrid1.edititemindex=e.item.Itemindex
Call fillgrid()
End sub
66. What is DataList?
· It will provide more no. of templates compared to repeater control.
· It will provide collection of styles, this styles will apply formatting for template data Header Template-----Headerstyle Item Template--------Itemstyle.
· It will provide two important properties
1. Repeat Columns
2. Repeat Directions
When user selects a button post-back will take place item command event of DataList will be executed. This event will provide button selected by the user.
Repeater Control is considered as a light weight control compared to datalist control.
67. Set of Rules for preparing XML Document?
1. XML is case sensitive
2. It supports only container tags.
3. XML supports user defined tags.
4. XML supports only one root element.
5. XML supports only 5 named entities. >,<,&,&apos,&Guot
XML as a data storage is required for two things.
· Offline storage (it will avoid database communication)
· Transmission of Data
XML used for Documents
Ordinary XML Document for Data
Well-formed XML Document for Structure +Data ---- DTD or XML Schema
68. What is XML Parser?
XML parser is software, which will act like an interpreter for XML document. There are two types of Parsers.
· DOM Parser
· SAX Parser
69. What is DOM Parser?
DOM (Document Object Model) parser will verify, complete XML document, then it will be loaded into temporary memory, in the form of hierarchical representation. Microsoft implements this in different software.
70. What is SAX Parser?
SAX (Simple API for XML) This SAX parser will provide data to the client application based on event occurrence, hence it is also called as event based parser. SunMicroSystem implements this towards JAVA.
71. How Table Tag performs?
Presentation of Data can be in Single Record Display and Multiple Record Display. In Multiple Record Display Table tag will perform number of iterations based on number of records present in the memory location. The row within thread will be considered for the first iteration.
72. Paging?
· Client Side (Table Tag)
· Server Side (Data Grid)
When there is less no. of records it is recommended to implement client side paging to reduce burden on server, When there is more no. of records downloading process will take more time & client system should have sufficient memory for maintaining the records. So it is recommended to implement server-side paging.
73. Web Assistant Wizard tool in SQL Server?
This is recommended when the static data has to be presented to the user. This will reduce burden on the webserver. When the table undergoes manipulations, It will be reflected on the web page this will be taken care by SQL-Server. This is applicable when the web server & DabaBase server are present in the same system.
Web assistant job is an application maintained by SQL Server. This will monitor database table. Changes to the table will be updated to the web page.
74. DataSet Serialization & Deserialization?
Serialization is a process of converting object in the form of a stream.
Deserialization is a process of reading the stream & constructing object.
Serialization & Deserialization is required in two cases.
· Persisting object on the hard disk memory.
· Transmitting object on the network between two systems.
Recordset supports serialization & Deserialization in terms of ADTG format. This is a binary standard towards window (O/S) Operating system.
Dataset supports serialization & Deserialization in terms of XML format, This is platform independent stream.
75. Caching?
Caching is a concept of storing frequently used data into temporary memory for faster access. This is called as optimization technique to improve the performance of the webserver.
Caching is recommended when the webpage is having database communication for presenting data of expected with more number of requests.
ASP 3.0 supports entire page caching towards client system.
ASP.Net supports 3 types of Caching
1. Output Caching.
2. Fragment Caching
3. Data Caching
76. What is Output Caching?
When the entire output of web page is stored into temporary memory then it is called as output caching.
Output Caching directive is required to implement output caching
<% @ Outputcache Duration =”N” varyByParam=”Name\parametername”
Location=”Clientserverserver and clientanyname”
VaryByCustom=--
VaryByHeader=”Accept-Language”%>
Duration will specify lifetime of the cache content. Location will specify memory area for cache content. If it is any cache, content will be maintained within web-server system. Proxy server system & client system.
VaryByCustom will accept string as browser; it will maintain cache content based on requested browser.
VaryByHeader can be used to maintain multiple cache content for a single web page based on culture.
Multiple cache content for a single web-page can be maintained using “VaryByParam” Attribute.
77. User Defined Control?
When the developer is creating a web server control than it is called as user defined control. This provides reusability.
A User Defined Control can be created in two ways.
· Webuser control
· Custom control
78. What is Web User Control?
Web user control is similar to web form it can not be accessed direectrly it requires a container as web form.
79. What are Differences between WebUser Control and Custom control?
It will be represented in the form of ASCX file.
It will be represented in the form of DLL file
It is not a compiled content. So control will not appear on the toolbox.
It is a compiled content. So it will appear on the toolbox.
It will be local to the application.
It will be global to set of applications
It supports caching
Doesn’t support caching
It doesn’t support scratch level control creation.
It supports scratch level control creation.
80. How many types of layout web form supports?
Web form supports two types of layouts
· Grid lay-out
1) Grid layout will support absolute positioning of controls.
2) In Flowlayout controls will be placed one after another.
· Flow lay-out
1) Web user control supports only flow layout.
2) Gridlayout can be implemented using gridlayout panel of HTML server Control.
81. What is Caching WebUser Control?
When the WebUser control is having Database communication, in terms of reading data then it is recommended to apply caching. This can be implemented by output cache directive.
When the caching is applied for webuser control and webpage the webpage duration will be given to webuser control.
82. What is Fragment Caching?
When the caching is applied to different portions of the web page then it is called, as fragment caching each portion of the web page is a webuser control.
83. State Management?
· Session
· Application
· Cache [Data Caching]
Session Memory:- When Client makes a Ist request to the application ASP.Net runtime will allocate a block of memory unique to the client. This memory is called as session memory. This memory will be maintained with the time-out of 20minutes.
“Session Object” can be used to access session memory from ASP.Net webpage.
Ex. SessionObject
1) Add(key,value)
Session.Add(“A”,100)
Or
Session(“A”)=100
A=100.
2) Remove(key)
3) Abandon() It will be close session.
4) TimeOut
5) SessionID
84 Session Tracking?
It is a concept of identifying session belonging to the client. This is implemented based on inmemory cookie concept. Webserver-àSessionàRequires unique identificationàSessionId.(120 bit number(15bytes)), 2120 Unique sessionID’s will be maintained.
Web server will provide session Id to the client browser in the form of inmemory cookie.
When it comes to subsequent request client will submit session ID to the web server based on this session belonging to the client will be identified.
85. Application Memory?
When the Ist client, lst request comes to the application ASP.Net runtime will allocate a block of memory. This memory is called as the “Application Memory”.
This memory will be common to all the clients. This memory will be maintained till the application is running under worker process.
Application object can be used to access application memory for ASP.Net webpag.
Methods:-
1. Add(key,value)
Application.Add(“A”,100) or Application(“A”)=100
2. Remove (key)
3. Lock()
4. Unlock()
Each client request to the webserver is considered as a “Thread”.
Equal processor time will be provided for all the threads.
When one than more thread is accessing application memory data it will provide improper result.
This can be overcome through the synchronization of threads.
This can be implemented using lock & unlock methods.
86. Session and Application Events?
Session Events:-
1. Onstart
2. OnEnd
Onstart:- Onstart Event procedure will be executed when the session is created.
OnEnd:- OnEnd event procedure will be executed when the session is closed.
Application Events:-
1. OnStart ----------from ASP 3.0
2. OnEnd -----------from ASP 3.0
3. Begin Request – new in ASP.Net
4. End Request ----new in ASP.Net
BeginRequest & EndRequest will be executed towards each client request.
These event procedures has to be placed within a special file called as global.asax
87. Session and Application Events?
When the memory varial is stored into caching object i.e, temporary memory, then it is calledas the “DataCaching”.
This variable will be common to all the users. It will provide application level state.
This is similar to application memory.
Datacaching is an enhancement over application memory under ASP.Net
88.Differences between Application Memory and Data Caching?
It is not a thread safe where the locking has to be applied explicitly.
It is a thread safe where the locking will be applied implicitly
It will apply lock to all the variables
It will apply lock to the variable under editing only
It doesn’t support expiry polity
It supports the expiry policy
89. Expiry Policy?
1. File Based expiry or filebased dependency
When the cache variable life is based on Timestamp of the file then it is called as the filebased expiry
2. Timebased expiry or Timebased dependency
· Absolute Time Expiry (From the time of storage)
· Sliding Time Expiry (From the time of Last Access)
Create a web application, which has to display products information from Access Database. This information has to be refreshed at a regular interval of 5 minutes.
Create a web application to maintain global message. The message has to be maintained with the timeout of 5minutes.
90. Configuratio Setting?
· Session Mode
· Session Timeout
· Culture
The properties of webapplicatio based on which the bahaviour of the web-application will take place.
This properties are called as configuration settings.
Microsoft is providing default settings i.e. properties for web application with in Machin.config file. This file comes with the installation of .Net framework.
C:\WinNT\Microsoft.Net\framework\v1.1.4322\config.
The developer of the web application can change the settings by providing web.config.
ASP 3.0 supports only web server level setting. It doesn’t support application level settings.
This problem has been overcome under ASP.Net by supporting webserver level settings i.e, Machine.config & application lvel settings i.e., web.config.
ASP.Net supports inheritance based configuration settings.
91. Customer Error Setting?
When the developer is providing a webpage towards error then it is called as customError page.
This can be provided using custom errors settings under web.config purpose of custom error page is providing user-friendly message.
DefaultRedirect=”CommonErrorPage”>
If mode is ‘On’ Custom error pages will be provided for localhost client & remote client.
If it is’Off’ custom errors will be disabled.
If it is ‘RemoteOnly’ custom error page will be presented for remote client & local host client will be provided with built in error page.
This option is useful when the website is live website.
Error Numbers:-
· 400 ----------à Bad Request
· 401-----------à UnAuthorized Access
· 404-----------à Resource Not found
92. Enhancements to Session State?
· Process Independent Session
· Cookieless session
· Optimization of Session state
93. Process Dependent Session?
When the session is maintained within application domain under worker process than it is called as process dependent session.
The problems with process dependent session are.
· It does not provide reliability when the application domain is recycled sessions will be lost. The application domain will be recycled when you save web.config or Restarting web-server.
· It does not provide solution for web forming Web forming is a concept of grouping collection of websites as a one unit. The website will be running under different web-servers.
This will be implemented as part of load balancing.
When user is navigating from one website to another website A common session can’t be maintained i.e., a single session can’t be maintained.
Asp 3.0 supports only process dependent session. The solution for above problem will be maintaining data within a file or database server. Temporarily, this requires manual coding. This manual coding is avoided in ASP.Net by supporting process independent session.
94. Process Independent Session?
When the session is maintained external to the worker process then it is called as “Process Independent Session or OutProcessSession.
The external process can be state server or SQL server.
95. State Server?
State server will maintain Data as a inmemory storage. This comes with the installation of .Net Framework. As a service for the operating system.
Start-àRun-àServices.mscàOK
When the state server is restarted sessions will be lost. When the requirement is more reliability then goes with SQL server. This requires more financial investment
96. SQL Server?
It will maintain session data as a persistant storage in the form of table.
Microsoft is providing Transact SQL file called “Install persist SQLstate.sql” this comes with .Net framework installation.
When you execute this file it will configure SQL – server with Database, table & stored sub-programs required for maintaing session state i.e., session Data.
Sql file can be executed in two ways
· Ostart.exe command prompt utility.
· QueryAnalizer of SQL-server
97. How many types of Sessions ASP.Net supports?
1. InProcess
2. StateServer
3. SQLServer
Inprocess will provide better performance.
Sql server provides more reliability
ASP & ASP.Net can not maintain common session for the client.
98. What is Cookieless Session?
When the client disable cookies with the browser the session will not be maintained for the client. In ASP 3.0 developer has to perform manual coding for maintaining client-data.
This problem has been overcome in ASP.Net by supporting cookieless session.
The session Id will be provided to the client browser in the form of Query string by appending to the URL this called as cookieles session.
Sessionstate App---àWeb.Config--à
The problem with cookieless session is when client changes URL session ID will be lost.
This makes a new session will be created for the client towards next request.
99. What is Impersonation in ASP.Net Security?
When client makes a request to the web-server, web-server will attach a user-account to the client request based on this user account webpage processing will take place & resources will be accessible on the network.
The default user account will bbe “IUSR_SYSTEMNAME”
Ex: IUSR_srini.
This is a guest user account provided by the operating system.
When this user account is changed then it is called as the “Impersonation”
This can be implemented through web.config using “identity tag”
*Web.config
100. Authentication & Authorization?
It is a process of getting credentials of the clients. The credentials includes username, password, security token.
Authorization:-
It is a process of verifying credentials to provide access to requested web.page.
ASP.NET is supporting 3 types of Authentication.
1. Windows based Authentication
2. Forms based Authentication
3. Passport Authentication
101. What is Windows Based Authentication?
When the client is authenticated based on network level login parameters then it is called as windows based authentication.
This is applicable only towards Internet based implementation i.e., private web site of the organization.
102. What is Forms Based Authentication?
When the user is authenticated based on custom login page by verifying with database server, then it is called as forms based authentication. This is applicable for intranet based & Internet base implementation.
Web server will issue security token to the client as an identity of an authenticated client.
The client should submit security token for subsequent request.
Forms authentication class has following methods:
· Redirect form login page
· GetAuthcookie
· GetRedirectUrl
RedirectFormLoginPage:
(Username, createpersistant)
This method will perform two things
1. It will redirect client to the requested webpage
2. It will provide security token to the client in the form of cookie
If 2nd parameter is true cookie will be persistent else InMemory.
Note: The default cookie name will be “.ASPXAuth”. The default lifetime will be provided as 50years. This can be changed according to requirement by coding.
GetAuthCookie:
This will return reference to security token cookie object.
GetRedirectUrl:
It will return url of requested webpage.
Note: When client makes a direct request to login.aspx, the client will be redirected to “default.aspx”. If it is not available it will respond with error message.
103. What is Passport Authentication?
When the client is authenticated based on passport website provided by the Microsoft then it is called as passport Authentication.
In this Authentication client will login only single time & access websites configured with passport authentication so it is called as single signon service.
To implement passport Authentication two things has to be performed.
· Provide authentication mode as passport under web.config.
· Install passport SDK within web-server system.
104. EMAIL Server?
Microsoft is providing Email server called SMTP server. [i.e, simple mail transmission protocol] This comes with the Installation on IIS.
CDONTS is supporting storing emails & retrieving Emails from SMTP server.
System.Web.Mail is supporting only storing emails.
Note:-
· Attachment can be implemented by using attach file method of new mail class.
· SMTP server will support local domain & remote domain.
Remote domain will map to another email server.
.Net--à Default SMTP virtual server, Local Domain, Remote Domain
105. What is Tracing?
Org--àWebsite--àmaintenance-àno. of cookies, monitoring clients
In ASP 3.0 developer should go with manual coding & it will be distributing to clients.
If it is a live web-site.
This problem has been overcome in ASP.Net by introducing ‘Tracing’.
Tracing is a technique to get the complete information towards client request execution. This can be classified into
1. Request Details:- Request type, Requst Time, SessionId Status code.
2. Trace Information:- It will display order of event eecution & text printed with trace class.
3. Trace class:- 1)Trace.Write(---) 2) Trace.wardn(----)
4. Control tree:- It will display all controls within the web-page all with memory size.
5. Cookie collection:- It will display all cookies information.
6. Server Variables:- It will display client & server information . This includes IP Address of client system, browser information , serve IP Address, Server software version, physical path of a site, port number of website etc.
Tracing is applicable of 2 levels,
· Page Level:- <%@ Page – Trace=”true/false”>
· Application Level:-
i. It will apply tracing for all the web pages within the application.
ii. It will provide set of options required for the live website.
iii. Application level tracing can be implemented through web.config.
Web.config--à
Note: If ‘Localonly’ is true tracing will be applied only for the local host client i.e., developer.
If pageoutput is true the client will be provided with normal page output along with tracing information.
If page output is false client will be provided with normal page output & tracing information will be stored into a file called ‘Trace.Axd’
106. What is Localization & Globalization?
Culture-à Language code ----------------- Country Code
En US English USA
Te IN Marathi-India
Hi IN Hindi-India
Fr FR France
Each culture will have its own set of standards in terms of date format, time format; calendar format currency format…
When you design an application supporting only one culture than it is called as localization.
When you design an application supporting multiple culture than it is called as globalization.
By default application will be provided with English US culture.
Globalization:- It can be implemented in two ways.
1. Designing unique website towards each culture.
2. Designing a single website for multiple cultures.
107. How to Designing Single website supporting multiple culture?
When the website content is changing from one culture to another culture in terms of set of standards i.e., date format, time, format so on then this option is recommended.
Each client request to the web server is considered as a thread by default, thread will be provided with English US culture.
This has to be changed dynamically based on culture submitted by client
108. Distributed Technology?
It is a concept of distributing services i.e., sub programs to different client applications on the network.
The advantage of maintaining services, separately from application will be reducing burden on the webserver & provides better maintenance along with security for database.
In ASP 3.0 services can be managed by MTS i.e.[Microsoft Transaction Server]
MTS will act as a container for COM component. This will provide three features as follows
· Connection Pooling:-
MTS will maintain set of active connections within block of memory called as ‘Pool Memory’.
When client makes a request the connection will be attached to the client request & communication takes place with Database server.
After the request is processed the connection will be placed back into the pool memory.
· It supports DCOM
· It supports Transaction Handling
Problem of MTS:-
The problem with MTS is it can provide services only under Microsoft environments towards only Microsoft application.
So it is not applicable for the Business to Business to communication. This problem has been overcome under .Net framework i.e., ASP.Net by supporting Web-Services.
109. What is XML Web Services?
XML + Web + Services
When you publish services with web-server with XML based date, representation for transmission than it is called as XML Web Services.
This will support heterogeneous application communication under heterogeneous platform.
Web-services can be taken with 4 things
· WSDL Web Services Description Language:- It will provide description of services with XML based arrangements, the arrangement standards is provided by “:W3C”.
· Data Representation:- It will be represented in the form of XML based formation. This is platform independent stream.
· Formatting Protocol:- SOAP(Simple Object Access Protocol). It will provide set of standards for arrangement of XML based stream the standards are provided by “W3C”.
· Transmission Protocol:-HTTP , Platform independent.
Web-services is designed based on platform independent stream i.e., XML based with open industry standards provide by “W3C”.
So Web-services is given by W3C The standards are accepted by different vendors like Microsoft, sun Microsystems..
Microsoft---------à XML Web Services
SunMicrosystem-à Java Web Services.
Oracle-------------à PL/SQL Web Services.
110. WebService Class?
When the web service requires ASP.Net intrinsic objects, it can’t be accessed directly to access directly web-service should inherit, web service class
111. XML Namespace?
A web service internally considered as a XML document. When the XML document is exchanged between two different companies it is strong recommended to provide uniqueness the ‘Tags’.
This uniqueness to be provided with XML namespace concept.
XML Namespace is a logical one to provide uniqueness for the ‘Tag’
112. WebService Attribute Class?
It will provide namespace for the web-service i.e., XML; namespace.
It will provide description for the web-service.
When the web-service has to provide database table information to the client application. The information has to be arranged in the form of dataset.
113. Caching WebMethod?
When the Web method output is stored into temporary memory than it is called as “Caching WebMethod’. This will improve the performance of the web server.
114. Wire Formats Supported by Web Service?
WireFormat:- Wire + Format
‘WireFormat’ can be defined as arrangement of data which has to be transmitted on the network from one end to another end.
Web-service supports different wire formats.
· HTTP Post
· HTTP Get
· SOAP
HTTP Post & HTTP Get will provide standards for basic data types, data arrangement.
Where as SOAP is providing standards for arranging different types of data.
*Basic DataTypes (Integer, String), Complex Type (Array), User Defined Type
115. SOAP?
(Simple Object Access Protocol). SOAP is a formatting protocol which provides set of standards for arranging request & response . This provide communication between client application & web-service.
SOAD standards are provided by W3C. So it is called as open industry standards.
SOAP standards are provided in the year 2000, The year 2000 also .NetFwBeta is released.
Client App Web Service
Proxy Stub
SOAP SOAP
HTTP <=========================è HTTP
SOAP OVER HTTP
When Client application makes a method call the request will go to proxy. Proxy will package complete method information. This includes method name, parameter names values so on.
This information will be forwarded to SOAP. SOP will encode this information into XML based arrangement called as SOAP message.
This SOAP message will be given to HTTP. HTTP will carry SOAP message on the network to the server machine.
In the web server machine an object will be created & method execution will take place. The result of the method will be given to stub.
Sub will forward result to SOAP. SOAP will encode result into XML based arrangement called as SOAP message.
This SOAP message will be given to HTTP.
HTTP will carry to client system.
SOAP Header will contain any additional information, which has to be sent with the method call.
This includes authentication information like user name, password.
SOAP Body will contain method information OR Result of the method.
SOAP Fault will contain error information.
116. Security Web Service?
· IP Address & Domain Name Restriction:- When to provide access to the webservice based on IP Address or & Domain Name of the client system than We required IP Address & Domain Name restriction Security.
· SOAP Header Security.
· SSL Secured Socket Layer
117. SOAP Header Security?
When you want to provide access to the web-service based on login parameters than apply ‘SOAP Header Security’.
Note:-
· Mustunderstand=true Soap Header information is required to access web method.
· If DidUnderstand=True SOAP will produce SOAP Body with the result of the method.
· If DidUnderstand=False SOAP will produce SOAP Fault with Error msg.
118. SSL (Secured Socket Layer)?
SSL provides secure communication between client application & web-service this is strongly recommended when the sensitive data is transmitted between client application & web service.
This secure communication can be provided through encryption & decryption.
Third party called as ‘certification authority’ will provide the encryption & decryption services.
The Well-known certification authority will be ‘verisign & Awte’ www.verisign.com/awte.com.
When the bit level is more security will be more.
The certification Authority will be charging for providing services. When you purchase a certificate from certification authority it comes with public key & private key.
This certificate has to be configured with website to implement SSL communication.
119. Configuring Website with SSL?
Note: The website configured with SSL will provide communication with ‘HTTPS’ protocol. This protocol will be working with 443-port number. The website has to be configured with SSL port number as 443.
When client makes a request to the website, web-server will send public key to the client browser when client submits data, it will be encrypted with public key, then it will be transmitted to web server. Web server will perform decryption with the matching private key than the request will be processed. Then the response will be encrypted with private key than it will be transmitted to client browser.
Browser will perform decryption with the matching public key.
120. Discovering Webservice?
Providing location of the webservice to the client.
1) Local to Application [i.e., website]
2) Global to Industry (Uddi Registry)
Local to Website:-
When you provide webserver location to the users of the website, than it is called as local to website.
The webservice information can be provided in the form of discovery file. This is an XML based content common to all the vendors (platform)
Note: Microsoft is providing a proprietary standard discovery file. This will be provided with extension .VSDISCO
A discovery file can contain only one web-service information where as VSDISCO can contain more than one web service information.
Discovery file can be placed on any web-server. It is open industry std.
Where as VSDISCO file is only supported by IIS with ASP.Net Run time.
UDDI Registry:-
(Universal Description Discovery Integration)
UDDI Registry will act as a search engine for web-services. The major contribution comes from Microsoft & IBM.
www.UDDI.org----à It will allow Registering Webservce.
It will provide webservices to client i.e., consuming webservce.
Microsoft & IBM are maintaining their own UDDI Registries. These registries are called as mirrored Registries. since they can be reflected towards each other.
121. Mobile Application?
Mobile Gateway will act as a interpreter i.e., mediator between mobile device & web-server.
This will convert mobile request into HTTP request & HTTP response into mobile device understandable code.
There are 2 Gateways.
1) WAP Gateway.
2) IMode Gateway.
WAP Gateway:- It is implemented in European countries this will support WML Content.
IMode Gateway:- It is implemented in Japan this will support CHTML content.
Mobile device will be enabled with microbrewer by integrating chip-set.
Open waves system will provide chip-set for major mobile devices this open wave system can be called as phone.com.
This like companies Nokia, Sony will produce their own chipset.
The developer has to consider following things towards mobile web-page designing.
1) Mobile devices comes with a small screen it can present 4 to 5 lines where each line can have maximum of 20 characters.
2) Mobile device comes with small amount of memory where less content to be down loaded.
3) Mobile device doesn’t support cookies.
4) There is no proper standardization of mark-up languages.
· WML --------à Wireless Markup Language
· CHTML -----à Compact HTML
· HTML 3.2
· XHTML ----à Extended HTML
· Mobile device will support, Java script & WML – script
· Mobile device goes with very slow transmission bandwidth will be 9 to 10 kbps.
WML:- It is XML based content which supports certain tags of HTML.
A WML file is called as ‘DECK’. This will contain collection of cards where each card will contain 4 to 5 lines of content.
A mobile device can present only one card at a time.
The navigation between the cards will takes place through hyperlink.
When it comes to ASP page, the developer should detect mobile device based on that markup language has to be generated.
This has to be done manually this will be complex for the developer to avoid this complexity Microsoft has provided a software under .Net framework called as ‘MMIT’ i.e., Microsoft mobile Internet Toolkit.
.Net 1.0 is not provided with MMIT. It is provided as a free download from Microsoft website.
.Net 1.1 comes with MMIT
122. Mobile Emulator?
When you want to display mobile web page on mobile device then we require mobile Emulator.
Mobile Emulator is an application which will display mobile device as a browser.
Mobile Emulator is provided as a free download from mobile device company web-site.
www.form.Nokia.com, www.SonyEricsson.com,www.Developer.openwaves.com,www.ASPNet (Mobile(Tag))
Note: Mobile Webpage can have collection of forms where each form is similar to a card in WML.
Mobile device can present only one form at a time.
123. XML Based Documentation?
When you implement 3 single guoats, quators for commenting, then it is called as XML Based Documentation.
At the time of compilation compiler will place all the XML based documentation into a separate file.
This is XML document file. This will avoid manual Documentation. So it is also called as (XML based Automatic Documentation.