Click here to Skip to main content
15,890,506 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: asp.net ValidatorCalloutExtender unhandled exception error Pin
murali_utr20-Aug-14 4:19
murali_utr20-Aug-14 4:19 
Questiondisappearing cookies Pin
Ali Al Omairi(Abu AlHassan)18-Aug-14 2:13
professionalAli Al Omairi(Abu AlHassan)18-Aug-14 2:13 
SuggestionRe: disappearing cookies Pin
ZurdoDev18-Aug-14 8:33
professionalZurdoDev18-Aug-14 8:33 
GeneralRe: disappearing cookies Pin
Ali Al Omairi(Abu AlHassan)18-Aug-14 21:01
professionalAli Al Omairi(Abu AlHassan)18-Aug-14 21:01 
QuestionCompare 2 tables Pin
byka18-Aug-14 1:56
byka18-Aug-14 1:56 
QuestionRe: Compare 2 tables Pin
ZurdoDev18-Aug-14 8:32
professionalZurdoDev18-Aug-14 8:32 
AnswerRe: Compare 2 tables Pin
Andy_L_J28-Aug-14 0:38
Andy_L_J28-Aug-14 0:38 
QuestionDownloading multiple pdf files in a Zip is not working Pin
Member 1048246516-Aug-14 2:19
Member 1048246516-Aug-14 2:19 
Hi,

I want to download multiple pdf files in a single button click. I am using an open source dll, Ionic.Zip.Reduced.dll.
All code runs with out showing any errors or exceptions. By using Response.End(), I am getting a response in firefox's firebug window but when I use it in my application it throws an exception and not showing any download dialogue box. So, I had changed it to HttpContext.Current.ApplicationInstance.CompleteRequest();. Now the exception is gone, but I am not getting any response and dialogue window to download. When I debugged, I found something like this
:ClientDisconnectedToken = 'context.Response.ClientDisconnectedToken' threw an exception of type 'System.PlatformNotSupportedException'
:base {System.NotSupportedException} = {"This operation requires IIS version 7.5 or higher running in integrated pipeline mode."}

What is the real problem here, I could download files in zip by using the same code for a new project.

Please help me to sort this out. Here is my code:

System.Web.HttpContext context = System.Web.HttpContext.Current;
using (ZipFile zip = new ZipFile())
{
zip.AlternateEncodingUsage = ZipOption.AsNecessary;
zip.AddDirectoryByName("PDFs");

foreach (string item in FilePaths)
{
zip.AddFile(item.ToString(), "/PDFs/");
}
context.Response.Clear();
context.Response.BufferOutput = false;
//context.Response.Buffer = true;
context.Response.ClearHeaders();
context.Response.ClearContent();
string zipName = String.Format("Zip_{0}.zip", DateTime.Now.ToString("yyyy-MMM-dd-HHmmss"));
context.Response.ContentType = "Application/zip";
context.Response.AppendHeader("content-disposition", "attachment; filename=" + zipName);
zip.Save(Response.OutputStream);
//Response.Redirect("www.google.com", true);
context.Response.Flush();
context.Response.SuppressContent = true;
context.ApplicationInstance.CompleteRequest();

//Response.End();
}


Thanks in advance

Sarath Raj
AnswerRe: Downloading multiple pdf files in a Zip is not working Pin
Afzaal Ahmad Zeeshan17-Aug-14 2:43
professionalAfzaal Ahmad Zeeshan17-Aug-14 2:43 
GeneralRe: Downloading multiple pdf files in a Zip is not working Pin
Member 1048246518-Aug-14 2:36
Member 1048246518-Aug-14 2:36 
GeneralRe: Downloading multiple pdf files in a Zip is not working Pin
Member 1048246518-Aug-14 2:45
Member 1048246518-Aug-14 2:45 
Questionscrape table from web page Pin
Mahmoud198716-Aug-14 1:41
Mahmoud198716-Aug-14 1:41 
QuestionSyntax error near INSERT INTO Pin
Otekpo Emmanuel15-Aug-14 23:05
Otekpo Emmanuel15-Aug-14 23:05 
AnswerRe: Syntax error near INSERT INTO Pin
Wombaticus15-Aug-14 23:21
Wombaticus15-Aug-14 23:21 
GeneralSolved: Syntax error near INSERT INTO Pin
Otekpo Emmanuel16-Aug-14 3:17
Otekpo Emmanuel16-Aug-14 3:17 
AnswerRe: Syntax error near INSERT INTO Pin
Sibeesh KV29-Sep-14 1:34
professionalSibeesh KV29-Sep-14 1:34 
QuestionHow to avoid duplicate data insertion in.net???? Pin
Member 1086700215-Aug-14 22:06
Member 1086700215-Aug-14 22:06 
AnswerRe: How to avoid duplicate data insertion in.net???? Pin
Afzaal Ahmad Zeeshan17-Aug-14 2:48
professionalAfzaal Ahmad Zeeshan17-Aug-14 2:48 
AnswerRe: How to avoid duplicate data insertion in.net???? Pin
NishantRaval27-Aug-14 23:32
NishantRaval27-Aug-14 23:32 
AnswerRe: How to avoid duplicate data insertion in.net???? Pin
Sibeesh KV29-Sep-14 1:36
professionalSibeesh KV29-Sep-14 1:36 
Questionhow to enable false of iframe page in asp.net not display false by jquery and css? Pin
kp 77715-Aug-14 4:54
professionalkp 77715-Aug-14 4:54 
AnswerRe: how to enable false of iframe page in asp.net not display false by jquery and css? Pin
ZurdoDev15-Aug-14 5:28
professionalZurdoDev15-Aug-14 5:28 
QuestionRequiredfield validator is not working Pin
murali_utr14-Aug-14 18:47
murali_utr14-Aug-14 18:47 
AnswerRe: Requiredfield validator is not working Pin
ZurdoDev15-Aug-14 5:29
professionalZurdoDev15-Aug-14 5:29 
QuestionHow to display certain records if user's search comes up empty? Pin
samflex14-Aug-14 6:20
samflex14-Aug-14 6:20 

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.