Share via

Creating JWToken in VM throwing error

mutawar company 0 Reputation points
2024-02-14T16:44:40.5+00:00

I am getting an error in my code which I use to generate JWToken to access the Apple's transaction info API.

CngKey privateKey = CngKey.Import(decodedKey, CngKeyBlobFormat.Pkcs8PrivateBlob);

This is the line of code which is throwing error message as "The system cannot find the file specified.". But this code works fine in my local system.

Developer technologies | C#
Developer technologies | C#

An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.

0 comments No comments

1 answer

Sort by: Most helpful
  1. Anonymous
    2024-02-15T09:35:30.52+00:00

    Hi @mutawar company , Welcome to Microsoft Q&A,

    As you said, if it works fine on your local system, in the VM it says file not found. Please check whether this file exists in the VM and whether the address is correct. Secondly, it may be that the permissions are insufficient. Try to start the program with administrator rights.

    Best Regards,

    Jiale


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment". 

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.