We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Save Presentation to Response


How can I save a presentation to the response?

The method as described in the following link does not exist:

I have tried the following code:
public static void SavePresentation(HttpResponse response, IPresentation presentation, string presentationName) {
//Setting the content type of the Http Response
response.ContentType = “application/vnd.ms-powerpoint”;

//Appending the header of the Http Response to contain the presentation file name
response.AppendHeader(“Content-Disposition”, string.Format(“attachment; filename={0}”, presentationName));

MemoryStream ms = new MemoryStream();
presentation.Save(ms, SaveFormat.Pptx);


Unfortunately this code don’t work…I get a "System.Threading.ThreadAbortException"

Best regards
Denoshan Rajasingam

Hi Denoshan Rajasingam,

Thanks for inquiring Aspose.Slides.

I have observed your requirements and like to share that shared URL is for Presentation.Save() overload for saving presentation to response stream as shared in attached image. However, in your sample code you are using Presentation.Save() overload which saves to stream. When you save to stream, you need to set the position of stream to 0 before using that.

ms.Position = 0;
You may please check the two overloads and select the appropriate one. If there is still an issue then please provide a working sample project reproducing issue on your end. We will use that to help you further in this regard.

Many Thanks,
Hi Mudassir Fayyaz

How can I call the "Save" methode on "IPresentation": "IPresentation.Save(String, SaveFormat, ISaveOptions, HttpResponse, Boolean)"

I can't finde the implementation of this methode see attachment (SavePresentationMethodes.JPG).

Best regrads

Hi Denoshan,

I have observed the information shared by you. I like to share that the said Presentation.Save() overload is not available for Aspose.Slides for .NET ClientProfile 4 assembly. Actually, the .NET Client Profile is a subset of the .NET Framework. Client Profile doesn’t contains System.Web.dll and HttpResponse. So some API features are absent in NET4.0_ClientProfile version of Aspose.Slides. I suggest you to please try using NET 2.0 or NET 4.0 version of Aspose.Slides for .NET 17.4 on your end.

Many Thanks,

Hi Mudassir

Thanks for your reply.

Can you describe this somewhere in the documentation, because I have now lose a lot of time with the analysis of the problem.

Will the function be supported again in a next version?
As I've seen, it seems to work for Aspose.Words and Aspose.Cells ...

Unfortunately, we can't work with Runtime 2.0, so this feature should be available on Runtime 4.0.

Thanks and Greetings

Hi Denoshan,

I am sorry for your inconvenience. I have discussed with our product team and we will try to improve the documentation on our end. Unfortunately, this is not going to get fixed for .NET Client Profile owing to already mentioned limitation of .NET Client Profile. However, I have added an issue with ID SLIDESNET-38913 in our issue tracking system to consider the improvement of API documentation on our end to mention the supported assemblies for any specific methods.

Many Thanks,