Hi,
I have a web API in C# using Fnd library to use IFS. Sometime I get an error that in thrown when executing a query. For example :
FndPLSQLSelectCommand cmd = new FndPLSQLSelectCommand(Connection, query);
FndDataTable table = cmd.ExecuteReader(); // <-- Error thrown here
The error thrown is :
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.
at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
at Ifs.Fnd.Windows.Forms.FndMessageBox.Show(String message, String title, MessageBoxButtons buttons, FndMessageBoxIconEx icon, MessageBoxDefaultButton defaultButton, FndMessageBoxDetails messageDetails, String checkBoxMessage, Boolean& checkedValue, Int32 timeout)
at Ifs.Fnd.FndException.Show(Form ownerForm)
at Ifs.Fnd.AccessProvider.FndConnection.InvokeInternal(Object requestBody, Object responseBody, String intface, String operation, FndRequestContext requestContext, FndManualDecisionCollection decisions, Boolean forcedSync)
at Ifs.Fnd.AccessProvider.FndConnection.InvokeInternal(String intface, String operation, Object requestBody, Object responseBody, FndRequestContext requestContext, Boolean forcedSync)
at Ifs.Fnd.AccessProvider.PLSQL.FndPLSQLCommandCollection.Invoke()
at Ifs.Fnd.AccessProvider.PLSQL.FndPLSQLSelectCommand.ExecuteReader()
at SII.IFSWebApp.Repositories.v2.IFS.ExpenseLineRepository.All(String expenseId, String search, Nullable`1 offset, Nullable`1 limit) in D:\Projet\ifs-webservices-dotnet-hotfix-add-log-global\SII.IFSWebAPI\SII.IFSWebApp\Repositories\v2\IFS\ExpenseLineRepository.cs:line 66
at SII.IFSWebApp.Services.WS.v2.ExpenseLineService.GetAll(String expenseId, String search, Nullable`1 offset, Nullable`1 limit) in D:\Projet\ifs-webservices-dotnet-hotfix-add-log-global\SII.IFSWebAPI\SII.IFSWebApp\Services\WS\v2\ExpenseLineService.cs:line 23
at SII.IFSWebApp.Controllers.v2.ExpenseLinesController.Index(String expenseId, String search, Nullable`1 offset, Nullable`1 limit) in D:\Projet\ifs-webservices-dotnet-hotfix-add-log-global\SII.IFSWebAPI\SII.IFSWebApp\Controllers\v2\ExpenseLinesController.cs:line 42
at SII.IFSWebApp.Controllers.v2.ExpenseLinesController.Index(String expenseId, Nullable`1 offset, Nullable`1 limit) in D:\Projet\ifs-webservices-dotnet-hotfix-add-log-global\SII.IFSWebAPI\SII.IFSWebApp\Controllers\v2\ExpenseLinesController.cs:line 33
at lambda_method(Closure , Object , Objectt] )
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass6_2.<GetExecutor>b__2(Object instance, Objectt] methodParameters)
at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary`2 arguments, CancellationToken cancellationToken)
This error is “legit” because it try to open a window (System.Windows.Forms.Form.ShowDialog) but it doesn’t make sens it’s an API.
Do you have any idea how to fix it? Maybe it’s a configuration with Ifs.Fnd.AccessProvider
Thanks for your help,
Antoine