ASP.NET permissions issues
Im using Windows Server 2008, IIS7, .NET 4 and when I use the FileUpload control to save a file to a directory I get :
Access to the path 'C:\xxx\Websites\CMS\Admin\test' is denied.
I have given the test folder full con开发者_如何学Gotrol permissions for NETWORK SERVICE but it makes no difference.
I have given full control to the Everyone user but makes no difference.
It might have something to do with the fact that up in the CMS folder there is a MVC web application and in the CMS\Admin folder there is a web forms web application. It is the web forms web application that is trying to upload the file and getting the permissions error.
Can anyone offer a suggestion.
Are you running your application in Medium Trust? Medium Trust does not allow file IO outside of it's own virtual path hierarchy.
Check the web.config for a <trust level="Medium" ...
element.
Check the Application Pool that your site is running under and make sure that it is running as NetworkService instead of PoolIdentity.
精彩评论