Nlp interview questions LEARNOVITA

40+ [REAL-TIME] Web API Interview Questions and Answers

Last updated on 26th Sep 2022, Blog, Interview Question

About author

Sanjay (Sr Big Data DevOps Engineer )

Highly Expertise in Respective Industry Domain with 7+ Years of Experience Also, He is a Technical Blog Writer for Past 4 Years to Renders A Kind Of Informative Knowledge for JOB Seeker

(5.0) | 13265 Ratings 1737

1.Why is the internet API important?

Ans:

Web API USually|is mostly} thought-about as a service that essentially provides us info or knowledge from the server. it’s important attributable to the subsequent reasons:

  • It is accustomed to offer AN interface for websites and consumer applications to possess access to knowledge.
  • It also can be accustomed to access knowledge from the information and save knowledge back to the information.

2.What is the internet API and why do we have a tendency to use it ?

Ans:

Web API (Application Programming Interface), because the name suggests, is AN API that may be accessed over the net victimization of the hypertext transfer protocol protocol. it’s essentially thought-about the simplest platform for revealing or uncovering knowledge and services to numerous completely different services. it’s a tool that may be accustomed to push knowledge to a server and may be accessed by server code. It is often engineered or developed victimization of varied technologies like java, ASP.NET, etc.Web API Uses:

  • It contains further layers that merely standardize communications and supply completely different choices on the way to format input and output.
  • It is often used with ASP.NET MVC and different types of internet applications like ASP.NET WebForms.

3.What are the most common varieties supported in internet API?

Ans:

It doesn’t have any specific knowledge. It will come with knowledge of any kind relying upon the business demand. There are several hypertext transfer protocol ways like GET, POST, PUT, etc., which might come in numerous formats relying upon the utilization case.

4.What is the distinction between internet API and WCF?

Ans:

    Web APIWCF
    It is accustomed to develop SOAP-based services and reposeful services. It’s accustomed to deploy solely SOAP-based services.
    It supports varied MVC options like routing, model binding, etc. It doesn’t support any MVC options.
    It solely supports hypertext transfer protocol protocol. It supports varied protocols like hypertext transfer protocol, UDP, custom transport.
    It is thought-about best for developing reposeful services. It supports solely restricted reposeful services.
    It is sensible once one needs to reveal a rich variety of purchasers like iPhones, browsers, mobile phones, tablets, etc. It’s sensible for making services that use expedited transport channels like communications protocol, UDP, Named pipes, etc.
    It offers support for UTF-8 coding format. It offers TEXT, Binary coding support, MTOM (Message Transmission optimisation Mechanism), etc.

5.Why to settle on an internet API over WCF?

Ans:

Web API is taken into account the simplest selection over WCF attributable to the subsequent reasons:

  • Web API uses all options of hypertext transfer protocol like URIs, request/response headers, caching, versioning, varied content formats, etc.
  • One doesn’t have to outline or make a case for any further config setting for various devices in the internet API.

6.What is completely different between REST API and reposeful API?

Ans:

    REST APIRESTful API
    REST is a subject field pattern used for making internet services. A reposeful API is employed to implement that pattern.
    The data format of REST is predicated on hypertext transfer protocol. The information format of reposeful is predicated on JSON, HTTP, and Text.
    Working of address is predicted for the asking and response. operation of reposeful is predicated on REST applications.
    It is needed to develop arthropod genus that permit interaction among purchasers and servers. It merely follows REST infrastructure that gives ability among completely different systems on the full network.
    It is additionally easy and extremely convertible to all or any business enterprises and IT. It’s too versatile.

7.What are the benefits of victimization Rest in internet API?

Ans:

REST is incredibly necessary and helpful in internet API attributable to the subsequent reasons:

  • It permits less knowledge transfer between consumer and server.
  • It is straightforward to use and light-weight. It provides additional flexibility.
  • It additionally handles and controls varied sorts of calls, returning varied knowledge formats.

8.What is REST and SOAP?

Ans:

