.net - creating pdf on server gives error : Unable to connect to the remote server -
i have code creating pdf dynamically. had used itextsharp, vs 2010, .net 4.0 every thing going fine , working on local.
when have uploaded on secure server (https) gives error :
unable connect remote server
it working fine on server localhost when debugging. error occur when calling remotely other pc (from url).
what may causes problem ??
update :
i have checked code again.. , find 1 thing..
i had put image source :
<img src='https://siteurl.com/pdf/11111111.png' alt='' />
that gives problem : have put static relative path why gives error ??? because in future have use same in many places
ignoring itextsharp moment, try following code on production server, replacing url problem url.
using(var w = new system.net.webclient()){ w.downloaddata(@"https://siteurl.com/pdf/11111111.png"); }
if gives exception server having problem talking host specified. sometimes, nat/firewall rules have problems using external resolution internal resources. might need update local dns or add entry local hosts file resolve this.
if above doesn't give exception let know , can troubleshoot further.
Comments
Post a Comment