Click here to Skip to main content
15,911,707 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: embed hyperlink in some other site Pin
S.Aijaz9-Oct-09 21:24
S.Aijaz9-Oct-09 21:24 
QuestionHow can I build image view counter for my ASP.net application? Pin
Bikash Shaw9-Oct-09 10:49
Bikash Shaw9-Oct-09 10:49 
AnswerRe: How can I build image view counter for my ASP.net application? Pin
N a v a n e e t h9-Oct-09 19:07
N a v a n e e t h9-Oct-09 19:07 
GeneralRe: How can I build image view counter for my ASP.net application? Pin
Abhijit Jana9-Oct-09 21:06
professionalAbhijit Jana9-Oct-09 21:06 
GeneralRe: How can I build image view counter for my ASP.net application? Pin
N a v a n e e t h9-Oct-09 21:14
N a v a n e e t h9-Oct-09 21:14 
GeneralRe: How can I build image view counter for my ASP.net application? Pin
Bikash Shaw9-Oct-09 21:30
Bikash Shaw9-Oct-09 21:30 
GeneralRe: How can I build image view counter for my ASP.net application? Pin
N a v a n e e t h9-Oct-09 21:41
N a v a n e e t h9-Oct-09 21:41 
QuestionAPS.Net 2.0 Large File Download Pin
Are Jay9-Oct-09 7:11
Are Jay9-Oct-09 7:11 
I have a pre-existing web application that moves files through HTTPS protocol between client and server. I have create an AJAX upload ( over 2 years ago so my knowledge of AJAX at the time was limited). Now I am re-visiting the application because I used the traditional methods for downloading a file ( code snippet below ). We have noticed that downloads of files that exceed 1 gig are killing our web server.

My questions are:
  -How to handle a chunked downloads so I am not loading every bit into memory then sending it.
  -Has anyone used a purchased asp.net control that handles both Uploads/Downloads of large file(s) that they would recommend using.
try
{
  if (File.Exists(fullFilePath))
  {
    using (StreamReader _streamReader = new StreamReader(fullFilePath))
    {
      using (Stream _stream = _streamReader.BaseStream)
      {
        Response.Clear();
        Response.AddHeader("content-disposition", 
          String.Format("attachment;filename={0}", Path.GetFileNameWithoutExtension(fullFilePath)));
        Response.Charset = "";
        Response.Cache.SetCacheability(HttpCacheability.Public);
        Response.ContentType = DataAccess.GetMIMEType(Path.GetExtension(fullFilePath));
        Response.BufferOutput = false;

        byte[] _buffer = new byte[1024];
        int _counter = _stream.Read(_buffer, 0, 1024);
        while (_counter > 0)
        {
          Response.OutputStream.Write(_buffer, 0, 1024);
          _counter = _stream.Read(_buffer, 0, 1024);
        }

        Response.End();

      }
    }
  }
}
catch (Exception)
{ }


All comments will be helpful and appreciated, thank you.

I'm listening but I only speak GEEK.

AnswerRe: APS.Net 2.0 Large File Download Pin
Not Active9-Oct-09 8:43
mentorNot Active9-Oct-09 8:43 
AnswerRe: APS.Net 2.0 Large File Download Pin
AlexeiXX39-Oct-09 9:18
AlexeiXX39-Oct-09 9:18 
GeneralRe: APS.Net 2.0 Large File Download Pin
Are Jay9-Oct-09 10:07
Are Jay9-Oct-09 10:07 
GeneralRe: APS.Net 2.0 Large File Download Pin
AlexeiXX39-Oct-09 10:12
AlexeiXX39-Oct-09 10:12 
GeneralRe: APS.Net 2.0 Large File Download Pin
Are Jay9-Oct-09 10:33
Are Jay9-Oct-09 10:33 
QuestionConfiguration of Persistence Layer exception using Nhibernate Pin
Chris Del Checcolo9-Oct-09 2:22
Chris Del Checcolo9-Oct-09 2:22 
AnswerRe: Configuration of Persistence Layer exception using Nhibernate Pin
Chris Del Checcolo9-Oct-09 2:39
Chris Del Checcolo9-Oct-09 2:39 
GeneralRe: Configuration of Persistence Layer exception using Nhibernate Pin
dinger219-Oct-09 7:08
dinger219-Oct-09 7:08 
GeneralRe: Configuration of Persistence Layer exception using Nhibernate Pin
Chris Del Checcolo9-Oct-09 7:19
Chris Del Checcolo9-Oct-09 7:19 
Questionpicture from database Pin
dominic kMalisa9-Oct-09 2:15
dominic kMalisa9-Oct-09 2:15 
AnswerRe: picture from database Pin
Abhijit Jana9-Oct-09 9:09
professionalAbhijit Jana9-Oct-09 9:09 
AnswerRe: picture from database Pin
AlexeiXX39-Oct-09 9:19
AlexeiXX39-Oct-09 9:19 
QuestionHow we Display Progressbar on FileUpload Control in Asp.Net Pin
lrsalunkhe9-Oct-09 2:14
lrsalunkhe9-Oct-09 2:14 
AnswerRe: How we Display Progressbar on FileUpload Control in Asp.Net Pin
Abhijit Jana9-Oct-09 9:11
professionalAbhijit Jana9-Oct-09 9:11 
GeneralRe: How we Display Progressbar on FileUpload Control in Asp.Net Pin
AlexeiXX39-Oct-09 9:23
AlexeiXX39-Oct-09 9:23 
GeneralRe: How we Display Progressbar on FileUpload Control in Asp.Net Pin
Abhijit Jana9-Oct-09 10:08
professionalAbhijit Jana9-Oct-09 10:08 
GeneralRe: How we Display Progressbar on FileUpload Control in Asp.Net Pin
AlexeiXX39-Oct-09 10:15
AlexeiXX39-Oct-09 10:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.