Picture Control: Intermittent failures when uploading an attachment
kbt156386
PRODUCTIssue
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:
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:
- Give the app pool users local Administrative rights. A reboot of the IIS may be required for these changes to take effect.
- 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.