Hi @Zohaib Ali,
This may be a permission issue, which the app runs under the configured identity for your web site (ApplicationPoolIdentity) rather than under your own account locally. If you are sure you have deployed the project correctly on IIS, you can try to select a high-privilege account as your application pool identity (such as local system or network system).
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 email notification for this thread.
Best regards,
Yurong Dai