REST and SOAP are two completely different approaches to on-line knowledge transmission. naturalistic state transfer (REST) could be a set of subject field principles. straightforward object access protocol (SOAP) is a political candidate protocol maintained by the planet Wide internet pool (W3C).

9.What is internet API two.0?

Ans:

It is essentially AN increased and changed feature of internet API. This remake supports varied new options as given below:

  • New Routing Attribute.
  • Secure ASP.NET internet API victimization OAuth two.0.
  • Support for Cross-Origin requests victimization CORS.
  • IHttpActionResult came kind.

10.Explain media kind formatters?

Ans:

In web API, media kind formatters are categories that are answerable for serialization knowledge. Here, serialization usually suggests a method of translating knowledge into a format that may be transmitted and reconstructed later. attributable to serializing request/response knowledge, internet API will perceive request information in a very higher means and send knowledge in a very format that the consumer expects. It merely specifies knowledge that’s being transferred among consumer and server in hypertext transfer protocol response or request.

11.What is Uri in API testing?

Ans:

A Uniform Resource symbol (URI) could be a compact sequence of characters that identifies AN abstract or physical resource. every URI begins with a theme name, as outlined in Section three.1, that refers to a specification for distribution identifiers among that theme.

12.Which of the subsequent ASCII text file libraries is employed by the internet API for JSON serialization?

Ans:

Json.NET library is usually employed by the internet API for JSON serialization.

13.What are XML and JSON?

Ans:

XML (Extensible Markup Language):

  • It is particularly designed to store and transport knowledge.
  • It is kind of like hypertext markup language however is additional versatile than hypertext markup language as a result of it permits users to form their own custom tags.
  • It is used for representing structured info like documents, data, configuration, etc.

JSON (JavaScript Object Notation):

  • It is a light-weight format designed to store and transport knowledge.
  • It is easier to grasp and could be a commonplace text-based format used for representing structured knowledge supported JavaScript object syntax.

14.What area unit internet API filters?

Ans:

Filters area unit essentially wont to add additional logic at completely different levels of internet API framework request process. differing types of internet API filters area unit obtainable as given below:

Authorization Filter: It handles authorization. It runs before controller action. This filter is employed to examine whether or not or not a user is attested. If the user isn’t attested, then it returns associate hypertext transfer protocol standing code 401 while not invoking the action.

15.Who will consume internet API?

Ans:

A large variety of purchasers like browsers, mobile devices, iPhone, etc., embrace or consume internet API. it’s additionally sensible for exploitation on native applications that need internet services however not SOAP support. It also can be consumed by any shopper that supports hypertext transfer protocol verbs like GET, DELETE, POST, PUT.

16.How to handle errors in internet API?

Ans:

Web API typically provides bigger flexibility in terms of handling errors. Exception handling may be a technique that wants to handle run-time errors in application code. One will use HttpResponseException, HttpError, Exception filters, register exception filters, Exception handlers to handle errors. Exception filter is wont to determine unhandled exceptions on actions or controllers, exception handlers is wont to determine any variety of unhandled exception application-wide, associated HttpResponseException is used once there’s the chance of an exception.

17.How to register associate exception filters globally?

Ans:

One will register exception filter globally exploitation following code:

  • GlobalConfiguration.Configuration.Filters.Add (new).
  • MyTest Customer Store.NotImp ExceptionFilterAttribute.

18.What is MVC?

Ans:

MVC (Model, View, associated Controller) is largely an application style model that contains 3 interconnect components I.e., model, view, and controller. It permits coders to calculate completely different parts of the appliance and update them additionally. it’s principally used for developing model user interfaces. Its main purpose is to show patterns in structure for keeping show and information separate to change each of them to alter while not touching others.

19.Write distinction between MVC and internet API?

Ans:

    MVCWeb API
    It is wont to build internet applications that reply to each information and view. It wants to build hypertext transfer protocol services that reply solely as information.
    It returns information in JSON format by exploiting JSONResult. It returns information in numerous formats like JSON, XML, etc.
    It supports content negotiation, self-hosting. It doesn’t support content negotiation, self-hosting.
    It is ineffective to create REST-full services. it’s terribly useful in making REST-full services.
    It returns a read (HTML). It returns REST responses.

