I often see someone in the forum to program the code to implement the downloaded code in ASP.NET, and some hope to renew anything. In fact, the key is the right to permissions. B / s and C / S are not only the difference in appearance.
Download, as the name refer to the client, so it is loaded. You can't download it, it is actually "Upload 'Upload' to Client" from Server.
Some people think that "writing a" "file" you intend to download to the client, there is no problem in the C / S structure, because the C terminal is written. However, in the ASP.NET is not, the error will be popped, because there is no C side in the B / S structure to you, the S-terminal is not possible to obtain the write authority of the client hard disk, or not, the world is chaos ?
The fundamental difference between uploading and downloading is that one is "local active delivery", one is "local active". They all need one party to "take the initiative", uploading requires write permissions for remote, downloads need to be read. The current situation is that the server does not read and write the client at all, so it is actually written in B / S in the B / S.
Change a thinking, I don't want the server to actively, can I take the initiative to the client? 1, IE download function. It is most convenient to download the download in the HTTP protocol (the connection file type that IE itself can be prompted to be downloaded) This is the most convenient. You just give a super connection, a little code is not available. Limitation is only valid only for the file type that the current IE cannot open. That's why some people have some people open to open browsing, some people are prompting downloads, which is different (including components, versions, etc.). 2, JavaScript actively requests files to the server and writes from JS to the hard disk. (I have not tried it, so I don't know if I don't know) 3, the write operation is performed by the client program other than the browser. The C / S version is the same as the client, simple and what. . . What is the "client program outside the browser" in the B / S version, and you can access? ? That's right, Trojan! Put a Trojan absolutely no problem (nonsense ..) As for how to put it, it is on the other hand. . . 4, let the client threatened this IE plugin (this may be, maybe not, not you want to disguise to defraud it), this is the method of 3721 and so on. The limitations are related to the settings of the browser. If you set the corresponding automatic option, you have no way!
Therefore, completely use ASP.NET to subjectively requiring client "download" to the server, it is difficult to implement. Need to cooperate with other means