CS0016:无法写入输出文件 [英] CS0016: Could not write to output file

查看:136
本文介绍了CS0016:无法写入输出文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨先生,

当我运行我的应用程序时,我收到错误CS0016:无法写入输出文件c:\ WINDOWS \ MicrosoftMicrosoft.NET \ Framework \ v2.0.50727 \Temporary ASP.NET Files\website3 \d4ad02e2\1ca36343\App_Web_default.aspx.cdcab7d2._gn9gwvv.dll' - '访问被拒绝。'

in my系统。



我为c:\windows \ temp和C:\ WINDOWS \ Microsoft等文件夹提供了iusr和networkservice等用户的完全权限。 NET\Framework\v2.0.50727\Temporary ASP.NET Files。但我无法创建一个新的网站。



[注意:我使用Visual Studio 2005安装了IIS并且也使用了aspnet_regiis工具]





仍然得到同样的错误。请给我解决这个问题的方法。

Hi sir,
When i run my application, I am getting the error "CS0016: Could not write to output file 'c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\website3\d4ad02e2\1ca36343\App_Web_default.aspx.cdcab7d2._gn9gwvv.dll' -- 'Access is denied. '"
in my system.

I gave full permission for users like iusr and networkservice for the folders like c:\windows\temp and C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files. But i cant able to create a new website.

[Note: I am using visual studio 2005 with installed IIS and did the aspnet_regiis tool also]


Still getting the same error. Kindly give me the solution for this problem.

推荐答案

我不认为你的ASP.NET应用程序可以直接访问这个目录。这完全与权限无关。您应该了解HTTP服务器在沙盒环境中执行Web应用程序,这允许您的应用程序仅访问位于站点根目录下的服务器主机文件系统的那些文件。



临时ASP.NET文件目录的用途说明如下: http: //msdn.microsoft.com/en-us/library/ms366723.aspx [ ^ ]。



此目录用于存储程序集,因为它们已被编译。显然,这是ASP.NET子系统的内部机制的一部分,并不是您站点的一部分。难怪你无法访问它,你不应该试图获得这样的访问权。



-SA
I don't think this directory is accessible to your ASP.NET application directly. This is not related to permissions at all. You should understand that the HTTP servers execute Web applications in a sandboxed environment, which allows your application to access only those files of the server host's file systems which are located under the root directory of your site.

The purpose of "Temporary ASP.NET Files" directory is explained here: http://msdn.microsoft.com/en-us/library/ms366723.aspx[^].

This directory is used for storing of assemblies as they are get compiled. Apparently, this is a part of internal mechanism of the ASP.NET subsystem and is not a part of your site. No wonder you don't have access to it, and you should not try to get such access.

—SA


这篇关于CS0016:无法写入输出文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