Preventing the chain download problem often contains something on the network, sometimes it is directly to copy a similar http://193.100.100.56/testwebsolution/webapplication1/testwebsolution/webapplication1/testwebsolution/webapplication1/test.rar address is ready to download the Test.rar file, but is notified without login or Directly jump to other pages, then download the file directly after logging in. To achieve the above situation, it is easier in the .NET world. 1. First create a class library project ClassLibrary1, implement it as follows: use system; use system.Web; // Reference System.Web Component Namespace ClassLibrary1 {public class myHandler: httphandler {public myhandler () {} #region IHttpHandler members public void ProcessRequest (HttpContext context) {// jump to WebForm1.aspx, the output rar WebForm1.aspx file HttpResponse response = context.Response; response.Redirect ( "http://193.100.100.56/TestWebSolution/WebApplication1/ Webform1.aspx ");} public bool isreusable {get {// Todo: Add myHandler.Isreusable getter implementation return true;}}}} #endregion}} 2, create the Web project WebApplication1 for testing.
Add the following nodes in the configuration file web.config file node: