本文介绍了建立SSL/TLS安全通道的信任关系.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想将数据导出为pdf.
为此,我这样写了
I want to export data to pdf.
for that i wrote like this
protected void btnExportToPDF_Onclick(object sender, EventArgs e)
{
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "attachment;filename=ExportPDF.pdf");
Response.Cache.SetCacheability(HttpCacheability.NoCache);
StringWriter sw = new StringWriter();
HtmlTextWriter hw = new HtmlTextWriter(sw);
Table3.RenderControl(hw);
lblMessbody.RenderControl(hw);
StringReader sr = new StringReader(sw.ToString());
Document pdfDoc = new Document(PageSize.A4, 10f, 10f, 100f, 0f);
HTMLWorker htmlparser = new HTMLWorker(pdfDoc);
PdfWriter.GetInstance(pdfDoc, Response.OutputStream);
pdfDoc.Open();
htmlparser.Parse(sr);
pdfDoc.Close();
Response.Write(pdfDoc);
Response.End();
}
在上面的下划线句子中,我收到了一些类似这样的错误消息
基础连接已关闭:无法为SSL/TLS安全通道建立信任关系.
in the above underline sentence i got some error message like this
The underlying connection was closed: Could not establish trust relationship for the SSL/TLS secure channel.
推荐答案
这篇关于建立SSL/TLS安全通道的信任关系.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!