20.What is the ASP.NET internet API?

Ans:

ASP stands for Active server pages. ASP.NET is associate updated version of bequest ASP. It’s a framework that’s used for developing hypertext transfer protocol services to produce responses to shopper requests. It is accessed {in completely different|in several|in numerous} applications on different platforms. It’s provided by Microsoft ASCII text file technology for developing and intense HTTP-based services on top of .NET Framework.

  • Desktop Applications.
  • Mobile Applications.
  • IOTs.
  • Browsers.

21.What area unit the benefits of exploitation ASP.NET internet API?

Ans:

Some of the core benefits of exploitation ASP.NET internet API area unit given below:

  • It provides the most effective platform for developing quiet applications on .NET Framework.
  • It works with the constant method that the hypertext transfer protocol works with to facilitate hypertext transfer protocol verbs like GET, POST, PUT, DELETE for all crud operations.

22.What area unit new options utilized in ASP.NET internet API a pair of.0?

Ans:

ASP.NET internet API includes variety of recent exciting options as given below:

  • Attribute Routing.
  • CORS (Cross-Origin Resource Sharing).
  • OWIN (Open internet Interface for .NET) self-hosting.
  • IHttpActionResult.
  • Web API OData.

23.What is the utilization of hypertext transfer protocol Response Message?

Ans:

It is wont to set response values like header and standing management. It merely permits the United States of America to figure with hypertext transfer protocol protocol. It represents hypertext transfer protocol response messages that encapsulate information and standing code.

24.What is the distinction between ApiController and Controller?

Ans:

ApiController: it wants to come back information that’s organized serial so sent to the shopper.

Controller: it’s wont to give traditional views.

25.What does one mean by Caching?

Ans:

Caching is largely a way or method of storing information somewhere or within the cache for future requests. The cache may be a temporary cargo area. Caching keeps all ofttimes or recently accessed files or information within the cache memory and accesses them from the cache itself instead of the actual address of knowledge or files. The cache interface merely improves the storage mechanism for request/response object pairs that are cached.

26.What is the kinds of Caching?

Ans:

There area unit essentially 3 sorts of caching as given below:

  • Page Caching.
  • Data Caching.
  • Fragment Caching.

27.What are the benefits of Caching?

Ans:

It is thought of the most effective resolution to confirm that information is served wherever it’s required to be served, that too at a high level of potency that is best for each shopper and server:

  • It delivers internet objects quicker to the end-user.
  • It reduces load time on the web site server.
  • It results in quicker execution of any method.
  • It decreases network prices.

28.WCF is replaced by ASP.NET internet API. True/False?

Ans:

WCF: it’s a framework used for developing SOAP (Service familiarized Applications Protocols). It additionally supports varied transport protocols as given on top of.

ASP.NET internet API: it’s a framework used for developing non-SOAP-based services. it’s restricted to HTTP-based services.

29.What area unit the most come back sorts supported in ASP. web internet API?

Ans:

It supports the subsequent come back types:

  • HttpResponseMessage.
  • IHttpActionResult.
  • Void.
  • Other sorts like string, int, etc.

30.Why rest genus Apis area unit stateless?

Ans:

Statelessness helps in scaling the genus Apis to scores of synchronic users by deploying it to multiple servers. Any server will handle any request as a result of there’s no session connected dependency. Being unsettled makes REST genus Apis less complicated – by removing all server-side state synchronization logic.

31.How will ways in which to implement?

Ans:

Routing in net API as given below:

Convention-based routing: net API supports convention-based routing. During this kind of routing, net API uses route templates to pick that controller and action methodology to execute.

Attribute-based routing: net API a pair typically supports a replacement kind of routing called attribute routing.

32.HOW to secure ASP.NET net API?

Ans:

