|
Rank: Member Groups: Member
Joined: 5/28/2013 Posts: 10
|
Hi,
I've had a few issues with the ProxyInfo configuration option. I've been able to work around them but it would be better if the library acted more like the built-in .Net proxy classes:
Issues:
1. HtmlToPdf automatically inherits/detects the system proxy configuration (this is good) but doesn't implement the exclusion or bypass features of the proxy. As a result, when doing localhost development, it will send the HTTP request to the proxy and not my local machine and the conversion will fail because "localhost" is invalid to the proxy.
2. HtmlToPdf does not inherit/detect the app.config/web.config defined proxy settings configured in the system.net/defaultProxy section when running in an application.
3. Normally (at least for the built-in .Net WebRequest classes), you can set the proxy class to null to explicitly disable using the proxy for the request. HtmlToPdf does not follow this convention and continues to use the default proxy even though the ProxyInfo property has been set to null.
Thanks,
Lance
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
Thank you very much for your valuable feedback. As to the issues:
1. Actually I am not aware that HtmlToPdf would automatically inherits/detects the system proxy configuration. My understanding is you always have to explicitly set HtmlToPdf.Options.ProxyInfo;
2. This is a good idea. However I am not sure if we should automatically apply it. Maybe we can add a method for you to load it. We will look into this one;
3. This would be a bug. The design goal of ProxyInfo property is, if you set it, then it goes through proxy, if you don't set it (or set it to null), then proxy won't be used. We will look into this and get back to you;
Thanks!
|
|
Rank: Member Groups: Member
Joined: 5/28/2013 Posts: 10
|
Thanks, let me know if you need code samples to reproduce the issues. They're pretty easy to demonstrate using LINQPad.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
OK. We will look into it first and if we have any questions, we will certainly let you know.
Thanks!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi, We have posted a new build (build 2013.0.21, you can download it from our download page) that added proxy bypass feature. You will need to use this overload of ProxyInfo's constructor to set the bypass list: http://www.essentialobjects.com/doc/4/eo.pdf.proxyinfoconstructor1.aspxWe are not able to reproduce issue #3. In our test as soon as we set HtmlToPdf.Options.ProxyInfo = null, the converter no longer uses proxy. Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 1/23/2015 Posts: 1
|
Hi, I am evaluating the EO.pdf version 6.0.29.2 and noticed the above behavior that 1. if you set the ProxyInfo properties it has to match systemproxy/IE settings. Any change in the IE proxy settings breaks the code. This proves that EO.pdf uses internally the systemproxy/IE settings. Ideally it should have been built similar to .NET webrequest that does not have any dependency with IE settings. But instead if I use cookies = session.GetCookies() and add the cookies into HtmlToPdfOptions then its resolved.
2. Secondly I noticed that using the proxy the performance is very slow and some of the delayed ajax calls that update portions of a web page do not work. Even adding MinLoadWaitTime to 60 does not help.
Before we decide to purchase, we need these issues (mainly issue 2) to be resolved.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,196
|
Hi,
We are not aware that EO.Pdf uses system IE proxy settings at all. ProxyInfo should be the only place for you to configure proxy settings for EO.Pdf. You can verify this by configuring your system proxy setting to a non existing proxy server and you should see EO.Pdf will not be affected and will continue to work fine (if your computer does have direct access to the server).
Proxy server generally does not have anything directly to do with cookies. However when you access a page through a proxy server, the proxy server's IP address, not your IP address will be presented to the web server. In another word, using a proxy server changes what your web server sees you thus can cause the web server to treat you as a different identity. This affects how the web server issues cookies. You web server probably has something related to this and that's why when you copy the cookies it works. Cookies generally does not have an impact on network connectivity --- this is where proxy server matters.
The slow performance when using a proxy server usually has to do with proxy server. For example, a browser caches most contents by default. If a proxy server does not cache any contents and removes any caching instructions in the HTTP response, then the browser won't be able to use cache at all. This will significantly increase load time. And obviously, if the proxy server itself is slow, then it will slow everything down for you as well. Additionally, the cookie issue might also changes the flow of things, so there can be other factors in play as well. None of these factors have anything to do with EO.Pdf. I would recommend you to use a network traffic monitor to monitor the network traffic and see if you can find exactly which part is slowing things down for you and then go from there.
Thanks!
|
|