5

I am facing CryptographicException: The system cannot find the file specified error when application is hosted on azure on using certificates? For now all i can see is that we have to add WEBSITE_LOAD_USER_PROFILE=1 to app settings in azure if we are using azure app services. But how do we achieve it if we are not using app services

Nihal
  • 53
  • 1
  • 5

1 Answers1

5

No, you can't.

Even if you use IIS 7, your option is to set Load User Profile option as True in the IIS Application Pool configuration, you could not set it in the web config file. If you use other cloud services, I think there also should be a setting like WEBSITE_LOAD_USER_PROFILE in azure.

For more details, you could refer to the links below.

  1. X509Certificate Constructor Exception

  2. What exactly happens when I set LoadUserProfile of IIS pool

  3. Can I set application pool in webconfig

Joy Wang
  • 39,905
  • 3
  • 30
  • 54
  • For me things did't work even after setting `WEBSITE_LOAD_USER_PROFILE` to 1 when my app service plan was using `Free` tier. It started to work after I upgraded it to `S1` tier. – RBT Nov 22 '21 at 09:38