本文介绍了Xml序列化间歇性失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 我们有一个执行大量xml序列化的ASP.NET站点。序列化发生在lbolibrary dll中。偶尔我们会在Winnt\temp文件夹中获得一个包含以下内容的.out文件: C:\ WINNT \ system32> c:\ winnt \microsoft.net \ framework\v1.1.4322\csc.ex e / t:library / utf8output /R:"c:\winnt\assembly\gac\system.xml\1.0.5000.0__b7 7a5c561934e089\system.xml.dll" /R:"c:\winnt\assembly\gac\lbolibrary\1.0.0.0__30b57 061a1ea7c52 \lbolibrary.dll" /R:"c:\winnt\microsoft.net\framework\v1.1.4322\msco rlib.dll" /out:"C:\WINNT\TEMP\yxouf9ik.dll" / debug- / optimize + / w:1" C:\ WINNT \ TEMP \yxouf9ik.0.cs 你能解释一下这个问题吗?我们的用户获得了一个filenotfound异常。这种情况每天发生一次或两次 感谢 rober Microsoft(R)Visual C#.NET编译器版本7.10.3052。 for Microsoft(R).NET Framework版本1.1.432 版权所有(C)Microsoft Corporation 2001-2002。保留所有权利 c:\ WINNT \Temp \yxouf9ik.0.cs(132,9):错误CS0647:发出错误''System.Security.Permissions.PermissionSetAttribut e ''属性 - ''访问被拒绝。 c:\ WINNT \Temp \yxouf9ik.0.cs(396,9):错误CS0647:发出错误''System.Security。 Permissions.PermissionSetAttribut e''属性 - ''访问被拒绝。 错误:无法获取任务列表 解决方案 Robert, .out文件是XmlSerializer正常工作的一部分。请看看我最近在MSDN [0]上发表的文章,看看是否有助于找到问题的原因。 我在阅读你的问题描述后遇到的问题是:你是否一遍又一遍地实例化XmlSerializer实例,或者你能保留它们吗?b 左右?如果你不保留它们,那么构造函数超载你是否需要实例化实例? - HTH Christoph Schittko [MVP] 软件架构师,.NET Mentor [0] http:// msdn.microsoft.com/xml/defaul...trblshtxsd.asp " Robert" <一个******* @ discussions.microsoft.com>在消息中写道 news:72 ********************************** @ microsof t.com ... 我们有一个执行大量xml序列化的ASP.NET站点。 序列化发生在lbolibrary dll中。偶尔我们会在Winnt\temp文件夹中生成一个包含以下内容的.out 文件: - C:\ WINNT \ system32> " c:\ winnt\microsoft.net\framework\v1.1.4322\csc.ex e" / t:library / utf8output / R:" c:\ winnt \assembly\gac\system.xml \1.0.5000.0__b7 7a5c561934e089\system.xml.dll" / R:" c:\ winnt \assembly\gac \lbolibrary \1.0.0.0__30b57 061a1ea7c52 \lbolibrary.dll" / R:"c:\winnt\microsoft.net\framework\v1.1.4322\msco rlib.dll" /out:"C:\WINNT\TEMP\yxouf9ik.dll" / debug- / optimize + / w:1 " C:\ WINNT \ TEMP \yxouf9ik.0.cs" 你能解释一下这个问题吗?我们的用户得到一个文件未发现的异常。每天大约发生一次或两次。 感谢 罗伯特 Microsoft(R)Visual C#.NET编译器版本7.10.3052.4 Microsoft(R).NET Framework版本1.1.4322 版权所有(C)Microsoft Corporation 2001-2002。保留所有权利。 c:\ WINNT \Temp \yxouf9ik.0.cs(132,9):错误CS0647:错误发出''System.Security.Permissions。 PermissionSetAttribut e''属性 - ''访问被拒绝。 '' c:\ WINNT \Temp \yxouf9ik.0.cs(396,9):错误CS0647:错误发出''System.Security.Permissions.PermissionSetAttribut e''属性 - - ''访问被拒绝。 ''错误:无法获取任务列表 Robert, .out file是XmlSerializer正常工作的一部分。请看看我最近在MSDN [0]上发表的文章,看看是否有助于找到问题的原因。 我在阅读你的问题描述后遇到的问题是:你是否一遍又一遍地实例化XmlSerializer实例,或者你能保留它们吗?b 左右?如果你不保留它们,那么构造函数超载你是否需要实例化实例? - HTH Christoph Schittko [MVP] 软件架构师,.NET Mentor [0] http:// msdn.microsoft.com/xml/defaul...trblshtxsd.asp " Robert" <一个******* @ discussions.microsoft.com>在消息中写道 news:72 ********************************** @ microsof t.com ... 我们有一个执行大量xml序列化的ASP.NET站点。 序列化发生在lbolibrary dll中。偶尔我们会在Winnt\temp文件夹中生成一个包含以下内容的.out 文件: - C:\ WINNT \ system32> " c:\ winnt\microsoft.net\framework\v1.1.4322\csc.ex e" / t:library / utf8output / R:" c:\ winnt \assembly\gac\system.xml \1.0.5000.0__b7 7a5c561934e089\system.xml.dll" / R:" c:\ winnt \assembly\gac \lbolibrary \1.0.0.0__30b57 061a1ea7c52 \lbolibrary.dll" / R:"c:\winnt\microsoft.net\framework\v1.1.4322\msco rlib.dll" /out:"C:\WINNT\TEMP\yxouf9ik.dll" / debug- / optimize + / w:1 " C:\ WINNT \ TEMP \yxouf9ik.0.cs" 你能解释一下这个问题吗?我们的用户得到一个文件未发现的异常。每天大约发生一次或两次。 感谢 罗伯特 Microsoft(R)Visual C#.NET编译器版本7.10.3052.4 Microsoft(R).NET Framework版本1.1.4322 版权所有(C)Microsoft Corporation 2001-2002。保留所有权利。 c:\ WINNT \Temp \yxouf9ik.0.cs(132,9):错误CS0647:错误发出''System.Security.Permissions。 PermissionSetAttribut e''属性 - ''访问被拒绝。 '' c:\ WINNT \Temp \yxouf9ik.0.cs(396,9):错误CS0647:错误发出''System.Security.Permissions.PermissionSetAttribut e''属性 - - ''访问被拒绝。 ''错误:无法获得任务列表 您好Christop 我意识到.out文件的生成是正常的 我的理解是,一旦编译程序集就会消失 但是我之前没有在.out文件中看到以下错误: Microsoft(R)Visual C#.NET编译器版本7.10.3052。 for Microsoft(R).NET Framework版本1.1.432 版权所有(C)Microsoft Corporation 2001-2002。保留所有权利 c:\ WINNT \Temp \yxouf9ik.0.cs(132,9):错误CS0647:发出错误''System.Security.Permissions.PermissionSetAttribut e ''属性 - ''访问被拒绝。 c:\ WINNT \Temp \yxouf9ik.0.cs(396,9):错误CS0647:发出错误''System.Security。 Permissions.PermissionSetAttribut e''属性 - ''访问被拒绝。 错误:无法获得任务lis 我正在使用XmlSerializer(类型)构造函数 你知道是什么原因造成的吗 谢谢 We have an ASP.NET site that performs a lot of xml serialization. The serialization occurs in the lbolibrary dll. Occasionally we get an .out file produced in the Winnt\temp folder that contains the following:C:\WINNT\system32> "c:\winnt\microsoft.net\framework\v1.1.4322\csc.ex e" /t:library /utf8output /R:"c:\winnt\assembly\gac\system.xml\1.0.5000.0__b7 7a5c561934e089\system.xml.dll" /R:"c:\winnt\assembly\gac\lbolibrary\1.0.0.0__30b57 061a1ea7c52\lbolibrary.dll" /R:"c:\winnt\microsoft.net\framework\v1.1.4322\msco rlib.dll" /out:"C:\WINNT\TEMP\yxouf9ik.dll" /debug- /optimize+ /w:1 "C:\WINNT\TEMP\yxouf9ik.0.csCan you explain this problem? Our users get a filenotfound exception. This occurs about once or twice every dayThankroberMicrosoft (R) Visual C# .NET Compiler version 7.10.3052.for Microsoft (R) .NET Framework version 1.1.432Copyright (C) Microsoft Corporation 2001-2002. All rights reservedc:\WINNT\Temp\yxouf9ik.0.cs(132,9): error CS0647: Error emitting ''System.Security.Permissions.PermissionSetAttribut e'' attribute -- ''Access is denied.c:\WINNT\Temp\yxouf9ik.0.cs(396,9): error CS0647: Error emitting ''System.Security.Permissions.PermissionSetAttribut e'' attribute -- ''Access is denied.ERROR: could not get the task list 解决方案 Robert,The .out file is part of the normal workings of the XmlSerializer. Take alook at my recent article on MSDN [0] to see if that helps finding thesource of the problem.The questions I have though after reading your problem description is: Areyou instantiating XmlSerializer instances over and over or can you keep themaround? If you don''t keep them around, which constructor overload are youinstantiating the instances with?--HTHChristoph Schittko [MVP]Software Architect, .NET Mentor[0] http://msdn.microsoft.com/xml/defaul...trblshtxsd.asp"Robert" <an*******@discussions.microsoft.com> wrote in messagenews:72**********************************@microsof t.com... We have an ASP.NET site that performs a lot of xml serialization. The serialization occurs in the lbolibrary dll. Occasionally we get an .out file produced in the Winnt\temp folder that contains the following:- C:\WINNT\system32> "c:\winnt\microsoft.net\framework\v1.1.4322\csc.ex e" /t:library /utf8output /R:"c:\winnt\assembly\gac\system.xml\1.0.5000.0__b7 7a5c561934e089\system.xml.dll" /R:"c:\winnt\assembly\gac\lbolibrary\1.0.0.0__30b57 061a1ea7c52\lbolibrary.dll" /R:"c:\winnt\microsoft.net\framework\v1.1.4322\msco rlib.dll" /out:"C:\WINNT\TEMP\yxouf9ik.dll" /debug- /optimize+ /w:1 "C:\WINNT\TEMP\yxouf9ik.0.cs" Can you explain this problem? Our users get a filenotfound exception. This occurs about once or twice every day. Thanks robert Microsoft (R) Visual C# .NET Compiler version 7.10.3052.4 for Microsoft (R) .NET Framework version 1.1.4322 Copyright (C) Microsoft Corporation 2001-2002. All rights reserved. c:\WINNT\Temp\yxouf9ik.0.cs(132,9): error CS0647: Error emitting ''System.Security.Permissions.PermissionSetAttribut e'' attribute -- ''Access is denied. '' c:\WINNT\Temp\yxouf9ik.0.cs(396,9): error CS0647: Error emitting ''System.Security.Permissions.PermissionSetAttribut e'' attribute -- ''Access is denied. '' ERROR: could not get the task listRobert,The .out file is part of the normal workings of the XmlSerializer. Take alook at my recent article on MSDN [0] to see if that helps finding thesource of the problem.The questions I have though after reading your problem description is: Areyou instantiating XmlSerializer instances over and over or can you keep themaround? If you don''t keep them around, which constructor overload are youinstantiating the instances with?--HTHChristoph Schittko [MVP]Software Architect, .NET Mentor[0] http://msdn.microsoft.com/xml/defaul...trblshtxsd.asp"Robert" <an*******@discussions.microsoft.com> wrote in messagenews:72**********************************@microsof t.com... We have an ASP.NET site that performs a lot of xml serialization. The serialization occurs in the lbolibrary dll. Occasionally we get an .out file produced in the Winnt\temp folder that contains the following:- C:\WINNT\system32> "c:\winnt\microsoft.net\framework\v1.1.4322\csc.ex e" /t:library /utf8output /R:"c:\winnt\assembly\gac\system.xml\1.0.5000.0__b7 7a5c561934e089\system.xml.dll" /R:"c:\winnt\assembly\gac\lbolibrary\1.0.0.0__30b57 061a1ea7c52\lbolibrary.dll" /R:"c:\winnt\microsoft.net\framework\v1.1.4322\msco rlib.dll" /out:"C:\WINNT\TEMP\yxouf9ik.dll" /debug- /optimize+ /w:1 "C:\WINNT\TEMP\yxouf9ik.0.cs" Can you explain this problem? Our users get a filenotfound exception. This occurs about once or twice every day. Thanks robert Microsoft (R) Visual C# .NET Compiler version 7.10.3052.4 for Microsoft (R) .NET Framework version 1.1.4322 Copyright (C) Microsoft Corporation 2001-2002. All rights reserved. c:\WINNT\Temp\yxouf9ik.0.cs(132,9): error CS0647: Error emitting ''System.Security.Permissions.PermissionSetAttribut e'' attribute -- ''Access is denied. '' c:\WINNT\Temp\yxouf9ik.0.cs(396,9): error CS0647: Error emitting ''System.Security.Permissions.PermissionSetAttribut e'' attribute -- ''Access is denied. '' ERROR: could not get the task listHi ChristopI realize that the generation of the .out file is normalMy understanding is that this disappears once the assembly is compiledHowever I have not seen following error in an .out file before:Microsoft (R) Visual C# .NET Compiler version 7.10.3052.for Microsoft (R) .NET Framework version 1.1.432Copyright (C) Microsoft Corporation 2001-2002. All rights reservedc:\WINNT\Temp\yxouf9ik.0.cs(132,9): error CS0647: Error emitting ''System.Security.Permissions.PermissionSetAttribut e'' attribute -- ''Access is denied.c:\WINNT\Temp\yxouf9ik.0.cs(396,9): error CS0647: Error emitting ''System.Security.Permissions.PermissionSetAttribut e'' attribute -- ''Access is denied.ERROR: could not get the task lisI am using the XmlSerializer(Type) constructorDo you have any idea what could cause thisThanks 这篇关于Xml序列化间歇性失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
06-29 06:21