Skip to main content


 

Symptoms


Error when using File Attachment control: file name]/0 bytes/The file could not be uploaded. The network might be down or the file size is larger than the maximum allowed.

Error: Not authorized
 

Diagnoses


The issue is caused when the Designer and Runtime use different Application Pools in IIS with different User Accounts. The issue occurs when using the form on the Designer/Runtime URL and then using it on the Runtime/Runtime URL, or the other way around. Whichever one is used second will display the error.

 

Resolution

Reconfigure SmartForms to use the same Application Pool for both Designer and Runtime. Performing an IISRESET is a temporary solution as the issue will occur again when the steps above is repeated.




 

Getting a similar error when uploading files using the File Attachment control in SmartForms 4.6.11. 

Designer and Runtime sites are set to use the same Application Pool.

If we upload through (e.g.) the Designer site then this succeeds.

Then switch to the Runtime site and upload a file - the user gets a red "!" with the message "File not uploaded. Details: The file could not be uploaded. Unforseen error occured on the file upload, contact your administrator."

The SourceCode.Forms.Web error log records the following:

 

Exception on 2016-12-06T11:12:09.6936539Z
Addtional: FileUtility.ReadFile(Path=ib3gewxt.nxmUnique Filename.jpg)
Exception:
System.IO.IsolatedStorage.IsolatedStorageException: Unable to create mutex. (Exception from HRESULT: 0x80131464)
at System.IO.IsolatedStorage.IsolatedStorageFile.Open(String infoFile, String syncName)
at System.IO.IsolatedStorage.IsolatedStorageFile.Reserve(UInt64 lReserve)
at System.IO.IsolatedStorage.IsolatedStorageFile.CreateDirectory(String dir)
at SourceCode.Forms.AppFramework.FileUtility.GetIsolatedPath(IsolatedStorageFile isolatedStore, String path)
at SourceCode.Forms.AppFramework.FileUtility.Open(String path, FileMode fileMode, FileAccess fileAccess)
URL: /Runtime/Utilities/FileHandler.ashx?fn=Unique%20Filename.jpg&1481022729378
QueryString: fn=Unique+Filename.jpg&1481022729378

Is this something that has been caused by the use of Isolated Storage by the Attachment control? Is there another workaround to prevent this error?

 


@lammy Yes this likely may be caused by Isolated Storage exception, an if you run 4.6.11 just log a ticket asking support for latest SmartForms rollup. Spefically you need fix with internal ID 604534, which is included into SF rollup starting from 4611.9.


Reply