VS2010 IIS Express 安全
我正在开发一个 MVC 应用程序,最终用户必须上传文件,并且应用程序需要将该文件放在本地共享 (C:\Files) 上。该文件夹具有开放的 NTFS 权限(每个人都具有完全访问权限),但当我尝试上传文件时,IIS Express 对我咆哮,说写入访问被拒绝。有趣的是,如果我删除该目录,IIS Express 重新创建它没有问题,只是不会在其中存储任何内容。
很明显,这是 IIS Express 的安全设置。有人可以告诉我它是什么设置,它在哪里,以及我需要将其更改为什么才能使此过程正常工作?我见过很多类似的问题,但它们似乎集中在 NTFS 权限等方面,我必须假设“每个人”实际上意味着“每个人”。
更新 我添加了 Windows 7 标签,因为这可能相关(64 位)
I'm working on an MVC application where the end user has to upload a file, and the application needs to put the file on a local share (C:\Files). The folder has wide open NTFS permissions (Everyone has full access), but when I try to upload the file, IIS Express barks at me, saying write access is denied. Interestingly enough, if I blow away the directory, IIS Express has no problem recreating it, it just won't store anything in it.
It seems obvious this is a security setting with IIS Express. Can someone tell me what setting it is, where it is, and what I need to change it to so that I can get this process to work? I've seen a lot of similar questions, but they seem focused on NTFS permissions and the like, and I must assume that "Everyone" does in fact mean "Everyone".
UPDATE I added the Windows 7 tag as this may be related (64 bit)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可以贴一下你的上传代码吗?这对我来说效果很好:
上面的代码适用于本地 IIS 和安装了 MVC3 的实时站点。
Can you post your upload code? This one works fine for me:
The above code works for both local IIS and a live site with MVC3 installed.