请求类型为“System.Security.Permissions.FileIOPermission...PublicKeyToken=b77a5c561934e089”的权限失败的
我在我的主机上上传图像时收到此错误。
请求“System.Security.Permissions.FileIOPermission、mscorlib、Version=4.0.0.0、Culture=neutral、PublicKeyToken=b77a5c561934e089”类型的权限失败。
以前一直都是这样的。唯一改变的是我必须删除上传文件夹并重新创建它并再次设置其权限。难道那里出了什么问题吗?
我研究过这个问题,有些人建议在 web.config 文件中将信任级别设置为 full,但没有人真正解释如何做到这一点。上传在本地进行,这就是为什么我认为这是我的主机上的权限问题。我正在用头撞墙,因为我将上传文件夹的权限设置为读/写,并且它抛出了相同的错误......我应该对整个应用程序执行此操作吗?
I'm getting this error when uploading an image on my hosting.
Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.
It's always worked before. The only thing that's changed is I had to delete the uploads folder and recreate it and set its permissions again. Could something have gone wrong there?
I've researched this issue and some people have suggested setting the trust level to full in your web.config file but none of them actually explain how to do this. The upload works locally, which is why I believe its a permissions issue on my hosting. I'm banging my head against the wall because I set the permissions of the Uploads folder to read/write and it's throwing the same error...should I do this for the whole application?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
好吧,我不确定问题是什么,但它自行解决了。可能是在托管端设置权限时出现延迟。
Well I'm not sure what the issue was, but it fixed itself. Possibly a delay in setting the permissions on the hosting side.