FTP handler page, call string from aspx help with method to initialize handler page

前端 未结 1 367
我寻月下人不归
我寻月下人不归 2020-12-12 06:14

Hey guys, tryed to clean up my last post so here it goes.

I have a handler page in my asp.net project that is \"trying\" to handle a ftp download request.

Ge

相关标签:
1条回答
  • 2020-12-12 06:42
    • You need to pass PhotoPath to the ASHX handler using the querystring. You should then read the parameter from the querystring and pass it to WebRequest.Create
    • You should not swallow exceptions
    • You don't need to clear the response
    • You should copy the FtpWebResponse directly to the HttpResponse; you don't need an intermediate MemoryStream
    • The ContentType property tells the browser what kind of file you're sending. See http://en.wikipedia.org/wiki/MIME_type
    0 讨论(0)
提交回复
热议问题