1. Mariano Recuero
  2. PowerBuilder
  3. Wednesday, 18 April 2018 11:30 AM UTC

Powerbuilder 12.5 Classic

hi,

i got a PB classinc .Net Assenbly that generate a pdf file from a dataStore.

This Assembly is added as reference in a ASP.NET MVC 4 web application.

In my PC with IIS Express (from VS 2012) it works perfectly but when i try to run into production server (Windows Server 2012R2)  it returns an error message:

[InvalidOperationException: Showing a modal dialog box or form when the application is not running in UserInteractive mode is not a valid operation. Specify the ServiceNotification or DefaultDesktopOnly style to display a notification from a service application.]
System.Windows.Forms.MessageBox.ShowCore(IWin32Window owner, String text, String caption, MessageBoxButtons buttons, MessageBoxIcon icon, MessageBoxDefaultButton defaultButton, MessageBoxOptions options, Boolean showHelp) +2962140
   c__rareports.InitAssembly() +293
   MyApp.Reports.RAReports..ctor() +12

In my assembly there's not any messagebox, code from .net app:

 RAReports report = new RAReports();
 report.GetReportFile(paramssss...);

Dll and PBD generated are in bin.

Aby idea about this error?

thanks in Advance

Accepted Answer
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 18 April 2018 13:47 PM UTC
  2. PowerBuilder
  3. # Permalink

HI Mariano;

      My first guess is that your Assembly does not have the same privileges in the production environment to access the GhostScript (I assume that is what you are using for PDF generation) printer.

Regards ... Chris

Comment
  1. Mariano Recuero
  2. Wednesday, 18 April 2018 16:11 PM UTC
I think that error goes just when in asp.net code i initialize assembly, then pile goes to:



c__rareports.InitAssembly()



And then throw error message

  1. Helpful
  1. Mariano Recuero
  2. Wednesday, 21 November 2018 10:24 AM UTC
Finally, problem was assembly in production environment hasnot rigth privilegies.

When i set them it works fine

Thanks
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 21 November 2018 15:18 PM UTC
Excellent news Mariano .. thanks for letting us know the solution! :-)
  1. Helpful
There are no comments made yet.
Mariano Recuero Accepted Answer Pending Moderation
  1. Wednesday, 18 April 2018 18:53 PM UTC
  2. PowerBuilder
  3. # 1

I work with PB 12.5.

I have installed PB.NET and PB Runtime in server.

But there's something that crash when i initialize NVO in ASP.NET app

 

thanks.

Comment
  1. Govinda Lopez @Appeon
  2. Wednesday, 18 April 2018 23:38 PM UTC
Is it using the correct AppPool?

  1. Helpful
  1. Mariano Recuero
  2. Thursday, 19 April 2018 12:56 PM UTC
Hi,



what AppPool should it use?



Thanks in advance

  1. Helpful
There are no comments made yet.
Chris Pollach @Appeon Accepted Answer Pending Moderation
  1. Wednesday, 18 April 2018 18:48 PM UTC
  2. PowerBuilder
  3. # 2

Hi Mariano;

   Andres brings up a great point. Note that you'll need the PB .Net run-time and not the native PB run-time, as follows:

 

Note: The PB .NET Run-time is a separate MSI file in PB 2017 and not located in the Packager.

Regards ... Chris

Comment
There are no comments made yet.
Andres Slachevsky Accepted Answer Pending Moderation
  1. Wednesday, 18 April 2018 14:38 PM UTC
  2. PowerBuilder
  3. # 3

Have you installed the PB Runtime libraries?

 

 

Comment
  1. Mariano Recuero
  2. Wednesday, 18 April 2018 15:58 PM UTC
Hi, thansks for your answer.



Yes, all is instaled.

  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.