iSeller Commerce
iSeller POS Retail
iSeller POS F&B
iSeller POS Express
Crosslight
WebUI
ClientUI
What's New
Download Trial
Web Solution
Mobile Solution
Enterprise Solution
Custom Development
Blog
Community
Latest Development Blogs
ForumPostTopic
Browse By Tag
We have been working in an application development over a year. Web Grid is heavily used in our application and its export funtions to PDF and Excel. We use this export function in hundreds of web forms. It is important to add that the export funcion is called from the client using the command webgrid.ExportGrid.
The only way to manage to export is to run the application from the server with windows authentication and impersonate=true!!
It is also important to add:
Our deployment is already delayed 4 days because of this issue. If you need more details please let me know ASAP.
[Edited by moderator: Generalized capitalization and unnecessary message]
Based on the error,
System.Web.HttpUnhandledException: Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> System.Exception: Printer does not support Letter papersize. Please use PaperKind.Custom in your PageSettings or specify a papersize supported by the current printer ---> DataDynamics.ActiveReports.ReportException: Printer does not support Letter papersize. Please use PaperKind.Custom in your PageSettings or specify a papersize supported by the current printer
We already have a KB article for such an issue. You will need to set the printer name to empty in the PrepareExportExecute server side event. Here is the snippet
private void WebGrid1_PrepareExportExecute (object sender, ISNet.WebUI.WebGrid.PrepareExportExecuteEventArgs e) { e.ReportObject.Document.Printer.PrinterName = ""; }
You could read the complete KB article in the support page, Under WebGrid >> Knowledge Base >> Exporting >> Fixes for printer problem exporting data into Excel
Please make sure the project bin folder already have ISNet.WebUI.WebGrid.dll, ISNet.WebUI.WebGrid.Resources.dll, and ISNet.ActiveReports.Exporting.dllIn a deployment scenario you do not need to add a reference to the ISNet.ActiveReports.Exporting.dll in you web.config
To fix the issue we area trying everything in the developping machine, all DLL are in the BIN folder.
It is important to note the following:
In conclusion the only way the export to Excel or PDF works is if the ASP.NET process is executed using the credentials of the user logged to the machine with the IIS Server.
How can we proceed to fix this issue? What can we do? Any ideas?
Unfortunately we could not replicate the issue in our environment, we have tested this issue using ProgrammaticExportClientside.aspx sample.
Since you mention it does work in IIS 6 and not IIS 7, have you use the correct anonymous access account in IIS 7 as detailed in the article Here
Please also make sure that the anonymous account has the proper rights for the bin folder.
Ok, I have manage to replicate the issue in a completly new evironment. To replicate the issue follow these followin steps:
1. Use IIS7
2. Connect to the web site with windows authentication
3. Disable anonymous authentication in the IIS (I need to use windows authentication)
4. Set ASP.NET impersonation to true
I am using two users
· TESTMACHINE\FER (is administrator)
· TESTMACHINE\TEST (is standard user)
I also have set permissions to IUSR and anonymous logon to the BIN and TEMPREPORTS (just in case).
I have made test in the IIS machine (server) and in a remote machine, my test results are:
1. In IIS Machine :
a. Setting ASP.NET Impersonation to FALSE works perfetly with both users
b. Setting impersoante to TRUE with user TESTMACHINE\FER (is administrator):
i. PDF: access denied to tempReports (user FER has access to this folder)
ii. Excel: “Error crearing File”
c. Setting impersonate to TRUE with user TESTMACHINE\TEST (is standard user):
i. PDF: Printer does not support letter printer size……..
ii. Excel: “Error creating File”
2. Remote Machine:
b. while user TESTMACHINE\FER is logon to the IIS Machine and IMPERSONATE=true:
i. with user TESTMACHINE\FER works pefectly
ii. Setting impersoante to TRUE with user TESTMACHINE\TEST Printer does not support letter printer size……..
c. while user TESTMACHINE\TEST is logon to the IIS Machine and IMPERSONATE=true:
i. with user TESTMACHINE\FER Printer does not support letter printer size……..
ii. Setting impersoante to TRUE with user TESTMACHINE\TEST works perfectly
d. while NO user is logged to the IIS Machine and IMPERSONATE=true:
I have no doubt in my mind this is a BUG, how it is possible that the behavior changes depending on the user that is logon to the IIS Machine? This is the second evironment with this issue, this new evironment is even outside my domain.
I think you have enough information to reproduce this issue. PLEASE HELP! We already spend in total 45 hours from our developers in this issue.
Tested the issue using the scenario you described and we still could not replicate the issue in our environment.
Our developer suggest installing Adobe Acrobat in the IIS machine so the machine will have a default printer set up. This workaround was given to a user with similar issue and he issue was solved after installing Adobe Acrobat.
The issu eis really easy to replicate are you sure that:
I have two completly different environments and the problem is perfectly replicated in both of them. Maybeone important thing is that both test evirinment are with Windows Vista Bussiness.
I install the Acrobat Reader (same issue), please remember I also have problem with excel exporty!.
I am attaching my test project. Just create a new Web site or Virtual Directory, make sure of:
IMPORTANT: Just load the ASPX, there will be an empty grid (that is normal). Try to exporta to PDF with the left toolbar button, try to export to Excel with the right toolbar button. The toolbar images are no include THAT IS NORMAL BUTTONS STILL WORK.
If you follow these steps correctly I am 100% sure the problem will be replicated.
The sample will run correctly after setting the administrator and standard user account with the proper access to the TempReports folder. The account must be able to have write access to the folder to allow them to create the export file in the TempReports.
After setting the proper access the issue will not occur using the scenario you describe
Tested using IIS7 in Windows Vista on .NET Framework 2.0, Impersonation True with Windows Authenthication, and Anonymous access disabled with the sample you provided
Thank you for your tests. But it is incredibly weird since I have the same problem in tree environments (2 Vista Bussines and 1 Server 2008).
If we don't manage to fix this issue I will have a HUGE lost, I will have to change at least 120 Forms.
So I have one last idea, I can give you Remote Desktop access to my test machine (is a laptop), so you can see the issue. Is there a private way to send you credentials for the access? There is nothing important in this test machine it has been just formated and is not part of our domain.
Please tell me how to send you the remote desktops credentials.
You could send the credential to technical@intersoftpt.com and mention that this issue has been discussed in the forum and also please provide the link to this thread
Glenn, I send this information on 17 Sept and haven't receive a reply. Is there a way to check if you were able to check this issue?
We are experiencing a similar error. Were able to solve this issue?
Thanks,
Andrew
Andrew, to follow up this issue we even put a test machine so that intersoft people could check the issue. They enter via remote desktop but the test Machine was in spanish so we had to put another environment in english language.
After we put the environment in english everything work nice, so this is a problem in spanish only (as I have test so far). If you are having trouble with the inglish version you must try:
-Put everytone with full control to the tempReports folder en your website
-Configure a printer in your machine eventhough the printer does not exits (some time I need to do this)
If you have anspanish environment I have not a solution for the issue.
Thanks, Fernando.
I was able to figure out the part with granting full control to the tempReports folder this morning and that resolved the issue on our staging server, but we're still receiving the error in our production environment. Both are English environments.
We have a couple printers configured on both machines as well.
Are there any other suggestions?
Here is the error:
I have inquired our developer regarding this issue and have also mention all the latest finding, works in English windows but on the Spanish windows teh issue still occurs, based on your test. We will inform you if there is any update or progress regarding this issue.
or
Choose this if you're already a member of Intersoft Community Forum. You can link your OpenID account to your existing Intersoft Social ID.
Choose this if you don't have an Intersoft account yet. Your authenticated OpenID will be automatically linked to your new Intersoft account.
Enter your Wordpress Blogname