Error with ActiveVFP printing

Topics: User Forum
Dec 8, 2010 at 8:51 PM
Edited Dec 8, 2010 at 8:58 PM

I have been trying to figure this one out all day.

I have ActiveVFP working  and have been developing some pages and access to my DB.  All works fine until I go to try the printing.

I have installed AFPL Ghostscript, installed the Adobe printer, it is called, Generic Colour PostScript.

However when I go to print I get an error:

Caught .NET exception, source: 000053qh0006 err#= 1426 line= 112 OLE error code 0x8000401a: The server process could not be started because the configured identity is incorrect. Check the username and password.1426 OLE error code 0x8000401a: The server process could not be started because the configured identity is incorrect. Check the username and password. 8000401a: The server process could not be started because the configured identity is incorrect. Check the username and password .NULL. .NULL. .NULL. .NULL. C:\Inetpub\vfproot\activevfp.dll message: C:\Inetpub\vfproot\activevfp.dll

I have gone through the setup with DCOMCNFG and all seems fine.  Interactive User is selected.

Error occurs on the line: oPDF=CREATEOBJECT("pdfrun.print2pdf")

Currently installed on Windows Server 2003, with ASP.NET set to 2.0.50727.

Any Suggestions?

 

Coordinator
Dec 9, 2010 at 4:41 PM
Edited Dec 9, 2010 at 4:54 PM

Make sure it's registered.  I have the same OS so here are my configuration screens:






Mar 23, 2012 at 12:30 PM

Good afternoon,

I have got the same problem as Blawson. The DCOMCNFG is set according attached screenshot. I observe strange behaviour. When I am login to the IIS server, PDF generation works. But when I logout from the IIS, I get error "The server process could not be started because the configured identity is incorrect. Check the username and password".

I don't understand which user launch print2pdf? I suppose it is IIS_IUSR. But why depends on who is logged in.

Apr 18, 2012 at 4:08 AM

Yup - me too.

And for Win 7-32, the solution was simple: http://technet.microsoft.com/en-us/library/cc730708%28v=ws.10%29.aspx

ASP.NET impersonation - no kidding.

Apr 29, 2012 at 9:27 AM

I have tried it with impersonation but without success. I have assigned for anonymous user my account. It works if I login to computer with my account, but it doesn't work  if I am logout. Where is problem?

May 4, 2012 at 9:00 PM

I have tried change the "This user" field to my user in DCOMCNFG. Now I getting "error unspecified". Can anybody try it if this is global problem or problem on my own PC?

Coordinator
May 6, 2012 at 4:04 PM
Edited May 6, 2012 at 4:05 PM

I just changed the "Account to Use to Run the Application" (on the Identity tab) to "This User" instead of the "Interactive User".  I specified my Administrator account and password and it all works perfectly when signed off.   First I just logged off and it worked.  Then I powered down completely and restarted (a cold boot) and IT STILL WORKED.

This is on a Windows 2003 Server but it should work the same on everything.

The only note of caution I can give you is STICK TO THE INSTRUCTIONS for DCOM.  Apparently it's easy to mess up the settings if you are experimenting without knowing exactly what to do.

Sep 4, 2012 at 7:12 PM

I use Win7 64 bit with no luck for Ghostscript printer driver installation. Can anyone help please ?

Coordinator
Sep 6, 2012 at 3:31 PM
Edited Sep 6, 2012 at 4:06 PM

Ok, on Win 7 64-bit, the original "Generic Colour PostScript"  will NOT work at all.  Some of the PS Printer Drivers that come with Win 7 WILL work and you'll need to pick one and install it from the regular Windows 'Add printer'.

1.) A suitable one is "Xerox Phaser 6120 PS".

2.) You'll need to access DCOM to configure PDFRun.PrintToPDF with this command on Win 7 64-bit:

mmc comexp.msc /32

3.) In PDF.avfp, you'll need to add this property to the oPDF object like:

 

<%

oPDF=CREATEOBJECT("pdfrun.print2pdf")

if isnull(oPDF)

return .f.

endif

oPDF.cPSColorPrinter ="Xerox Phaser 6120 PS"

...

 

4.)  The above is the good news.  The bad news is that it seems like I have to modify the PDFrun project and EXE COM because the SetPrinter routine foolishly does not match the name correctly using UPPERs....   So.....  I was hoping to have a new release out sometime soon anyway ... maybe days ...  that WILL have this fix...