Free Source Code and Articles
Submitted by:jagan nath
8/19/2023 12:00:00 AM
jab tak hai jaan, jane jaah mein nachugi&nb
Submitted by:sushant Gawas
11/24/2014 12:00:00 AM
Clickjacking, also known as a "UI redress attack", is when an attacker uses multiple transparent or opaque layers to trick a user into clicking on a button or link on another page when they were intending to click on the the top level page. Thus, the attacker is "hijacking" clicks meant for their page and routing them to another page, most likely owned by another application, domain, or both.
Using a similar technique, keystrokes can also be hijacked. With a carefully crafted combination of stylesheets, iframes, and text boxes, a
1/5/2014 12:00:00 AM
8/17/2013 12:00:00 AM
1. Can you describe ASP.NET MVC Request Life Cycle?
Ans. There are two answers for the question.
Short Answer: Following are the steps that are executed in ASP.NET MVC Request
I. Receive request, look up Route object in RouteTable collection and create
II. Create RequestContext instance.
III. Create MvcHandler and pass RequestContext to handler.
IV. Identify IControllerFactory from RequestContext.
V. Create instance of class that implements ControllerBase.
VI. Call MyController.Execute method.
VII. The ControllerActionInvoker determines which action to invoke on the controller
and executes the action on the controller, which results in calling the model and
returning a view.
Detailed Answer: There are five main steps occurs in ASP.NET Request Life
I. Initialize Application (Route table is created)
Desc. When we request a page from a normal ASP.NET application, there is a
physical copy of page on the disk that is corresponds to each page request. In
ASP.NET MVC, there is no page on the disk that corresponds to the request.
Request is routed to the controller. The controller is responsible for generating page
that is sent back to the browser.
ASP.NET MVC has Route Table which stores mapping entries of particular URLs to
action methods of contoller. i.e. URL “http://jinaldesai.net/Articles/CSharp” maps to
the “CSharp” method of “Articles” controller.
In ASP.NET MVC application like normal ASP.NET application when application
starts first time, it calls Application_Start() application event from Global.asax. Route
table is registered(created) from Appication_Start() event.
II. Routing Mechanism (UrlRoutingModule intercepts the request)
When a request is coming to ASP.NET MVC application, the request is intercepted
by UrlRoutingModule HTTP Module. The first thing the module does is to wrap up the
current HttpContext in an HttpContextWrapper2 object. Next, the module passes the
wrapped HttpContext to the RouteTable that was setup in the previous step, which
includes includes the URL, form parameters, query string parameters, and cookies
associated with the current request.
Next, the module creates a RouteContext object that represents the current
HttpContext and RouteData. The module then instantiates a new HttpHandler based
on the RouteTable and passes the RouteContext to the new handler’s constructor(In
ASP.NET MVC case it is MvcHandler).
Last step taken by module is setting MvcHandler as the current HTTP Handler.
III. MvcHandler Executes (Instantiate and execute controller)
In normal ASP.NET application after second step, it fires set of events including
Start, BeginRequest, PostReso
8/17/2013 12:00:00 AM
What is difference between jQuery's ready and holdReady?
.What is the use of noConflict() method in Jquery?
Share Your Source Code or Article
Do you have source code, articles, tutorials, web links, and books to share? You can write your own content here. You can even have your own blog.
Popular Source Code (Today)
Random Source Code