Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

An Error Occurred during Submit Process. Cannot Process content of type text/html


Level 2

Hello All,

I am submitting the form data to server using HTTP submit button. I am stuck in a weird situtation:

When I fill the form and click submit and my Firefox is open than I get this error "An Error Occurred during Submit Process. Cannot Process content of type text/html". However the data get submit to server and stores into the DB

If Firefox is closed then I get Confirmation (echo) via IE.

I tried everything but some how I am not able to figure out this problem.

Can any one please guide me or tell where I am going wrong?



1 Reply


Former Community Member

It is expecting PDF contents in return from server. Even if your return type is empty.

You can put a pdf file on server and simply use Page.Response.Redirect("success.pdf");
If you are using C# then following MemoryStream can be return

  private MemoryStream CreatePDFStream(string text)


            var pdfMemoryStream = new MemoryStream();



               //Create new PDF runtime OR read a saved PDF from server.

                Document document = new Document();

                PdfWriter.GetInstance(document, pdfMemoryStream)

                        .CloseStream = false;


                document.Add(new Paragraph(text));


                byte[] byteInfo = pdfMemoryStream.ToArray();

                pdfMemoryStream.Write(byteInfo, 0, byteInfo.Length);

                pdfMemoryStream.Position = 0;


                if (WebOperationContext.Current != null)


                    WebOperationContext.Current.OutgoingResponse.ContentType = "application/pdf";


                return pdfMemoryStream;


            catch (Exception ex)


                return pdfMemoryStream;