在我们的生产服务器上,win win 32 bit,运行mvc 3 .NET 4站点, 我突然在错误日志中收到此消息 “服务器无法打开此程序,因为许可证强制执行系统已被篡改或损坏”
所有软件都已获得许可,我在服务器上安装了一些新的东西已经有一段时间了(几周)。
当对象序列化为XML时,在调用控制器方法时抛出异常。 Se从下面的堆栈跟踪中提取。
有没有人知道如何找出这里的错误?
最好的问候和TIA /斯塔
from the Stacktrace: at System.CodeDom.Compiler.Executor.ExecWaitWithCaptureUnimpersonated(SafeUserTokenHandle userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine)
at System.CodeDom.Compiler.Executor.ExecWaitWithCapture(SafeUserTokenHandle userToken, String cmd, String currentDir, TempFileCollection tempFiles, String& outputName, String& errorName, String trueCmdLine)
at Microsoft.CSharp.CSharpCodeGenerator.Compile(CompilerParameters options, String compilerDirectory, String compilerExe, String arguments, String& outputFile, Int32& nativeReturnValue, String trueArgs)
at Microsoft.CSharp.CSharpCodeGenerator.FromFileBatch(CompilerParameters options, String[] fileNames)
at Microsoft.CSharp.CSharpCodeGenerator.FromSourceBatch(CompilerParameters options, String[] sources)
at Microsoft.CSharp.CSharpCodeGenerator.System.CodeDom.Compiler.ICodeCompiler.CompileAssemblyFromSourceBatch(CompilerParameters options, String[] sources)
at System.CodeDom.Compiler.CodeDomProvider.CompileAssemblyFromSource(CompilerParameters options, String[] sources)
at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)
at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies)
at System.Xml.Serialization.XmlSerializer.GenerateTempAssembly(XmlMapping xmlMapping, Type type, String defaultNamespace, String location, Evidence evidence)
at System.Xml.Serialization.XmlSerializer..ctor(Type type, XmlAttributeOverrides overrides, Type[] extraTypes, XmlRootAttribute root, String defaultNamespace, String location, Evidence evidence)
答案 0 :(得分:3)
我想我已经找到了
查看堆栈跟踪并发现崩溃发生在CodeDom编译临时程序集以进行Xml序列化时,我用Google搜索了这个,然后查看了以下页面 Error consuming Web Service from Winform App - "Cannot execute a program..."它引导我http://msdn.microsoft.com/en-us/library/system.xml.serialization.xmlserializer.aspx。
如果你对XmlSerializer使用了错误的构造函数,它会大声而明确地说会发生内存泄漏。像我们可能的结果一样崩溃。
因此,在重写了我们的Xml序列化服务之后,我现在不喜欢这些崩溃和令人印象深刻的性能提升,因为它涉及Xml序列化。
/ Z