ZATCA SDK v3.4.5 on .NET 8 Fails with "Access to path 'D:\Recovery' is denied" during Signing Body:

Hi everyone, I’m facing a strange issue after upgrading the ZATCA E-Invoicing SDK from v3.4.2 (which worked perfectly) to v3.4.5 in my .NET 8 application.

The new EInvoiceSigner() object initialises without any errors. However, when I call the SignDocument() method, the method returns a result object, but all the internal Steps (like ‘Generate EInvoice Hash’) show a failure status.

When I inspect the exception in the first failed step, the root cause is a TypeInitializationException with the following detailed inner exception. System.UnauthorizedAccessException: Access to the path ‘D:\Recovery’ is denied. It seems a component of the SDK is being initialised for the first time during the SignDocument call, and it’s trying to access a system folder (D:\Recovery), which fails.:
Has anyone else encountered this specific “Access Denied” error with the .NET SDK (v3.4.5) after calling SignDocument? If you did, how did you manage to resolve it or correctly configure the SDK’s working directory? Any help would be greatly appreciated. Thank you!

Did you found any solution for this issue ?

hi … i have may be the same problem with zatca-einvoicing-sdk-DotNet-238-R3.4.5 and zatca-einvoicing-sdk-DotNet-238-R3.4.6 … but the problem i have is “Signture not vaild” when i siging the invoice …. i use NetFramework 4.8 ….. does anyone solve this issue ?? the previous version R3.4.4 was working fine with me

1 Like

Yes, I resolved the issue. I placed the entire “Data” folder inside my main project folder, so now the code, rules, and UBL files follow the same directory structure as in the downloaded ZATCA SDK

1 Like