question

CalvinChan-2376 avatar image
0 Votes"
CalvinChan-2376 asked CalvinChan-2376 commented

Error occurred during a cryptographic operation

Hi,

I'm currently facing this "Error occurred during a cryptographic operation" error on one of the production server.
I have the same application running on another server for the past 10 years, and never encounter the same issue.

Whenever this error occurred, I can make a quick fix by restarting the IIS server, and after the IIS restarted, everything will be back to normal.
But eventually it will happen again after a few hours later, it also happened to be running smoothly without hitting this error for the whole day.

I have tried by adding fix Machine Keys and Validation Method in the web.config, but it seems doesn't work for my situation.

Aside from this cryptographic error, I also noticed that there is a large amount of "The keyset is not defined." and "Invalid viewstate." error from the application log.
Appreciated if I can receive any help from you.

168908-cryptoerror.png


dotnet-visual-basicwindows-server-iisdotnet-aspnet-generaldotnet-aspnet-webforms
cryptoerror.png (43.7 KiB)
· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @CalvinChan-2376 ,

Did you move this application from old server to new server? If so, how you move it?

This kind of exception needs to be pinpointed to a specific piece of code to know what caused the error. I think you can use Debug Diagnostic Tool to get a detailed error log. Then use Debug Diagnostic Analysis to get a readable report.

0 Votes 0 ·

Hi @BruceZhang-MSFT,

Yes, I move by copy the source code from the old server to the new server.

I have not experience in using this Dedug Diagnostic tool before, but I have done some research on this tool and below is the download link that I found.
https://www.microsoft.com/en-us/download/confirmation.aspx?id=58210

May I know am I getting the right installer? If yes, may I know the steps of setting up this?

Many thank in advance.

0 Votes 0 ·

Hi @BruceZhang-MSFT,

I have completed the diagnostic test and attached the exception report gotten from the diagnostic tool.

Appreciated you could help to scan through and pin point the exception that might causes the cryptographic error.186313-w3wp-defaultapppool-pid-12324-date-03-15-2022-time.txt


0 Votes 0 ·

0 Answers