You are viewing limited content. For full access, please sign in.

Question

Question

Unhandled exception when trying to save changes to Quick Fields session

asked on July 12, 2021

I have full read-write access to the network folder where this session file is located.  Here's the detailed error information I got when attempting to save changes to the session:

 

See the end of this message for details on invoking 
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.UnauthorizedAccessException: Access to the path 'C:\ProgramData\Laserfiche\Quick Fields\SessionVariables\796b8754-fb7b-40c3-a2e0-c06945495905.xml' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.File.InternalDelete(String path, Boolean checkHost)
   at System.IO.File.Delete(String path)
   at Laserfiche.BatchProcessor.ComponentModel.SessionVariables.Save(String filename, Boolean overWrite)
   at Laserfiche.QuickFields.Runtime.QFSessionProcessor.SaveSessionVariables(IDictionary`2 variables)
   at Laserfiche.QuickFields.Runtime.QFSessionProcessor.CloseCurrentSession(Boolean showDialog)
   at Laserfiche.QuickFields.QFApplication.ShuttingDown(CloseReason reason)
   at Laserfiche.BatchProcessor.Runtime.BPApplication.form_FormClosing(Object sender, FormClosingEventArgs e)
   at System.Windows.Forms.FormClosingEventHandler.Invoke(Object sender, FormClosingEventArgs e)
   at System.Windows.Forms.Form.OnFormClosing(FormClosingEventArgs e)
   at System.Windows.Forms.Form.WmClose(Message& m)
   at System.Windows.Forms.Form.WndProc(Message& m)
   at Laserfiche.BatchProcessor.UI.MainForm.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4300.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
Laserfiche.QuickFields
    Assembly Version: 8.1.0.0
    Win32 Version: 11.0.0.498
    CodeBase: file:///C:/Program%20Files%20(x86)/Laserfiche/Quick%20Fields/Legacy/Laserfiche.QuickFields.exe
----------------------------------------
Laserfiche.QuickFields.Base
    Assembly Version: 8.1.0.0
    Win32 Version: 11.0.0.498
    CodeBase: file:///C:/Program%20Files%20(x86)/Laserfiche/Quick%20Fields/Legacy/Laserfiche.QuickFields.Base.DLL
----------------------------------------
System.Windows.Forms
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4270.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4300.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Laserfiche.BatchProcessor
    Assembly Version: 8.1.0.0
    Win32 Version: 11.0.0.498
    CodeBase: file:///C:/Program%20Files%20(x86)/Laserfiche/Quick%20Fields/Legacy/Laserfiche.BatchProcessor.DLL
----------------------------------------
Laserfiche.Project
    Assembly Version: 10.1.0.0
    Win32 Version: 11.0.0.498
    CodeBase: file:///C:/Program%20Files%20(x86)/Laserfiche/Quick%20Fields/Legacy/Laserfiche.Project.DLL
----------------------------------------
Laserfiche.Base
    Assembly Version: 10.1.0.0
    Win32 Version: 11.0.0.498
    CodeBase: file:///C:/Program%20Files%20(x86)/Laserfiche/Quick%20Fields/Legacy/Laserfiche.Base.DLL
----------------------------------------
System.Configuration
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4190.0 built by: NET48REL1LAST_B
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Core
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4320.0 built by: NET48REL1LAST_C
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Xml
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
LfLicenseReader
    Assembly Version: 10.2.0.0
    Win32 Version: 11.0.0.22
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/LfLicenseReader/v4.0_10.2.0.0__607dd73ee2bd1c00/LfLicenseReader.dll
----------------------------------------
Laserfiche.QuickFields.Connection
    Assembly Version: 10.0.0.0
    Win32 Version: 11.0.0.498
    CodeBase: file:///C:/Program%20Files%20(x86)/Laserfiche/Quick%20Fields/Legacy/Laserfiche.QuickFields.Connection.DLL
----------------------------------------
System.Net.Http.WebRequest
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Net.Http.WebRequest/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Net.Http.WebRequest.dll
----------------------------------------
System.Net.Http
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Net.Http/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Net.Http.dll
----------------------------------------
Interop.BPINTERFACES81Lib
    Assembly Version: 8.1.0.0
    Win32 Version: 8.1.1.0
    CodeBase: file:///C:/Program%20Files%20(x86)/Laserfiche/Quick%20Fields/Legacy/Interop.BPINTERFACES81Lib.DLL
----------------------------------------
Laserfiche.BatchProcessor.UI
    Assembly Version: 8.1.0.0
    Win32 Version: 11.0.0.498
    CodeBase: file:///C:/Program%20Files%20(x86)/Laserfiche/Quick%20Fields/Legacy/Laserfiche.BatchProcessor.UI.DLL
----------------------------------------
BatchProcessor.Connection
    Assembly Version: 8.1.0.0
    Win32 Version: 11.0.0.498
    CodeBase: file:///C:/Program%20Files%20(x86)/Laserfiche/Quick%20Fields/Legacy/BatchProcessor.Connection.DLL
----------------------------------------
ImageControl
    Assembly Version: 8.1.0.0
    Win32 Version: 11.0.0.498
    CodeBase: file:///C:/Program%20Files%20(x86)/Laserfiche/Quick%20Fields/Legacy/ImageControl.DLL
----------------------------------------
Laserfiche.Project.TabbedUI
    Assembly Version: 8.3.1.0
    Win32 Version: 9.0.2.401
    CodeBase: file:///C:/Program%20Files%20(x86)/Laserfiche/Quick%20Fields/Legacy/Laserfiche.Project.TabbedUI.DLL
----------------------------------------
ActiproSoftware.UIStudio.Dock.Net20
    Assembly Version: 2.0.98.0
    Win32 Version: 2.0.98.0
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/ActiproSoftware.UIStudio.Dock.Net20/2.0.98.0__be939c973e8cb8a6/ActiproSoftware.UIStudio.Dock.Net20.dll
----------------------------------------
ActiproSoftware.WinUICore.Net20
    Assembly Version: 1.0.94.0
    Win32 Version: 1.0.94.0
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/ActiproSoftware.WinUICore.Net20/1.0.94.0__1eba893a2bc55de5/ActiproSoftware.WinUICore.Net20.dll
----------------------------------------
ActiproSoftware.Shared.Net20
    Assembly Version: 1.0.94.0
    Win32 Version: 1.0.94.0
    CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/ActiproSoftware.Shared.Net20/1.0.94.0__36ff2196ab5654b9/ActiproSoftware.Shared.Net20.dll
----------------------------------------
System.Design
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/System.Design/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Design.dll
----------------------------------------
AxSessionTree81Lib
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/Laserfiche/Quick%20Fields/Legacy/AxSessionTree81Lib.DLL
----------------------------------------
SessionTree81Lib
    Assembly Version: 1.0.0.0
    Win32 Version: 1.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/Laserfiche/Quick%20Fields/Legacy/SessionTree81Lib.DLL
----------------------------------------
Accessibility
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
AxInterop.LFImage110Lib
    Assembly Version: 11.0.0.0
    Win32 Version: 11.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/Laserfiche/Quick%20Fields/Legacy/AxInterop.LFImage110Lib.DLL
----------------------------------------
Interop.LFImage110Lib
    Assembly Version: 11.0.0.0
    Win32 Version: 11.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/Laserfiche/Quick%20Fields/Legacy/Interop.LFImage110Lib.DLL
----------------------------------------
AxInterop.LFText110Lib
    Assembly Version: 11.0.0.0
    Win32 Version: 11.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/Laserfiche/Quick%20Fields/Legacy/AxInterop.LFText110Lib.DLL
----------------------------------------
Interop.LFText110Lib
    Assembly Version: 11.0.0.0
    Win32 Version: 11.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/Laserfiche/Quick%20Fields/Legacy/Interop.LFText110Lib.DLL
----------------------------------------
Laserfiche.QuickFields.Processes
    Assembly Version: 8.1.0.0
    Win32 Version: 11.0.0.498
    CodeBase: file:///C:/Program%20Files%20(x86)/Laserfiche/Quick%20Fields/Legacy/Laserfiche.QuickFields.Processes.DLL
----------------------------------------
Laserfiche.BatchProcessor.XML
    Assembly Version: 8.1.0.0
    Win32 Version: 11.0.0.498
    CodeBase: file:///C:/Program%20Files%20(x86)/Laserfiche/Quick%20Fields/Legacy/Laserfiche.BatchProcessor.XML.DLL
----------------------------------------
Laserfiche.BatchProcessor.Processes
    Assembly Version: 8.1.0.0
    Win32 Version: 11.0.0.498
    CodeBase: file:///C:/Program%20Files%20(x86)/Laserfiche/Quick%20Fields/Legacy/Laserfiche.BatchProcessor.Processes.DLL
----------------------------------------
Laserfiche.QuickFields.Processes.Barcode
    Assembly Version: 8.1.0.0
    Win32 Version: 11.0.0.498
    CodeBase: file:///C:/Program%20Files%20(x86)/Laserfiche/Quick%20Fields/Legacy/Laserfiche.QuickFields.Processes.Barcode.DLL
----------------------------------------
Laserfiche.QuickFields.Processes.Runtime
    Assembly Version: 8.1.0.0
    Win32 Version: 11.0.0.498
    CodeBase: file:///C:/Program%20Files%20(x86)/Laserfiche/Quick%20Fields/Legacy/Laserfiche.QuickFields.Processes.Runtime.DLL
----------------------------------------
Laserfiche.QuickFields.MetadataUpdater
    Assembly Version: 8.1.0.0
    Win32 Version: 11.0.0.498
    CodeBase: file:///C:/Program%20Files%20(x86)/Laserfiche/Quick%20Fields/Legacy/Laserfiche.QuickFields.MetadataUpdater.DLL
----------------------------------------
Interop.LFSO110Lib
    Assembly Version: 11.0.0.0
    Win32 Version: 11.0.0.0
    CodeBase: file:///C:/Program%20Files%20(x86)/Laserfiche/Quick%20Fields/Legacy/Interop.LFSO110Lib.DLL
----------------------------------------
CustomMarshalers
    Assembly Version: 4.0.0.0
    Win32 Version: 4.8.4084.0 built by: NET48REL1
    CodeBase: file:///C:/WINDOWS/Microsoft.Net/assembly/GAC_32/CustomMarshalers/v4.0_4.0.0.0__b03f5f7f11d50a3a/CustomMarshalers.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


 

0 0

Replies

replied on July 12, 2021

Note:  Apparently I don't have read-write access to the path C:\ProgramData\Laserfiche\Quick Fields\SessionVariables\.  Since we are in a managed environment I anticipate regular users will have this issue too.  Is there any particular reason that these session variables are stored to a protected area where the average users will likely encounter these error messages?

 

0 0
replied on July 12, 2021

I belong to the Administrators group on this computer and the security properties for the ProgramData\Laserfiche folder show that I have Full Control. However, it appears that there are read-only files and folders in this directory and I cannot change the properties as it prompts me further for "administrator access".  So, I continue to get the Unhandled Exception error based on insufficient access to the SessionVariables folder.  Please advise.

 

 

0 0
replied on July 12, 2021

This is a common prompt to receive when using File Explorer, you must click continue when you receive it. This started in Windows version 7, where administrators must still confirm certain actions and only the built in account .\Administrator does not receive these prompts now.

I think it is called LUA, which is more difficult to disable than UAC.

0 0
replied on July 12, 2021

I clicked Continue but nothing happened.

0 0
replied on July 12, 2021

Reboot and try again. If the prompt is not working properly you can login as .\Administrator which will make you a true Administrator just like in the Win XP days.

0 0
replied on July 12, 2021

You should always have read and write access to everything under C:\ProgramData. This is a hidden folder for programs to write temp data to. All programs written for Windows use this folder and/or the registry when they need to store something on your hard disk.

Services use their own account, but a program running as a window will use your current credentials when writing to the disk.

0 0
replied on July 12, 2021

What would cause me to not have access to the ProgramData folder?  How would I troubleshoot this?

0 0
replied on July 12, 2021

As an administrator you should be able to check and fix the security issue. Just click Continue if you get a prompt.

0 0
replied on July 12, 2021

I checked Continue and it looked like Windows went through the entire ProgramData\Laserfiche folder and removed the read-only attribute on all files and folders.  Then I rebooted and tried Quick Fields again; when I saved my changes to my session file and tried to exit the program I got the unhandled exception again:

 

I'm not sure why I'm getting this issue if the ProgramData folder should be read-write for all users, and I'm in the Administrators group on this machine.  I can try rebooting again and logging in as .\administrator if that's the next step.

0 0
replied on July 12, 2021

So, in order to fix this issue I had to go to the folder properties for the SessionVariables folder and under Security I had to give "Users" write access; for some reason that was unchecked. Now it seems to be working.

0 0
replied on July 12, 2021 Show version history

That makes more sense. Personally I don't trust the Windows Read-Only checkbox and never mess with it. Just stick to the security tab.

For example if I right click on My Documents it says Read-only, but this can not be true. Microsoft messed something up years ago. I found an article about it once, explaining that they re-purposed it for another use but neglected to update the title we see.

That could probably explain why users are reporting every folder showing read-only after the March update this year. They are all read-only, yet not.

0 0
replied on March 24, 2023

I had to also give "Modify" access to the User group in the ProgramData folder.  Just "Write" wasn't enough, it still failed in the same way.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.