C#實(shí)現(xiàn)從服務(wù)器上下載DLL文件,具體代碼如下:
var fullQualifiedPathToDll = Server.MapPath("/") + "/bin/mydll.dll";
var myFileStream = new FileStream(fullQualifiedPathToDll, FileMode.Open);
var fileSize = myFileStream.Length;
var buffer = new byte[(int)FileSize];
myFileStream.Read(buffer, 0, (int)FileSize);
myFileStream.Close();
Response.BinaryWrite(buffer);
更多信息請(qǐng)查看IT技術(shù)專欄