INTERVIEW QUESTIONS ON ASP.NET

What is the difference between ASP and ASP.NET?

Web application development in .NET with ASP.NET has evolved a great deal. The overall architecture of web applications in .Net is much more improved and robust. The enhanced features in ASP.NET make it the best available technology for web application development. The code behind the ASP.Net scripts can be in written in any .Net compliant programming language.

The script (ASP.NET scripts), logic (code behind) and presentation (view) are separated from each other so they may evolve independently. There are much more server controls now available in .Net including the standard calendar and amazingly useful data grid controls. The ASP.Net web applications can now use .NET assemblies and COM components to serve the client requests.

ASP.NET pages are now compiled contrary to the ASP pages which are interpreted by the ISA server. Truly speaking, there is no comparison between ASP and ASP.NET... ASP.NET simply rules!

What is ASP.NET?

ASP.NET is a powerful programming platform for developing web-based applications and services. It comes with rich set of web controls to create dynamic, fast and interactive web pages. Web pages built using ASP.NET are called ASP.NET web pages or web forms. ASP.NET simplifies web development by using WYSIWYG (what you see is what you get) editors.

ASP.NET helps to build complex web applications with the use of drag and drop control support. Visual Studion.NET helps us to build web applications (ASP.NET) using either the C# or VB programming language. The following features are making developers choose ASP.NET over other technologies:

• ASP.NET applications can be designed and developed using RAD (Rapid Application Development) tools.

• ASP.NET web forms support a variety of controls and also support user created and third party controls.

• Any .NET FrameWork language can be used to develop ASP.NET applications.
• ASP.NET uses the Common Language Runtime (CLR) resource and benefits from it's features.

What is the use of Web.config file?

ASP.NET configuration files are XML-based text files. Each "web.config" file applies configuration settings to the directory it is located in and to all virtual sub directories under it.

Settings in sub directories can optionally override or modify settings specified in main 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. This ensures 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.

What are Web Services and the underlying protocol used with it?

Web Services are applications that provide services on the internet. Web services allow for programmatic access of business logic over the Web. Web services typically rely on XML-based protocols, messages, and interface descriptions for communication and access.

Web services are designed for use by other programs or applications rather than directly by end user. Programs invoking a Web service are called clients. SOAP over HTTP is the most commonly used protocol for invoking Web services.

There are three main uses of Web services. Application integration Web services within an intranet are commonly used to integrate business applications running on different platforms. For example, a .NET client running on Windows 2000 can easily invoke a Java Web service running on a mainframe or Unix machine to retrieve data from a legacy application.

Business integration Web services allow trading partners to engage in e-business allowing them to leverage the existing Internet infrastructure. Organizations can send electronic purchase orders to suppliers and receive electronic invoices. Doing e-business with Web services means a low barrier to entry because Web services can be added to existing applications running on any platform without changing legacy code.

Commercial Web services focus on selling content and business services to clients over the Internet similar to familiar Web pages. Unlike Web pages, commercial Web services target applications as their direct users.

Example, Continental Airlines exposes flight schedules and status Web services for travel Web sites and agencies to use in their applications. Like Web pages, commercial Web services are valuable only if they offer services that are needed.

It makes sense to sell real-time weather information or stock quotes as a Web service. Technology can help you add value to your services and explore new markets. However ultimately customers pay for contents and/or business services, not for technology.

How to generate a WebService proxy? What are SOAP, WSDL, and UDDI?

SOAP is an XML-based messaging protocol designed for exchanging formatted data (messages) over the Internet. Using SOAP you can send request and reply messages. SOAP is simple, easy to use, light weight and completely neutral with respect to operating systems, programming languages, and distributed computing platforms. After SOAP came into existence as a mechanism for exchanging XML messages among enterprises, a function was needed to describe the messages and how they are exchanged.

The Web Services Description Language (WSDL) is a particular form of an XML Schema. Developed by Microsoft and IBM for the purpose of defining the XML message, operation, and protocol mapping of a web service accessed using SOAP or other XML protocol. WSDL defines web services in terms of "endpoints" that operate on XML messages.

The WSDL syntax allows both the messages and the operations on the messages to be defined abstractly, so they can be mapped to multiple physical implementations. The current WSDL specification describes how to map messages and operations to SOAP 1.1, HTTP GET/POST and MIME. WSDL creates web service definitions by mapping a group of endpoints into a logical sequence of operations on XML messages. The same XML message can be mapped to multiple operations (or services) and bound to one or more communications protocols using "ports".


