Request for the permission of type 'System.Security.Permissions.FileIOPermission.. failed

前端 未结 2 1389
生来不讨喜
生来不讨喜 2021-01-25 19:32

I am getting this error when calling a web service method which writes to a file on the local drive on Windows 2003.

\"System.Security.SecurityException: Request for the

相关标签:
2条回答
  • 2021-01-25 20:08

    Finally we have found the issue. After building the files in Windows we put them in a zip file. When the files are added to the zip windows adds a blocking property to all files which remains after unzipping the folder. These caused the files to not be able to run properly. The "block" property can be removed by right-clicking on the files (one at the time), select "Properties" and then clicking the "Unblock" button at the bottom. Here is an example picture:

    https://www.howtogeek.com/wp-content/uploads/2011/08/image10.png

    To prevent windows from adding this blocking property, one can look at the following thread:

    Can I stop windows from “Blocking” zip files

    0 讨论(0)
  • 2021-01-25 20:10

    After a lot of troubleshooting, it boiled down to a mistake I made in web.config where the location tag had a path of www.example.com but in IIS it was example.com!

    0 讨论(0)
提交回复
热议问题