Bài đăng

404 error trong MVC

1. Webconfig. 2. ErrorController.cs 3. View>Error> Notfound.cshtml và  Unauthorized.cshtml Source:  https://github.com/chuchuva/Test404 Chi tiết: 1. Webconfig: a) Thêm dòng này: <customErrors mode="On" /> b) Thêm vào: <system.webServer>     <httpErrors errorMode="Custom" existingResponse="Replace">       <remove statusCode="404" />       <error statusCode="404" responseMode="ExecuteURL" path="/Error/NotFound" />       <remove statusCode="500" />       <error statusCode="500" responseMode="ExecuteURL" path="/Unauthorized" />     </httpErrors> </system.webServer> 2. ErrorController.cs         public ActionResult NotFound()         {             Response.StatusCode = 404;             return View();         }         public ActionResult Unauthorized()         {             Response.StatusCode

What is a CDN? theo http://www.rackspace.com/

Hình ảnh
The  Wikipedia entry  for CDN states: “A content delivery network or content distribution network (CDN) is a large distributed system of servers deployed in multiple data centers across the Internet. The goal of a CDN is to serve content to end-users with high availability and high performance. CDNs serve a large fraction of the Internet content today, including web objects (text, graphics and scripts), downloadable objects (media files, software, documents), applications (e-commerce, portals), live streaming media, on-demand streaming media, and social networks.” The Internet is a network of networks. To get content from a server on the other side of the planet, IP packets have to travel through a series of backbone servers and public network cables. CDNs like the Rackspace CDN [ product link ] augment the transport network by employing various techniques to optimize content delivery. It is fairly easy to see how CDNs help by looking at how the Internet works. A trace route to an

How to Use jQuery’s $.ajax() Function theo http://www.sitepoint.com/

Without any doubt  Ajax  has taken web development by storm and it’s one of the most successful paradigms ever. In my article  An Introduction to jQuery’s Shorthand Ajax Methods , I discussed some of jQuery’s most used Ajax shorthand methods:  $.get() ,  $.post() , and  $.load() . They are convenient methods for making Ajax requests in a few lines of code. Sometimes, we need more control over the Ajax calls we want to make. For example, we want to specify what should happen in case an Ajax call fails or we need to perform an Ajax request but its result is only needed if retrieved within a certain amount of time. In such situations, we can rely on another function provided by jQuery, called  $.ajax() , that is the topic of this tutorial. The  $.ajax()  Function The jQuery’s  $.ajax()  function is used to perform an asynchronous HTTP request. It was added to the library a long time ago, existing since version 1.0. The  $.ajax()  function is what every function discussed in the pre