The "Universal Description, Discovery, and Integration" (UDDI) defines a data model (in XML). Also SOAP API's for registration and searching business information, web services that a business exposes to the Internet are also covered. UDDI is an independent consortium of vendors founded by Microsoft, IBM and Ariba. This project purpose of developing an Internet standard for web service description registration and discovery.


Microsoft, IBM and Ariba also are hosting the initial deployment of the UDDI service. This is conceptually patterned after DNS (the Internet service that translates URLs into TCP addresses).


UDDI uses a private agreement profile of SOAP (UDDI doesn't use the SOAP serialization format because it's not well suited to passing complete XML documents (it's aimed at RPC style interactions). The main idea is that businesses use SOAP APIs to register themselves with UDDI. Other businesses search the UDDI when they want to discover a trading partner.


The information in UDDI is categorized according to industry type and geographical location, allowing UDDI subscribers to search through lists of potentially matching businesses. Once a specific business is chosen, another call to UDDI is made to obtain the specific contact information for that business. The contact information includes a pointer to the target business's WSDL or other XML schema file describing the web service that the target business publishes.

What is the trace utility used for?

Using the SOAP Trace Utility

The Microsoft Simple Object Access Protocol (SOAP) Toolkit 2.0 includes a TCP/IP trace utility, MSSOAPT.EXE. You use this trace utility to view the SOAP messages sent by HTTP between a SOAP client and a service on a server. In order to use the Trace Utility, perform the following steps on the server. Open the Web Services Description Language (WSDL) file.

1) In the WSDL file, locate the element that corresponds to the service and change the location attribute for this element to port 8080.

2) Run MSSOAPT.exe.

3) File menu, New, Click "Formatted Trace" (if you don't want to see HTTP headers) or click Unformatted Trace (if you want to see HTTP headers).

4) In the Trace Setup dialog box, click OK to accept the default values.

Using the Trace Utility on Client

To see all send/receive messages from a service, do the following steps on the client.

1) Copy the WSDL file from the server to the client.
2) Modify location attribute of the element in the local copy of the WSDL document to direct the client to
localhost:8080

Make a note of the current host and port.

4) File menu, New, and either click Formatted Trace (if you don't want to see HTTP headers) or click Unformatted Trace (if you do want to see HTTP headers).

5) In the Destination host box, enter the host specified in Step 2.

6) In the Destination port box, enter the port specified in Step 2.

7) Click OK.

How do I upload a file from my ASP.NET page?

To upload a file with your ASP.NET page, you need the use of two classes:

System.Web.UI.HtmlControls.HtmlInputFile class and the System.Web.HttpPostedFile.
The HtmlInputFile class represents an HTML input control that the user will use on the client to select a file to upload.

The HttpPostedFile class represents the uploaded file. This is obtained from the .PostedFile property of the HtmlInputFile control.

RELATED POST

ASP.NET INTERVIEW QUESTIONS AND ANSWERS PART ONE

ASP.NET INTERVIEW QUESTIONS AND ANSWERS PART TWO

ASP.NET INTERVIEW QUESTIONS AND ANSWERS PART THREE

ASP.NET INTERVIEW QUESTIONS AND ANSWERS PART FOUR

ASP.NET INTERVIEW QUESTIONS AND ANSWERS PART FIVE

ADO.NET INTERVIEW QUESTIONS AND ANSWERS PART ONE

ADO.NET INTERVIEW QUESTIONS AND ANSWERS PART TWO

You can also learn the concept of frame work concept in detail with questions and answers in the following place.

MICROSOFT DOT NET FRAME WORK QUESTIONS AND ANSWERS PART ONE

MICROSOFT DOT NET FRAME WORK QUESTIONS AND ANSWERS PART TWO

MICROSOFT DOT NET FRAME WORK QUESTIONS AND ANSWERS PART THREE

MICROSOFT DOT NET FRAME WORK QUESTIONS AND ANSWERS PART FOUR

MICROSOFT DOT NET FRAME WORK QUESTIONS AND ANSWERS PART FIVE

MICROSOFT DOT NET FRAME WORK QUESTIONS AND ANSWERS PART SIX

MICROSOFT DOT NET FRAME WORK QUESTIONS AND ANSWERS PART SEVEN

MICROSOFT DOT NET FRAME WORK QUESTIONS AND ANSWERS PART EIGHT

MICROSOFT DOT NET FRAME WORK QUESTIONS AND ANSWERS PART NINE

MICROSOFT DOT NET FRAME WORK QUESTIONS AND ANSWERS PART TEN

No comments:

Post a Comment