Click here to Skip to main content
15,885,032 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
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.
Posted
Updated 28-Jul-14 2:38am
v2

1 solution

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.
 
Share this answer
 
Comments
SunilRY 30-Jul-14 4:48am    
I am making the call to the method like this
function callmethod(){window.location.href = "@Url.Action("generatePdf", "Admin")?patID=" +@user.PatientId +"&strPass=" + txtPassValue;}

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900