PDF生成错误 [英] Error on PDF generation

查看:91
本文介绍了PDF生成错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究pdf生成,它使用itextsharp.dll成功实现。

它在当地环境下工作正常。

但是这段代码在生产服务器上无效,它会出现以下错误:



I am working on pdf generation, it is successfully implemented using itextsharp.dll.
It’s working fine on local environment.
But this code is not working on production server it gives following error:

"Error: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond"





请给我一些解决方法如何解决这个错误。



Please give me some solution how to solve this error.

推荐答案

正在执行的代码请求是同步的,你的调用在等待时会有一段时间。



让你的代码异步执行请求(查看await和async关键字) )或增加超时。在我看来,异步调用是更好的方法。
The code that is performing the request is synchronous and your call to it is suffering a time out while waiting.

Make your code performing the request asynchronous (have a look at the await and async keywords) or increase the timeout. In my opinion, the asynchronous call is the better way to proceed.


这篇关于PDF生成错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