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.

Issue

While uploading attachments with the picture control, you may experiene intermittent failures. When you try to upload a new picture the following error message is presented:

"The file could not be uploaded. Unforseen error occurred on the file upload, contact your administrator."

Sample error message screenshot:

Image

Symptoms

Place the screenshot here

Resolution

The root cause of this issue is the K2 Designer and Runtime sites that are running are using different IIS app pools (even if those different pools use the same account).

This error can occur if you upgrade from older versions of K2 and reuse existing application pool configuration. If you run the K2 Five setup manager selecting "Create new app pool" it consolidates the application pools into one, with the final result of having K2 and K2_net4 pools, and no separate Smartforms pool.

The fact that K2 installer does not flag this separate application pool as a problem and correct it will be addressed in a future version of the product. Additionally, any Isolated Storage permission related problems that occur when switching between application pools will be addressed in a future release.

Other (less secure/preferable) options of addressing this problem while keeping separate appools:

  1. Give the app pool users local Administrative rights. A reboot of the IIS may be required for these changes to take effect.
  2. Add a setting to not use isolated storage for both Runtime and Designer - this needs to be done in each of the web.config files. Both the above suggestions are workarounds and not recommended for security reasons.

The best/recommended solution is to use the same application pool for both the K2 Designer and Runtime sites. You can manually change the application pool of the designer from IIS instead of letting the setup manager create a new application pool for both sites or you can run the setup manager and change the application pool (use existing) of the designer site or the runtime in order to get both sites on the same application pool.