Error when adding a File with no file extension to a File Attachment control
kbt132375
PRODUCTIssue
When adding a File with no file extention to a File Attachment control on a Form or View and submitting, an error message is displayed and the file is not added via the relevant SmartObject.Symptoms
When adding a file, the following error message will be displayed: “A network error has occurred. Unable to execute a server-side operation”. The file will also not be added via the relevant SmartObject.
In the Event Viewer – Application Log of the K2 server, the following errors will also be logged.
Source: ASP.NET 4.0.30319.0
An unhandled exception occurred and the process was terminated.
Application ID: /LM/W3SVC/2/ROOT/Runtime
Process ID: xxxx
Exception: System.ArgumentException
Message: Argument 'file.Extension' may not be null or empty Parameter name: file.Extension
and
Source: .NET Runtime
Application: w3wp.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.ArgumentException
Resolution
The issue is a new bug identified in K2 4.7 up to and including May 2017 Cumulative Update. The issue is under investigation by the Developers to be addressed in a future Update.
The following workarounds are available:
- Add validation to the Forms where File Attachment Controls are used to check for no file extensions before submitting the form.
- Make use of the File Attachment Blacklist to block no extensions. Please see the following article under the Attachment Control File Type and Size > Considerations section for more information:
K2 SMARTFORMS PRODUCT DOCUMENTATION: USER GUIDE File Attachment Control