VPE not printing on a Win2000 machine

Knowledge exchange related to the VPE Report Engine and PDF Library

Moderator: IDEAL Software Support

VPE not printing on a Win2000 machine

Postby IDEAL Software Support » Thu Nov 18, 2004 6:00 pm

Hi everyone,

I have a machine that is running Win2000 Server. When I am in development mode of the app I can run the app and print from VPE Prof. just fine (with in IDE). However, when I compile the program and run it (out side of IDE), it does not print. It does "NOTHING". Is there any security issue? I can run the same program on WinXP Prof and it prints just fine.

Manjit Basra
District Data Analyst
South Orange & Maplewood School District
Tel: (973) 378-9622
Fax: (973) 378-9464
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Postby IDEAL Software Support » Thu Nov 18, 2004 6:01 pm

Maybe you are running your app as a user with limited or no access rights to the printer.

Regards
Thorsten Radde
IDEAL Software GmbH
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Postby IDEAL Software Support » Thu Nov 18, 2004 6:02 pm

I checked the rights and they are ok. What I am doing is running an EXE file from IIS (as a web request report on Win 2000 Server). It just does not print. When I run the same EXE from the "RUN" box it prints. I have given rights to the printer to SYSTEM, EVERYONE, IUSR_????, and ADMIN etc. Nothing seems to help.

However, when I take the same EXE file to a WinXP Prof. machine it works fine from the "RUN" box as well as from IIS.

Please help me, I need to make this work.


Manjit Basra
District Data Analyst
South Orange & Maplewood School District
Tel: (973) 378-9622
Fax: (973) 378-9464
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Postby IDEAL Software Support » Thu Nov 18, 2004 6:07 pm

i observed that VPE does not print if it cannot obtain a window handle, which may be disabled for processes running from IIS. try to give the user used by IIS for anonymous access the ability to "interact with desktop"

rdwdroll
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Postby IDEAL Software Support » Thu Nov 18, 2004 6:07 pm

I don't know how to give user access to "interact with desktop". I can change user rights to different folders and files but I don't know how to do this. Would you please give me little example or something?

Thank you, for responding. I appreciate your help.

Manjit Basra
District Data Analyst
South Orange & Maplewood School District
Tel: (973) 378-9622
Fax: (973) 378-9464
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Postby IDEAL Software Support » Thu Nov 18, 2004 6:10 pm

try opening the service control manager and open the properties of your www-service.
go to the tab where the user account under which the service runs is listed.
there you find a checkbox for allowing interaction with desktop - this only will work if the service runs under "local system account".
if you need to user another account for some reason, you have to do this in your program; since i did not find out yet how you can give the programm which just runs different user credentials, it looks like you have to start another process which performs printing.
i use the attached class which is taken from a msdn example - the only disadvantage is that it crashes ~once a day since there's something wrong
with security resources - i did not figure this out yet.

Michael
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Postby IDEAL Software Support » Thu Nov 18, 2004 6:12 pm

First thank you for the C++ code, Michael. My app is in Visual FoxPro (MTDLLs).

I changed the settings are you described and then rebooted the system (just in case!). It had no effect. Another words VPE is still not printing for IIS initiated EXE file. I can print just fine from the IDE. However, this app runs just fine under the WinXP IIS5.0. What is the "IIS5.0 setting difference between Win2000 and WinXP"?

When EXE runs it changes its user account from "internet" to "system" and then it continues. It uses RevertToSelf() API function to do this.

Any other ideas would be greatly appreciated. Thank you again.

I think it is an issue that VPE support should look into it.

Manjit Basra
District Data Analyst
South Orange & Maplewood School District
Tel: (973) 378-9622
Fax: (973) 378-9464
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Postby IDEAL Software Support » Thu Nov 18, 2004 6:13 pm

hello manjit,

i'm sorry i could not help you, but that was the only idea i had...
can you tell me how exactly you launch the exe from iis? is it via active server pages?
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Postby IDEAL Software Support » Thu Nov 18, 2004 6:14 pm

Hi Michael,

Yes, it is via ASP page. This is how I do it:

1) User selects report criteria from an ASP page.
2) When the Submit button is clicked the ASP page uses Visual FoxPro MTDLL to initiate the appropriate EXE file.
3) While the EXE is running it updates a “process” table of its progress.
4) Every 5-10 seconds an ASP page is updated automatically showing the progress of the report to the user. Similar to the progress bar control in windows.
5) At the end of the report the user sees the report in PDF format.

The whole process works just fine. I just don’t know what is causing VPE not to print?

Manjit Basra
District Data Analyst
South Orange & Maplewood School District
Tel: (973) 378-9622
Fax: (973) 378-9464
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Postby IDEAL Software Support » Thu Nov 18, 2004 6:14 pm

well, i'm sure it has smth to do with they way the different IIS/OS versions handle User Rights for launched processes, but i cannot tell exactly how you can solve it - in C++ i managed it using the class i sent last time.
i think you should write a standalone app for the print processing and, from IIS just trigger it somehow (named pipes, a COM server or things like that) - then you will not have to deal with that problem any more. (your App will always be running and the ASP Page will just send it some commands)
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Postby IDEAL Software Support » Thu Nov 18, 2004 6:16 pm

This is what I have. The ASP page just runs the API command to run the REPORT.EXE” file. This EXE file changes it access level before do anything at all. If I don’t have the rights correct on the Server nothing happen. I know that the program is running because I can see it in the Task Manager and the log it is producing showing me that it gotten to the point where it needs to run “oVPE.Print()”. When it executes this command nothing happens. VPE should create a PS file at this point. All the rights are correct on the server.

Manjit Basra
District Data Analyst
South Orange & Maplewood School District
Tel: (973) 378-9622
Fax: (973) 378-9464
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Postby IDEAL Software Support » Thu Nov 18, 2004 6:17 pm

> and the log it is producing showing me that it gotten to the point where it
> needs to run "oVPE.Print()". When it executes this command nothing happens.

I'm also sure that the access rights to the printer are not correct.
Try running your app as Admin to see if the access rights are causing the problem.

BTW: VPE v3.50 R1 contains some enhanced code to handle issues with printer access rights. If you are not using v3.50 R1, give the demo version of VPE v3.50 R1 a try. For VFoxPro this means that you need to remove the VPE ActiveX from your form and re-insert it. If you are using the ActiveX in a non-visual class, use the new control name / GUID.

Regards
Thorsten Radde
IDEAL Software GmbH
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Postby IDEAL Software Support » Thu Nov 18, 2004 6:18 pm

Thank you, for the great advice. VPE v3.5 R1 works. All I had to do was to uninstall the older version and then install the new version and then change one program line to create the object. I guess the next question is how much will it cost to update? Also, how come it v3.1 works fine in WinXP and not in Win2000?


Manjit Basra
Oracle Certified Professional DBA
District Data Analyst
South Orange & Maplewood School District
Tel: (973) 378-9622
Fax: (973) 378-9464
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm

Postby IDEAL Software Support » Thu Nov 18, 2004 6:21 pm

> how much will it cost to update?

The update price for VPE v3.50 Professional Edition is EUR 298.

> Also, how come it v3.1 works fine in WinXP and not in Win2000?

This might be related to different default security settings / mechanisms.

Regards
Thorsten Radde
IDEAL Software GmbH
IDEAL Software Support
 
Posts: 1633
Joined: Thu Nov 18, 2004 4:03 pm


Return to VPE Open Forum

Who is online

Users browsing this forum: No registered users and 36 guests