Welcome Guest Search | Active Topics | Sign In | Register

ASPXToPDF trial output different on test system than dev system Options
bob_wilson
Posted: Tuesday, December 4, 2012 10:20:36 AM
Rank: Newbie
Groups: Member

Joined: 12/4/2012
Posts: 1
I am trying this out and on my development system it works great - the output is rendered perfectly. When I build the app and move it to our test system the output comes out looking very different than the page itself - in fact it looks like all css formating is gone. This is the trial system. Is this a constraint of that or is there something else going on?
eo_support
Posted: Tuesday, December 4, 2012 10:33:40 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,195
Hi,

This usually has to do with permissions. Here is one scenario where this can happen: If your application requires Windows authentication, then the following flow occurs:

1. User access the .aspx page. When Windows authentication is enabled, the user's user context is sent to the server for authentication purpose (this is usually the login user's account);
2. The server serves the .aspx page correctly as the user credential is sufficient;
3. ASPXToPDF intercepts the page output and try to convert it to PDF file;
4. ASPXToPDF tries to resolve all external resources, such as CSS files. When this happens, ASPXToPDF's calling thread's user context is sent to the server for authentication purpose (this is usually the user account that you assigned to IIS, for example, IUSER_xxxx);
5. Your server refuses to serve the CSS file as the user context provided in step 4 does not have sufficient permission to access the CSS file;

For the above scenario, you can either turn on impersonation (so that step 4 will have the same user context as step 1), or turn off permission on the CSS files. Note this is just one of the scenarios that can give you some idea about why this can happen. There are other scenarios, for example, if you have code that dynamically switches user context then it can cause problem as well. We are not an expert on Windows security so we can not help you pin point exactly what it is. But as a test, you can try to temporarily disable all security/permission settings to verify whether this is indeed the problem and then go from there.

Thanks!


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.