使用iTextShap->“远程服务器返回错误:(500)内部服务器错误." HTML包含图片时 [英] Using iTextShap-->"The remote server returned an error: (500) Internal Server Error." when the HTML contains images

查看:92
本文介绍了使用iTextShap->“远程服务器返回错误:(500)内部服务器错误." HTML包含图片时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

海,
我正在使用iTextSharp将HTML转换为PDF.如果HTML中没有图像,则可以正常工作.但是,如果存在图像,则表示它抛出错误远程服务器返回错误:(500)内部服务器错误.".内部访问时不会出现此错误.但是如果启用Web访问.请帮助我解决这个问题.

谢谢.

Hai,
Am using iTextSharp for converting HTML to PDF. It''s working if there is no images in HTML. But if an image is present means it''s throwing an error "The remote server returned an error: (500) Internal Server Error.". This error is not coming when we accessing internally. But if enable the web access. Please help me to over come this issue.

Thank You.

推荐答案

错误为500时,表示内部错误,表示服务/网络访问内部-服务/网络被抛出未被捕获的异常.
查看服务器上的 Windows事件日志,看看出了什么问题.

另外,请尝试:
-转到IE中的菜单工具/Internet选项".
-单击高级"选项卡上的取消选中显示友好的HTTP错误消息"选项,然后单击确定".
-尝试再次访问您的网页.现在,您将看到更有意义的错误消息,它将帮助您解决问题.

其他可能性:
您的托管方式可能存在问题.可能是多个配置文件?
此外,由于您尚未共享Web服务的类型或它是什么框架应用程序,因此在其他服务器上托管后,它也可能是跨域策略问题.
When the error is 500, that means it''s an internal error, meaning internal to the service/web access - the service/web threw an exception that was not caught.
Look in the Windows event logs on the server to see what went wrong.

Also, try:
- Go to menu Tools/Internet Options in your IE.
- Click on the Advanced tab, uncheck "Show friendly HTTP error messages" option and click Ok.
- Try accessing your web page again. Now you will see much more meaningful error message which will help you to troubleshoot the problem.

Other possibility:
There might be an issue in the way you have hosted. May be multiple config files?
Further, since you have not shared the type of webservice or what framework application it is, it can also be a cross domain policy issue after hosting on other server.


这篇关于使用iTextShap->“远程服务器返回错误:(500)内部服务器错误." HTML包含图片时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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