【ASP.NET】程序错误:error CS2001: Source file
来源:互联网 发布:mac windows抹掉 编辑:程序博客网 时间:2024/05/17 05:16
【问题】动态调用WebServices时,error CS2001: Source file ‘C:\WINDOWS\TEMP\wctb6cvw.0.cs’ could not be found
【分析】表明看起来是无法找到源文件,实际上是asp.net的运行帐户对Windows\temp\目录没有写入的权限
【结论】给temp目录加上network services账户的权限,测试不能通过,实际需要加上当前iis站点使用的账户,或者增加users用户组对该目录的权限。
搜索一下发现有个人提供了另外一种解决方法:首先在你的站点下建立一个目录名字随便取,我们取temp,
然后查询到temp的物理路径,自己写程序就可以查询出来了,我们的是(d:\webroot\xxxx.com\wwwroot\temp)
然后配置web.config文件,增加<compilation tempDirectory=”d:\webroot\xxxx.com\wwwroot\temp” />如果你的文件里已经有 这个节点compilation,你只需要为这个节点增加tempDirectory属性,保存即可
但是Web服务的序列化代码会被解析到系统环境的(TEMP也许是TMP)临时文件夹,因此你需要创建global.asax文件并且在Application_Start中添加如下代码:
Environment.SetEnvironmentVariable(“TEMP”,”d:\webroot\xxxx.com\wwwroot\temp”);
Environment.SetEnvironmentVariable(“TMP”,”d:\webroot\xxxx.com\wwwroot\temp”);
保存即可
--------------------------------------------------------------------------
关注中国煤炭市场导购网 http://www.meitan123.cn
- 【ASP.NET】程序错误:error CS2001: Source file
- ASP.NET程序错误:error CS2001: Source file 'C:\WINDOWS\TEMP\wctb8vqw.0.cs' could not be found error
- .net C# 动态编译 cs2001 错误 处理
- Source Insight 3 出现错误:Error:File read error
- source insight 保存文件出现File seeking error错误
- 创建ASP.NET程序时候发生错误 HTTP/1.0 500 Server Error
- 创建asp.net程序时候发生错误http/1.0 500 server error
- ASP.NET错误处理:Runtime Error
- ASP.NET Error(ASP.NET 常见错误汇总及解决方法)
- source insight,Error:File read error问题
- 关于iar for stm8: iar Fatal Error[Pe1696]: cannot open source file "xx.h"错误
- ASP.NET错误处理和程序优化
- ASP.NET错误处理和程序优化
- 运行ASP.NET 出现程序错误
- 解决eclipse调试c++程序出现“No source file named” error
- error : cannot open source file "SDKDDKVer.h"
- error: C1083: Cannot open source file: *idl
- Error:cannot open source file "itkImageToVTKImageFilter.h"
- js中数组是否包含另一个数组检测的方法
- 仿5sing图片轮播,向5Sing致敬
- SecureCRT 绝佳配色方案, 保护你的眼睛
- 输入日期判断某年第几天
- Oracle数据库SQL语句操作记录
- 【ASP.NET】程序错误:error CS2001: Source file
- spring多个定时任务job.xml配置
- Android多线程之java.lang.IllegalThreadStateException: Thread already started
- 如何使用TestFlight进行Beta测试
- oracle多表联合查询,统计查询,组函数,排序(order by),分组过滤(having分组完后再统计),子查询,集合运算
- Spring 主键序列值获取
- Android:新手必备的常用代码片段整理(二)
- js实现删除本地文件
- Oracle限制用户只能从指定IP登录