我有一个在框架 3.5 上运行的 web 应用程序,并安装在多个客户端上,运行良好。
除了这个客户端......应用程序提供的所有网络服务都失败并显示以下错误消息:
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: CS0103: The name 'Encoding' does not exist in the current context
Source Error:
Line 100: string EscapedFileName { Line 101: get { Line 102: return HttpUtility.UrlEncode(FileName, Encoding.UTF8); Line 103: } Line 104: }
Source File: c:\Windows\Microsoft.NET\Framework\v2.0.50727\CONFIG\DefaultWsdlHelpGenerator.aspx Line: 102
Google 指出应用程序可能针对框架的客户端版本或系统缺少 system.web dll。
我已经检查过这两种可能性都不是原因......有什么想法吗?
最佳答案
尝试使用命名空间
使用 System.Text;
关于asp.net - CS0103 : The name 'Encoding' does not exist in the current context,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22860782/