1

I want to copy one file on the network drive ex. 192.168.0.32/ODfolder I have hosted C# API on my IIS but when I call API they give me the error "Access Denied"

but when i debug on localhost it will run fine without error and copy the file on the network drive too.

Regards Rajat Khandelwal

2 Answers2

1

Check which user you are connecting using .Local IIS uses IIS_USERS. change the user or add permissions to user connecting to the file.

0

First check whether that network drive is accessible from the machine where you have hosted your application, if yes then give write access on that folder to everyone or the user under which your application pool is running which is hosting your C# API. Hope this helps. Happy coding...

Abhinaw Kaushik
  • 607
  • 6
  • 18