[英]IIS 6.0 and ASP.NET - Could not write to output file … The directory name is invalid
I'm running IIS 6.0 on Windows 2003 and started getting this error: 我在Windows 2003上运行IIS 6.0并开始收到此错误:
Compiler Error Message: CS0016: Could not write to output file 'c:\\WINDOWS\\Microsoft.NET\\Framework64\\v2.0.50727\\Temporary ASP.NET Files\\root\\7382c13f\\ea9b3ff7\\App_global.asax.zodyof_q.dll' -- 'The directory name is invalid. '
I've checked all the permissions, and everything is as it needs to be - plus, the error message doesn't mention permissions. 我已经检查了所有权限,并且一切都是需要的 - 而且,错误消息没有提到权限。 I've tried the following already:
我已经尝试了以下内容:
c:\\WINDOWS\\Microsoft.NET\\Framework64\\v2.0.50727\\Temporary ASP.NET Files\\root
, then running iisreset
c:\\WINDOWS\\Microsoft.NET\\Framework64\\v2.0.50727\\Temporary ASP.NET Files\\root
,然后运行iisreset
c:\\WINDOWS\\Microsoft.NET\\Framework64\\v2.0.50727\\Temporary ASP.NET Files\\root
, then running iisreset
c:\\WINDOWS\\Microsoft.NET\\Framework64\\v2.0.50727\\Temporary ASP.NET Files\\root
,然后运行iisreset
c:\\WINDOWS\\TEMP
, then running iisreset
. c:\\WINDOWS\\TEMP
上的权限,然后运行iisreset
。 Any suggestions? 有什么建议?
Other notes/responses: 其他说明/回复:
I've found an answer that is applicable if you've installed ANTS profiler and it crashed while profiling. 我已经找到了一个适用的答案,如果您安装了ANTS探查器并且在分析时崩溃了。 This KB Article describes one of the solutions:
此KB文章描述了其中一个解决方案:
http://www.red-gate.com/supportcenter/Content.aspx?p=ANTS%20Profiler&c=knowledgebase \\ANTS_Profiler\\KB200903000362.htm http://www.red-gate.com/supportcenter/Content.aspx?p=ANTS%20Profiler&c=knowledgebase \\ ANTS_Profiler \\ KB200903000362.htm
%SystemRoot%
, and then name it Temp
. %SystemRoot%
下创建一个临时文件夹,然后将其命名为Temp
。 %SystemRoot%\\TEMP
in the Variable Value box, and then click OK. %SystemRoot%\\TEMP
,然后单击“确定”。 To reset Internet Information Services (IIS), type iisreset on the command prompt. 要重置Internet信息服务(IIS),请在命令提示符下键入iisreset。
I had the same error running IIS 7.0 / Vista Ultimate / .NET 2.0 Web App. 我在运行IIS 7.0 / Vista Ultimate / .NET 2.0 Web App时遇到了同样的错误。 I tried setting "Full Control" permissions on temporary folder for NETWORK SERVICE user (right-click on folder
c:\\WINDOWS\\Microsoft.NET\\Framework64\\v2.0.50727
, Properties, Security tab) and turning off antivirus and UAC, but it didn't help. 我尝试在NETWORK SERVICE用户的临时文件夹上设置“完全控制”权限(右键单击文件夹
c:\\WINDOWS\\Microsoft.NET\\Framework64\\v2.0.50727
,属性,安全性选项卡)并关闭防病毒和UAC,但它没有帮助。
But this worked as magic: Open IIS Manager -> Select "View Application Pools" from right menu -> Select "Advanced Settings" -> Set your username (and password) in "Identity" property -> Restart IIS 但这很神奇:打开IIS管理器 - >从右侧菜单中选择“查看应用程序池” - >选择“高级设置” - >在“身份”属性中设置用户名(和密码) - >重新启动IIS
If this doesn't work, check additionally that you're an owner of c:\\WINDOWS\\Microsoft.NET\\Framework64\\v2.0.50727
folder (right-click, Properties, Security tab, Advanced, Owner tab) 如果这不起作用,另外检查您是
c:\\WINDOWS\\Microsoft.NET\\Framework64\\v2.0.50727
文件夹的所有者(右键单击,属性,安全选项卡,高级,所有者选项卡)
To every body who still has the problem! 对每个仍然有问题的人! Mine is solved by the followings http://support.microsoft.com/kb/825791
我的解决方法如下: http://support.microsoft.com/kb/825791
Use SysInternals FileMon (or ProcMon if you like) to see the real file it is bitching about. 使用SysInternals FileMon(或ProcMon,如果你愿意)来查看它正在讨厌的真实文件。 You can restrict it to just monitoring IIS if you have a busy server, although I'd start with all processes and just capture a couple of seconds of output.
如果你有一个繁忙的服务器,你可以将它限制为只监控IIS,虽然我从所有进程开始,只捕获几秒钟的输出。
Before running, ensure IIS has been reset using iisreset /restart so that the error is not cached from before. 在运行之前,请确保已使用iisreset / restart重置IIS,以便之前不缓存错误。
Ryan 瑞安
OK, when you repaired the installation do you mean ASPNET_REGIIS -u / ASPNET_REGIIS -i ? 好的,当您修复安装时,您的意思是ASPNET_REGIIS -u / ASPNET_REGIIS -i? that would fix disk permissions.
这将修复磁盘权限。
It might be your virusscanner; 它可能是你的病毒学家; exclude your .net temporary folders / inetpub if you can and if its safe.
如果可以,如果可以,请排除.net临时文件夹/ inetpub。
From windows server 2003 x64 , IIS6 , net 4.0 , asp application I was presented with the error: 从Windows Server 2003 x64,IIS6,net 4.0,asp应用程序我出现了错误:
Compiler Error Message: CS0016: Could not write to output file 'c:\\WINDOWS\\Microsoft.NET\\Framework64\\v2.0.50727\\Temporary ASP.NET Files\\root\\7382c13f\\ea9b3ff7\\App_global.asax.zodyof_q.dll' -- 'The directory name is invalid.
编译器错误消息:CS0016:无法写入输出文件'c:\\ WINDOWS \\ Microsoft.NET \\ Framework64 \\ v2.0.50727 \\ Temporary ASP.NET Files \\ root \\ 7382c13f \\ ea9b3ff7 \\ App_global.asax.zodyof_q.dll' - '目录名无效。 '
“
It was resolved when I created the DIR 我在创建DIR时解决了问题
d:\\temp
d:\\ TEMP
No idea why D:\\temp was important but I will update this answer with a reason as soon as I know. 不知道为什么D:\\ temp很重要,但我会尽快更新这个答案。
Permissions on the DIR were: DIR的权限是:
admin full
管理员已满
creator owner special
创作者所有者特别
system full
系统已满
users read&execute / list / read
用户阅读和执行/列表/阅读
No IIS specific user permission was defined. 未定义任何IIS特定用户权限。
Working to migrate to IIS7 host but thought this answer maybe helpful for someone. 努力迁移到IIS7主机,但认为这个答案可能对某人有帮助。
Here is the final solution :) 这是最终解决方案:)
First give all the permission to ASPNET account , NETWORK SERVICE account to "ASP.NET Temporary files" folder under whichever the framework it is using. 首先将ASPNET帐户,NETWORK SERVICE帐户的所有权限授予“ASP.NET临时文件”文件夹,无论它使用哪个框架。
like C:\\windows\\microsoft.net\\framework\\v2.xxx\\ASP.NET Temporary files. 喜欢C:\\ windows \\ microsoft.net \\ framework \\ v2.xxx \\ ASP.NET临时文件。
Check the temporary folder configured for your machine under environment variables for TEMP and TEMP. 在TEMP和TEMP的环境变量下检查为您的机器配置的临时文件夹。 For that folder also give all the permission to ASPNET account , NETWORK SERVICE accout.
对于该文件夹,还授予ASPNET帐户,NETWORK SERVICE accout的所有权限。 Reset the IIS It should be working fine.
重置IIS它应该工作正常。
必须尝试禁用临时asp.net文件文件夹的Windows索引服务
I received the same error. 我收到了同样的错误。 The anti-virus/security software (McAffee Viruscan Enterprise) was preventing visual studio tool csc.exe to dynamically compile code and create the entity data model dll in the directory folder above which falls under the windows directory folder.
反病毒/安全软件(McAffee Viruscan Enterprise)阻止visual studio工具csc.exe动态编译代码并在上面的目录文件夹中创建实体数据模型dll,该目录文件夹位于windows目录文件夹下。 There is a section in McAffee called access protection that has a rule called Maximum Protection that prohibits creating executable files in the windows directory folder.
McAffee中有一个名为访问保护的部分,它有一个名为Maximum Protection的规则,禁止在windows目录文件夹中创建可执行文件。 Simply temporary disable the rule or access protection to compile the website successfully.
只需临时禁用规则或访问保护即可成功编译网站。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.