|
Rank: Member Groups: Member
Joined: 6/16/2014 Posts: 22
|
We are trying EO pdf for a website with dynamic content loaded using ajax calls.The site needs windows authentication. The site needs to downloads bunch of javascript files for the content to be fetched from server and render the content. For export PDF of the page we invoke the URL from server using EO PDF dll. We find some of the javascript files occasionally fails to authenticate and not downloading. Debugging with fiddler we found the request is missing authorization header. This behaviour is not consistently happening and also each time it fails it has problem with different files. The fiddler sequence is pasted here. We can see the last request request from client is missing authorization header. We need to understand the cause and if any workaround possible.
Example for one of the files form fiddler: Initial Request header Accept-Encoding: deflate, gzip Connection: Keep-Alive Origin: http://win2k12vwdit X-Requested-With: XMLHttpRequest User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534+ (KHTML, like Gecko) Chrome/25.0.168.0 Content-Type: application/json; charset=UTF-8 Accept: application/json, text/javascript, */*; q=0.01 Referer: http://WIN2K12VWDIT/MES/ams/ux/webui/metrics/exportpdf Content-Length: 161
Server authentication response
Cache-Control: private Content-Type: text/html Server: Microsoft-IIS/8.5 X-AspNetMvc-Version: 4.0 X-AspNet-Version: 4.0.30319 WWW-Authenticate: Negotiate WWW-Authenticate: NTLM X-Powered-By: ASP.NET Date: Thu, 14 May 2015 13:49:50 GMT Content-Length: 1293 Proxy-Support: Session-Based-Authentication
Client request on receiving challenge response from server
POST http://WIN2K12VWDIT/ReportFrameWork/ReportParser/RenderView HTTP/1.1 Host: WIN2K12VWDIT Accept-Encoding: deflate, gzip Connection: Keep-Alive Origin: http://win2k12vwdit X-Requested-With: XMLHttpRequest User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534+ (KHTML, like Gecko) Chrome/25.0.168.0 Content-Type: application/json; charset=UTF-8 Accept: application/json, text/javascript, */*; q=0.01 Referer: http://WIN2K12VWDIT/MES/ams/ux/webui/metrics/exportpdf Content-Length: 161
|
|
Rank: Member Groups: Member
Joined: 6/16/2014 Posts: 22
|
We have evaluated EO PDF at a prototype level last year for export to PDF feature, but we did implement that requirement that time. Now we have strong push from the customers to have that Feature. Unfortunately we are facing the above issue and kind of stuck there not able to move forward... It there are some work around or some direction to proceed, that would of great help for us.
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Hi,
We have not been able to reproduce this problem. One thing you may want to check is the user context under which ConvertUrl/ConvertHtml is called. EO.Pdf uses that user context to authenticate with your server. This can become rather complicated when IIS impersonation is enabled. Consider the following flow:
1. User A login to Windows station X; 2. He starts a browser to access a page on Web Server Y; 3. Because IIS impersonation is enabled, Y runs the page under user A's identity context; 4. Web server Y calls EO.Pdf to convert a page on Web Server Z; 5. Because EO.Pdf uses the calling thread's identify context, it would use this context to authenticate with Z;
Two factors that can cause different authentication result: 1. If step A did not occur, then the built in IIS anonymous account would be used; 2. If on step 3 impersonation is not enabled, then IIS account will be used;
As such you might want to narrow down your test to strictly from a single workstation under a single user and then see if it still occurs.
Thanks!
|
|
Rank: Member Groups: Member
Joined: 6/16/2014 Posts: 22
|
We are observing the issue consistently. The scenario is web application in serverA makes AJAX post request to another application in same server. All applications are windows authentication enabled. when we use EO convert URL or ConvertHTML functions the ajax calls fails to authenticate some times. Once it happens another 2 or 3 attempts refresh the application authenticates. We made a work around with a preflight to the failing application request form server side before EO converturl is called. This gets through. Also observed a change in machine name to upper-case for the ajax URLS consistently fails(host url is in smaller case).
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,229
|
Thank you very much for the additional information. I am glad to hear that you have found workaround. We will continue working on this issue and let you know if we find anything.
|
|
Rank: Member Groups: Member
Joined: 6/16/2014 Posts: 22
|
We don't want to go with that as a workaround, iisreset would happen once in a while in the production scenario and we don't want to make such unwanted calls every time.... we were hoping that the additional information will help to getting closer to identifying the actual cause for the issue.
|
|