我们的网站编译自定义的c#代码从数据库加载取决于配置。在我们的一台开发人员机器上,我们在编译时得到一个没有找到的文件。此代码在其他开发人员机器上运行良好。当在开发人员机器上的Visual开发服务器下运行时,它也可以正常工作。当在此特定计算机上在IIS下运行时,它不工作。以前,当网站安装在默认网站的子目录下时,它是工作的,但是自从移到IIS中的单独站点之后,它就无法工作了。
CompilerResults results = compiler.CompileAssemblyFromSource(
compilerParameters, source);
if (results != null && results.Errors.HasErrors)
{
StringBuilder stringBuilder = new StringBuilder();
foreach (CompilerError error in results.Errors)
{
stringBuilder.AppendLine(error.ErrorText);
}
throw new StoreTechException(
String.Format("Unable to generate KPI calculation assembly:{0}{1}",
Environment.NewLine, stringBuilder.ToString()),
StoreTechExceptionTypes.Error);
}
return results;生成的错误消息是:
CS2001: Source file 'C:\\Windows\\TEMP\\zyxl54ci.0.cs' could not be found
CS2008: No inputs specified由于它在Visual开发服务器下工作,而不是IIS,所以我们想知道这是否是权限问题。
发布于 2013-11-12 12:28:05
应用程序池标识需要temp dir (C:\Windows\TEMP)上的写访问。
https://stackoverflow.com/questions/19861277
复制相似问题