It may be accessed by anyone United Nations agency is aware of the universal resource locator. Therefore, they need to become targets for hackers. One has to secure net API by dominant net API and by deciding United Nations agency will and United Nations agency cannot have access to net API.

33.What are parameters in API?

Ans:

API parameters unit the variable elements of a resource. They verify the sort of action you wish to require on the resource. every parameter includes a name, price sort and optional description. In easy terms, API parameters are unit choices which will be passed with the end point to influence the response.

34.What is HttpConfiguration in net API?

Ans:

It is thought of as the main category that has totally different properties which facilitate that one and override the default behavior of net API.

35.Can we have a tendency to come to read from ASP.NET net API method?

Ans:

No, we have a tendency to not read from the ASP.NET net API methodology. ASP.NET net API develops communications protocol services that give information or data. ApiController in ASP.NET MVC application solely renders information that’s serialized and sent to the shopper. One will use a controller to supply traditional views.

36.What is content negotiation in ASP.Net net API?

Ans:

Content negotiation is largely a method of choosing the most effective illustration from multiple representations that area units on the market for a given response. It merely permits one to settle on instead of talk terms content that one desires to induce in response. it’s performed at the server-side. In easy words, it chooses the most effective media sort for matters to come in response to AN incoming request.

37.Difference between communications protocol GET vs communications protocol Post?

Ans:

    HTTP GET communications protocol POST
    This methodology is employed to induce data or information from an individual server at a given universal resource locator. This methodology is employed to send information or data to individual servers.

38.What is HTTP?

Ans:

HTTP (HyperText Transfer Protocol) merely manages request-response between shopper and server. It works as a request-response protocol between shopper and server.

39.What is CORS in net API?

Ans:

CORS (Cross-Origin Resource Sharing) is largely a mechanism that enables one to form requests from one web site to a different web site in a browser that’s unremarkably not allowed by another policy known as SOP (Same Origin Policy). It supports secure cross-origin requests and information transfers among purchasers or browsers and servers. Here, cross-origin request suggests that requests coming back from totally different origins. CORS merely resolves the same-origin restriction for JavaScript. One will modify CORS for net API victimization, the individual net API package or OWIN middleware.

40.Name methodology that validates all controls on page?

Ans:

Page.Validate().

41.What parameters may be passed within the universal resource locator of API?

Ans:

Context keys, documents keys, or something that initiates API to hit the precise end-point area unit a few parameters that one will pass within the universal resource locator to outline the entire end-point.

42.What is the employment of DelegatingHandler?

Ans:

DelegatingHandler is employed to develop a custom Server-Side communications protocol Message Handler in ASP.NET net API. It’s accustomed to represent Message Handlers before routing in the net API.

43.Web API uses that library for JSON serialization?

Ans:

Json.NET library is employed by net API for JSON publishing.

44.Explain methodology to handle error victimization HttpError in net API?

Ans:

CreateErrorResponse is AN extension methodology which will be utilized in net API controller ways to come error codes and error messages. It creates AN HttpError object so wraps it within AN HttpResponseMessage object.

45.What is OData in net API?

Ans:

The Open information Protocol (OData) could be an information access protocol for the net. OData provides a regular thanks to question and manipulate information sets through CRUD operations (create, read, update, and delete). ASP.NET net API supports each v3 and v4 of the protocol.

46.What is net API?

Ans:

WebAPI could be a framework that helps you to build/develop communications protocol services.

47.Why is net API required? Is it attainable to use quiet services victimization WCF?

Ans:

Yes, we are able to still develop quiet services with WCF. However, there are 2 main reasons that prompt users to use net API rather than quiet services. net API will increase TDD (Test information Driven) approach within the development of quiet services.

48.Why choose net API?

Ans:

It is accustomed produce easy, non-SOAP-based communications protocol Services:

  • It is conjointly a straightforward methodology for creation with net API. With WCF REST Services.
  • It is supported communications protocol and straightforward to outline, expose and consume in a very REST-ful manner.
  • It is light-weight design and ideal for devices that have restricted information measures like smartphones.

