报错如下
Server Error in '/' Application.
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.
Compiler Error Message: CS0002: Unable to load message string from resources.
Source Error:
[No relevant source lines]
Source File: Line: 0
在你设置了文件夹权限、重装.net4.0之后,如果还报错,可以阅读本文进行参考
新建空网站,添加一个空的aspx页面,放到服务器上。看aspx页面是否可以运行。
如果可以
说明环境还能凑活用。
将网站源码全部考到服务器上
包括解决方案中其他工具类项目
这时在运行一个简单的aspx页面,看是否可以运行。
今天发现一个新的问题导致上述这个
在app_code下
public static string GaoDeKey {
get {
return ConfigurationSettings.AppSettings["XXXX"];
}
}
经过测试,应该是这端代码引起了问题。
其中
ConfigurationSettings.AppSettings已过时
应该是 已过时的东西会引起类似的报错产生上述问题。
解决办法:
将过时的方法换成这个。
System.Configuration.ConfigurationManager.AppSettings["XXX"]