Attempting to create a Gen 8.6 ASP.NET web-based client which presents a file explorer that shows only Excel files from the user's PC. Then, after the user selects a file, it inserts data into a database table for loading onto the browser window.
Attempted this using the Gen OpenTextFile function for Excel files. Attempted with OpenTextFile option File_Dialog and when testing the generated GUI Windows C application, the file explorer displayed. However, when testing an ASP.NET client the file explorer was not displayed.
Tested code for OpenTextFile options File_Dialog and Filename for GUI/C and ASP.NET applications. For GUI/C both options were successful. However, under ASP.NET only the Filename option was successful. The File_Dialog option did not open any file explorer for file selection which matches the reported behavior.
When the OpenTextFile option File_Dialog is used under ASP.NET, the Gen runtime will attempt to call C# function OpenFileDialog. However, from web research, it appears that OpenFileDialog will only display the results on the server where IIS is running and not on the client machine where the browser is being used. For example, the problem is logged here: Microsoft > Open file selection dialog from ASP.NET application on IIS
Also tried to create a C# External Action Block (EAB) using the same OpenFileDialog function and although tests were successful under Visual Studio, received an error at runtime "Object reference not set to an instance of an object". Working in Visual Studio and not working under ASP.NET using IIS is also what was reported above.
In summary,
Currently when running Toolset Consistency Check (CC) usage of OpenTextFile in an action diagram statement will show messages:
WARNING : ICCOO03W Function cannot be executed in ASP.NET applications.
WARNING : ICCOO05W Function is not multi-thread safe in C# or Java.
Relevant documentation pages:
Consistency Check Messages - ICCOO03W
Consistency Check Messages - ICCOO05W
ICCOO05W is in line with the comments about OpenTextFile not being thread safe for .NET under the Unsupported ASP.NET Web Client Features page - see "Unsupported File-Related Functions"
However, ICCOO03W should not include an OpenTextFile check and will be removed from the Toolset CC in the near future. The ICCOO03W documentation page has already been updated to remove the reference to OpenTextFile.