49.Is it right that ASP.NET net API has replaced WCF?

Ans:

It’s not the least bit true that ASP.NET net API has replaced WCF. In fact, it’s otherwise of building non-SOAP based mostly services, i.e., plain XML or JSON string.

50.By default, net API sends communications protocol response with that of the subsequent standing code for all uncaught exceptions?

Ans:

500 – Internal Server Error.

51.What is the most important disadvantage of “Other come Types” in net API?

Ans:

The biggest disadvantage of this approach is that you simply cannot directly come across a blunder code like 404 error.

52.What is net API Routing?

Ans:

Routing is pattern matching like in MVC.

53.What is SOAP?

Ans:

SOAP is an associated XML message format utilized in net service interactions. It permits sending messages over hypertext transfer protocol or JMS, however different transport protocols will be used. It also associates XML-based electronic communication protocol for exchanging info among computers.

54.What is the good thing about mistreatment REST in net API?

Ans:

REST is employed build|to form|to create} fewer information transfers between consumer and server that make it perfect for mistreatment in mobile apps. net API additionally supports hypertext transfer protocol protocol. Therefore, it reintroduces the standard manner of the hypertext transfer protocol verbs for communication.

55.What is the foremost widely used net service API?

Ans:

REST accounts for over eightieth of all API sorts used for net services, creating it the foremost widely used net service API.

56.How will you be able to limit Access to net API to Specific hypertext transfer protocol Verb?

Ans:

Attribute programming plays a vital role. It’s straightforward to limit access to associate ASP.NET net API methodology to be known as employing a specific hypertext transfer protocol methodology.

57.Can you use the net API with ASP.NET Net Form?

Ans:

Yes, it’s doable to use net API with ASP.Net net type. because it is bundled with ASP.NET MVC framework. However, it will be used with ASP.NET net type.

58.How will assign alias names for ASP.NET net API Action?

Ans:

We can offer alias name for net API action same as just in case of ASP.NET MVC by mistreatment “ActionName” attribute as follows:

  • [HttpPost].
  • [ActionName(“SaveStudentInfo”)].
  • public void UpdateStudent(Student aStudent).

59.What is TestApi?

Ans:

TestApi could be a utility library of the genus Apis. mistreatment this library tester developer will produce testing tools and automatic tests for a .NET application mistreatment data-structure and algorithms.

60.Explain exception filters?

Ans:

It will be dead once exceptions are unhandled and thrown from a controller methodology. The explanation for the exception will be something. Exception filters can implement the “IExceptionFilter” interface.

61.How you’ll be able to come read from ASP.NET net API method?

Ans:

No, we have a tendency to not read from ASP.NET net API methodology. net API creates hypertext transfer protocol services that render information. However, it’s additionally doable in ASP.NET MVC application.

62.How to register an exception filter globally?

Ans:

It is doable to register exception filter globally mistreatment following code:

  • GlobalConfiguration.Configuration.Filters.Add(new).
  • MyTest Customer Store.NotImp ExceptionFilterAttribute());.

63.Explain what’s REST and RESTFUL?

Ans:

REST represents realistic State Transfer; it’s entirely a brand new facet of writing an online app.RESTFUL: its term written by applying REST fine arts ideas is named relaxing services. It focuses on system resources and the way the state of the resource ought to be transported over hypertext transfer protocol protocol.

64.Give American states one example of net API Routing?

Ans:

  • Config.Routes.MapHttpRoute(
  • name: “MyRoute,”//route name
  • routeTemplate: “api///”,//as you’ll be able to see “API” is at the start
  • defaults: new
  • );

65.How are you able to handle errors in the net API?

Ans:

Several categories are accessible in the net API to handle errors. they’re HttpError, Exception Filters, HttpResponseException, and Registering Exception Filters.

66.What New options come with ASP.NET net API a pair of.0?

Ans:

The latest options of ASP.NET net API framework v2.0 ar as follows:

  • Attribute Routing.
  • Cross-Origin Resource Sharing.
  • External Authentication.
  • Open net Interface web.
  • HttpActionResult.
  • Web API OData.

