System.UnauthorizedAccessException

Questions about Wine on Linux
Locked
qbuj1
Newbie
Newbie
Posts: 3
Joined: Thu Aug 29, 2024 6:27 am

System.UnauthorizedAccessException

Post by qbuj1 »

Hi,
I'm trying to run a software that relies on dotnet8 on wine staging 9.16. Required dependencies seems to be installed as expected on first run, but then the software crashes on launch with this stack:

Code: Select all

Unhandled exception. System.IO.FileLoadException: Could not load file or assembly 'RadiatorBattery, Version=7.1.38.92, Culture=neutral, PublicKeyToken=null'. Access denied.
File name: 'RadiatorBattery, Version=7.1.38.92, Culture=neutral, PublicKeyToken=null'
 ---> System.UnauthorizedAccessException: Access denied. (0x80070005 (E_ACCESSDENIED))
wine: Unhandled exception 0xe0434352 in thread 24 at address 7B632527 (thread 0024), starting debugger...
The .exe is located in the Program Files (x86) folder in the C drive. It has the same permissions as other .exe in the system.

Is there a way to get more information about how to handle these permissions ?

Thanks !
desessarts
Level 4
Level 4
Posts: 196
Joined: Wed Oct 04, 2023 7:57 am

Re: System.UnauthorizedAccessException

Post by desessarts »

see in the wiki

https://wiki.winehq.org/Debug_Channels

for example

Code: Select all

WINEDEBUG=+loaddll wine my-exe.exe
will display

Unloaded...xxx.dll

if you need some .dll
qbuj1
Newbie
Newbie
Posts: 3
Joined: Thu Aug 29, 2024 6:27 am

Re: System.UnauthorizedAccessException

Post by qbuj1 »

Thank you for your answer, seems like all DLLs are loaded. But some fixme are associated to .NET DLLs, indeed. But I don't see anything related to a missing lib or soemthing. I tired to install .NET with both the .exe provided here or with winetricks dotnetdesktop8.

Code: Select all

0024:trace:loaddll:build_module Loaded L"C:\\Program Files (x86)\\dotnet\\shared\\Microsoft.NETCore.App\\8.0.2\\coreclr.dll" at 7F890000: native
0024:fixme:heap:GetNumaHighestNodeNumber semi-stub: 0059F654
0024:fixme:seh:WerRegisterRuntimeExceptionModule (L"C:\\Program Files (x86)\\dotnet\\shared\\Microsoft.NETCore.App\\8.0.2\\mscordaccore.dll", 7F890000) stub
0024:fixme:ntdll:NtQuerySystemInformation info_class SYSTEM_PERFORMANCE_INFORMATION
0024:trace:loaddll:build_module Loaded L"C:\\Program Files (x86)\\dotnet\\shared\\Microsoft.NETCore.App\\8.0.2\\System.Private.CoreLib.dll" at 051A0000: native
0024:trace:loaddll:build_module Loaded L"C:\\Program Files (x86)\\dotnet\\shared\\Microsoft.NETCore.App\\8.0.2\\clrjit.dll" at 7F080000: native
0024:fixme:nls:get_dummy_preferred_ui_language (0x8 0x409 0059F198 00000000 0059F194) returning a dummy value (current locale)
0024:fixme:nls:get_dummy_preferred_ui_language (0x8 0x409 0059F198 0059F148 0059F194) returning a dummy value (current locale)
Unhandled exception. System.IO.FileLoadException: Could not load file or assembly 'RadiatorBattery, Version=7.1.38.92, Culture=neutral, PublicKeyToken=null'. Access denied.
File name: 'RadiatorBattery, Version=7.1.38.92, Culture=neutral, PublicKeyToken=null'
 ---> System.UnauthorizedAccessException: Access denied. (0x80070005 (E_ACCESSDENIED))
0024:fixme:advapi:RegisterEventSourceW ((null),L".NET Runtime"): stub
0024:fixme:advapi:ReportEventW (CAFE4242,0x0001,0x0000,0x00000402,00000000,0x0001,0x00000000,0059DCB4,00000000): stub
0024:err:eventlog:ReportEventW L"Application: RadiatorBattery.exe\n"
0024:err:eventlog:ReportEventW L"CoreCLR Version: 8.0.224.6711\n"
0024:err:eventlog:ReportEventW L".NET Version: 8.0.2\n"
0024:err:eventlog:ReportEventW L"Description: The process was terminated due to an unhandled exception.\n"
0024:err:eventlog:ReportEventW L"Exception Info: System.IO.FileLoadException: Could not load file or assembly 'RadiatorBattery, Version=7.1.38.92, Culture=neutral, PublicKeyToken=null'. Access denied.\r\n"
0024:err:eventlog:ReportEventW L"File name: 'RadiatorBattery, Version=7.1.38.92, Culture=neutral, PublicKeyToken=null'\r\n"
0024:err:eventlog:ReportEventW L" ---> System.UnauthorizedAccessException: Access denied. (0x80070005 (E_ACCESSDENIED))\n"
0024:fixme:advapi:DeregisterEventSource (CAFE4242) stub
wine: Unhandled exception 0xe0434352 in thread 24 at address 7B632527 (thread 0024), starting debugger...
...
012c:fixme:dbghelp:elf_search_auxv can't find symbol in module
012c:fixme:dbghelp:elf_search_auxv can't find symbol in module
Fatal error. Internal CLR error. (0x80131506)
0024:fixme:seh:RaiseFailFastException (0059F398, 0059F3E8, 0) stub
Is there anything valuable in this log ?

Thanks again !
User avatar
KenSharp
Level 4
Level 4
Posts: 149
Joined: Mon Jul 13, 2009 8:52 pm

Re: System.UnauthorizedAccessException

Post by KenSharp »

What is the application? Is it available for download?
qbuj1
Newbie
Newbie
Posts: 3
Joined: Thu Aug 29, 2024 6:27 am

Re: System.UnauthorizedAccessException

Post by qbuj1 »

It's a custom application, that's sadly not available to download. All I know is it needs .NET8 to run and a few DLLs I put in system32. But I could try to ask the developer more information if needed I guess !
solinarrin
Newbie
Newbie
Posts: 1
Joined: Thu Feb 29, 2024 5:38 pm

Re: System.UnauthorizedAccessException

Post by solinarrin »

have you had any success in getting this to work as i have had the same issue with a program i am using.
Last edited by solinarrin on Sat Sep 07, 2024 2:50 am, edited 1 time in total.
Locked