Hi @mostafa ahmed,
In production mode I mean the publish where I host the site on IIS local server
I created a simple example and reproduced your problem. Please check if the following directories exist:
- For a 32-bit version of Office on a 32-bit Windows computer or a 64-bit version of Office on a 64-bit Windows computer
C:\Windows\System32\config\systemprofile\Desktop
- For the 32-bit version of Excel/Office on a 64-bit Windows computer:
C:\Windows\SysWOW64\config\systemprofile\Desktop
In most cases (my test too), you should be able to solve this problem by creating the first directory, unless your environment is somewhat special, you can try creating a second directory to see if it works for you.
In addition, I found that you posted the same post in the Stackoverflow forum. If they are all posted by you, I will continue to follow up this issue in Q&A, thank you for your understanding.
Best regards,
Xudong Peng
If the answer is the right solution, please click "Accept Answer" and kindly upvote. 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.