67.How are you able to limit access strategies to specific hypertext transfer protocol verbs in net API?

Ans:

With the assistance of Attributes (like hypertext transfer protocol verbs), it’s doable to implement access restrictions in net API.It is doable to outline hypertext transfer protocol verbs as associate attribute to limit access.

68.How are you able to pass multiple complicated sorts in the net API?

Ans:

Two strategies to pass the complicated sorts in net API – mistreatment ArrayList and Newtonsoft array.

69.Write a code for passing ArrayList in net API?

Ans:

  • ArrayList paramList = new ArrayList();
  • Category c = new class { classId = one, CategoryName =“MobilePhones”};
  • Product p = new Product { Productcode = one, Name = “MotoG”, worth = 15500, CategoryID = one };
  • paramList.Add(c);
  • paramList.Add(p);

70.Name the tools or API for developing or testing net api?

Ans:

Testing tools for net services for REST genus Apis include:

  • Jersey API.
  • CFX.
  • Axis.
  • Restlet.

71.What is REST?

Ans:

REST is a style of architecture. It outlined tips for making services that are climbable. REST used with hypertext transfer protocol protocol mistreatment its verbs GET, PUT, POST and DELETE.

72.What is resting on the web?

Ans:

Representational State Transfer (REST) is an associate style of architecture that specifies constraints, like the uniform interface, that if applied to an online service induce fascinating properties, like performance, measurability, and modifiability, that alter services to figure best on the net.

73.How will we have a tendency to limit access to strategies with specific hypertext transfer protocol verbs in net API?

Ans:

Attribute programming is widely used for this practicality. net API additionally permits limiting access of occupation strategies with the assistance of specific hypertext transfer protocol verbs. it’s additionally doable to outline hypertext transfer protocol verbs as attribute over methodology.

74.What is the usage of DelegatingHandler?

Ans:

DelegatingHandler is employed within the net API to represent Message Handlers before routing.

75.How will we have a tendency to register an exception filter from the action?

Ans:

  • We can register an exception filter from action mistreatment following code.
  • [NotImp ExceptionFilter].
  • public TestCust GetMyTestCust (int custno).

76.Tell American state the code snip to point out however we are able to come up with 404 errors from HttpError?

Ans:

Code for returning 404 error from HttpError string message = string.Format(“TestCustomer id = not found”, customerid); come Request.CreateErrorResponse(HttpStatusCode.NotFound, message);

77.Explain code snip to register exception filters from controller?

Ans:

[NotImp ExceptionFilter]

public category Test Cost Controller : Controller

78.Web API supports that protocol?

Ans:

Web App support hypertext transfer protocol protocol.

79.Which of the subsequent .NET framework supports internet API?

Ans:

Web API is supported by web four.0 version.

80.What is the end in API?

Ans:

Simply put, associate degree end is one finish of a channel. Once an associate degree API interacts with another system, the touchpoints of this communication are thought of as endpoints. For APIs, associate degree end will embrace a uniform resource locator of a server or service. The place that Apis send requests and wherever the resource lives, is termed associate degree end.

81.Explain technique to handle error victimization HttpError in internet API?

Ans:

In internet API HttpError accustomed to throw the error information within the response body. “CreateErrorResponse” technique can also be used in conjunction with this, that is the associate degree extension technique outlined in “HttpRequestMessageExtension.”

82.How to handle errors in internet API?

Ans:

Several categories are obtainable in the internet API to handle errors. they’re HttpError, HttpResponseException, Exception Filters, and Registering Exception Filters.

83.What is the advantage of WebAPI over WCF?

Ans:

WCF services use the SOAP protocol whereas protocols ne’er use SOAP protocol. That’s why WebAPI services are light-weight since SOAP isn’t used. It additionally reduces the info that is transferred to resume service. Moreover, it ne’er desires an excessive amount of configuration. Therefore, the consumer will move with the service by victimizing the protocol verbs.

