Error when adding a File with no file extension to a File Attachment control

  • 16 February 2021
  • 0 replies
  • 12 views

Userlevel 5
Badge +20
 

Error when adding a File with no file extension to a File Attachment control

kbt132375

PRODUCT
K2 smartforms 4.7
BASED ON
K2 smartforms 4.7
This article was created in response to a support issue logged with K2. The content may include typographical errors and may be revised at any time without notice. This article is not considered official documentation for K2 software and is provided "as is" with no warranties.
LEGACY/ARCHIVED CONTENT
This article has been archived, and/or refers to legacy products, components or features. The content in this article is offered "as is" and will no longer be updated. Archived content is provided for reference purposes only. This content does not infer that the product, component or feature is supported, or that the product, component or feature will continue to function as described herein.

Issue

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.

 

Image

 

 

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


0 replies

Be the first to reply!

Reply