“CS0016:无法写入输出文件"在 IIS 7 中启动应用程序时出错 [英] "CS0016: Could not write to output file" error when starting an app in IIS 7

查看:21
本文介绍了“CS0016:无法写入输出文件"在 IIS 7 中启动应用程序时出错的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我运行的是 Windows 7,在此设置中通常不是开发人员,并且最近在 C# 中构建了 WCF Rest 服务,我现在正尝试将其部署到本地计算机上的 IIS.经过一番折腾,我设置了应用程序,但是当我导航到应用程序时,我收到一条错误消息:编译错误

I am running Windows 7, and am not usually a developer in this setting, and have recently built a WCF Rest Service in C#, that I'm now trying to deploy to IIS just on my local machine. After much wrangling, I setup up the application, but when I navigate to the application, I get an error message: Compilation Error

说明:在编译服务此请求所需的资源期间发生错误.请查看以下特定错误详细信息并适当修改您的源代码.

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

编译器错误消息:CS0016:无法写入输出文件 'c:WindowsMicrosoft.NETFramework64v4.0.30319Temporary ASP.NET Filesscom_sibyll8c0b945e9329016App_global.asax.eagmqgcd.dll' -- '访问被拒绝.'

Compiler Error Message: CS0016: Could not write to output file 'c:WindowsMicrosoft.NETFramework64v4.0.30319Temporary ASP.NET Filesscom_sibyll8c0b945e9329016App_global.asax.eagmqgcd.dll' -- 'Access is denied. '

我已尽我所能搜索网络,并更改了临时 ASP.NET 文件文件夹的权限,以允许网络服务帐户拥有完全权限,并对 Temp 文件夹执行相同操作.它在失败之前复制了许多文件,所以它大概有写权限,所以我检查了从我的源文件夹读取的权限,这也有效.我还注意到它在尝试缓存 DLL 文件时出错,并尝试关闭我的防病毒保护以及关闭 UAC,只是为了看看我是否能找出阻止这种情况发生的原因.我现在没有想法了.大家有什么建议吗?

I have hunted the web to the best of my ability, and have changed the permissions on the Temporary ASP.NET Files fodler to allow the Network Service account full rights, and done the same with the Temp folder. It copies a number of files before failing, so it has write permissions presumably, so I checked the permissions to read from my source folder, and that is working as well. I additionally noted it's crapping out when it tries to to cache the DLL file, and tried turning off my Antivirus protection, as well as turning off UAC, just to see if I could figure out what is blocking this from occurring. I'm fresh out of ideas now. Anybody have any suggestions?

推荐答案

听起来像运行 WCF 服务的帐户无权写入临时 ASP.NET 文件"目录.

Sounds like the account that the WCF service is running under does not have access to write to the "Temporary ASP.NET Files" directory.

您也可以尝试重新运行 regiis.

You could also try re-running regiis.

%windir%Microsoft.NETFramework64v4.0.30319aspnet_regiis -i

%windir%Microsoft.NETFramework64v4.0.30319aspnet_regiis -i

ASP.NET IIS 注册工具 (Aspnet_regiis.exe)

这篇关于“CS0016:无法写入输出文件"在 IIS 7 中启动应用程序时出错的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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