84.State variations between MVC and WebAPI?

Ans:

MVC framework is employed for developing applications that have computer programmes. For that, views are used for building a computer programme. WebAPI is employed for developing protocol services. different apps also can be referred to as the WebAPI ways to fetch that information.

85.Who will consume WebAPI?

Ans:

WebAPI is consumed by any consumer that supports protocol verbs like GET, PUT, DELETE, POST. As WebAPI services don’t like any configuration, they’re terribly straightforward to consume by any consumer. In Fact, even transportable devices like Mobile devices will simply consume WebAPI, which is actually the most important blessing of this technology.

86.How will we have a tendency to confirm that the internet API returns JSON information only?

Ans:

To make the internet API arrange the returning object to JSON format and return JSON information solely. For that you simply ought to add the subsequent code in WebApiConfig.cs category in any MVC internet API Project:

  • //JsonFormatter
  • //MediaTypeHeaderValue
  • Config.Formatters.JsonFormatter.SupportedMediaTypes.Add(new MediaTypeHeaderValue(“application/json”));
  • //JsonFormatter
  • //MediaTypeHeaderValue
  • Config.Formatters.JsonFormatter.SupportedMediaTypes.Add(new MediaTypeHeaderValue(“application/json”))

87.What is ASP.Net?

Ans:

It is a framework developed by Microsoft on which we are able to develop new generation internet sites victimization internet forms(aspx), MVC, HTML, Javascript, CSS etc. There are numerous page extensions provided by Microsoft that are getting used for site development.

88.What’s the employment of Response.Output.Write()?

Ans:

We can write formatted output victimization Response.Output.Write().

89.In which event of the page cycle is the ViewState available?

Ans:

After the Init() and before the Page_Load().

90.What is the distinction between Server.Transfer and Response.Redirect?

Ans:

In Server.Transfer page process transfers from one page to the opposite page while not creating a round-trip back to the client’s browser. This provides a quicker response with a bit less overhead on the server. The purchaser’s uniform resource locator history list or current uniform resource locator Server doesn’t update just in case Server.Transfer.Response.Redirect is employed to airt the user’s browser to a different page or web site. It performs a trip back to the consumer wherever the client’s browser is redirected to the new page. The user’s browser history list is updated to replicate the new address.

91.Which validator management do you utilize if you wish to create certain values in 2 completely different controls matched?

Ans:

Compare Validator management.

92.What is ViewState?

Ans:

ViewState is employed to retain the state of server-side objects between page post backs.

93.Where the viewstate is held once the page postback?

Ans:

ViewState is held in an exceedingly hidden field on the page at consumer aspect. ViewState is transported to the consumer and back to the server, and isn’t held on the server or the other external supply.

94.How long the things in ViewState exist?

Ans:

They exist for the lifetime of this page.

95.What is Protected Configuration?

Ans:

It is a feature accustomed to secure affiliation string data.

96.How will we have a tendency to stop browsers from caching associate degree ASPX pages?

Ans:

  • Response.Cache.SetNoStore (); Response.Write (DateTime.Now.ToLongTimeString ());

97.What is the great application to implement validations in the aspx page?

Ans:

Client-side validation is the best thanks to validating information on an online page.

98.Explain role primarily based on security ?

Ans:

Role primarily based Security accustomed implement security supported roles allotted to user teams within the organization.

99.What is Cross Page Posting?

Ans:

When we click the submit button on an online page, the page posts the info to an equivalent page. The technique during which we have a tendency to post the info to completely different pages is termed Cross Page posting. This will be achieved by setting the POSTBACKURL property of the button that causes the postback. Findcontrol technique of PreviousPage is accustomed to get the denote values on the page so that the page has been denoted.

100.What is RedirectPermanent in ASP.Net?

Ans:

RedirectPermanent Performs a permanent redirection from the requested uniform resource locator to the required uniform resource locator. Once the redirection is finished, it additionally returns 301 stirred for good responses.

Are you looking training with Right Jobs?

Contact Us

Popular Courses