Expand my Community achievements bar.

Authentication works in one Visual Studio Project but not another

Avatar

Level 1

HI:

 

I work in VB.net and C# in Visual Studio (mainly 2022).

 

I downloaded the Adobe pdf samples and created private.key and pdfservices-api-credentials.json files.  The authentication works fine in the ExportPDFToDocx sample project, even after I moved that project to a new Visual Studio solution.

 

When I create a new VB.net or C# project in a new solution, the authentication no longer works.  The app just hangs at "Refreshing the session token".  See log below.  This happens in both VB.net and C# projects.

 

I suspect I am missing something basic.  Do  I need a new private key and json file for each project or solution?

 

Thanks.

 

Log:

 

2023-01-16 18:26:06,096 [1] INFO Adobe.PDFServicesSDK.core.service.ExportPDFService - Exporting a pdf to format docx from Local File source:exportPdfInput.pdf
2023-01-16 18:26:06,134 [1] DEBUG Adobe.PDFServicesSDK.core.auth.JwtAuthenticator - Session token has been expired. Required to refresh the token
2023-01-16 18:26:06,135 [1] DEBUG Adobe.PDFServicesSDK.core.auth.JwtAuthenticator - Refreshing the session token.
2023-01-16 18:34:17,170 [1] INFO Adobe.PDFServicesSDK.core.service.ExportPDFService - Exporting a pdf to format docx from Local File source:exportPdfInput.pdf
2023-01-16 18:34:17,211 [1] DEBUG Adobe.PDFServicesSDK.core.auth.JwtAuthenticator - Session token has been expired. Required to refresh the token
2023-01-16 18:34:17,211 [1] DEBUG Adobe.PDFServicesSDK.core.auth.JwtAuthenticator - Refreshing the session token.
2023-01-16 18:36:13,920 [1] INFO Adobe.PDFServicesSDK.core.service.ExportPDFService - Exporting a pdf to format docx from Local File source:exportPdfInput.pdf
2023-01-16 18:36:13,960 [1] DEBUG Adobe.PDFServicesSDK.core.auth.JwtAuthenticator - Session token has been expired. Required to refresh the token
2023-01-16 18:36:13,960 [1] DEBUG Adobe.PDFServicesSDK.core.auth.JwtAuthenticator - Refreshing the session token.
2023-01-16 18:43:31,193 [1] INFO Adobe.PDFServicesSDK.core.service.ExportPDFService - Exporting a pdf to format docx from Local File source:exportPdfInput.pdf
2023-01-16 18:43:31,231 [1] DEBUG Adobe.PDFServicesSDK.core.auth.JwtAuthenticator - Session token has been expired. Required to refresh the token
2023-01-16 18:43:31,231 [1] DEBUG Adobe.PDFServicesSDK.core.auth.JwtAuthenticator - Refreshing the session token.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Reply

Avatar

Level 1

Original poster here.

 

I tried setting up a new project in the Adobe Developer Console and using the new private.key and updated info in the JSON file.  I'm having the same issue--no errors, but the code hangs at:

 

FileRef result = exportPdfOperation.Execute(executionContext);

 

The private.key and JSON file are in both the main project folder and in the Debug.netcoreapp3.1 folder.  The code is virtually identical to the code in the original sample (which continues to run without any problems).

 

Any suggestions?