|
| Xml Serialization Intermittent Failure |
|
|
|
|
| Messages |
|
Related Types |
This message was discovered on microsoft.public.dotnet.xml.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
| Robert |
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.exe" /t:library /utf8output /R:"c:\winnt\assembly\gac\system.xml\1.0.5000.0__b77a5c561934e089\system.xml.dll" /R:"c:\winnt\assembly\gac\lbolibrary\1.0.0.0__30b57061a1ea7c52\lbolibrary.dll" /R:"c:\winnt\microsoft.net\framework\v1.1.4322\mscorlib.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.PermissionSetAttribute' attribute -- 'Access is denied. ' c:\WINNT\Temp\yxouf9ik.0.cs(396,9): error CS0647: Error emitting 'System.Security.Permissions.PermissionSetAttribute' attribute -- 'Access is denied. ' ERROR: could not get the task list
|
|
|
| |
|
| |
| |
| Christoph Schittko [MVP] (VIP) |
Robert,
The .out file is part of the normal workings of the XmlSerializer. Take a look at my recent article on MSDN [0] to see if that helps finding the source of the problem.
The questions I have though after reading your problem description is: Are you instantiating XmlSerializer instances over and over or can you keep them around? If you don't keep them around, which constructor overload are you instantiating the instances with?
-- HTH Christoph Schittko [MVP] Software Architect, .NET Mentor
[0] http://msdn.microsoft.com/xml/default.aspx?pull=/library/en-us/dnxmlnet/html/trblshtxsd.asp
"Robert" <Click here to reveal e-mail address> wrote in message news:Click here to reveal e-mail address... [Original message clipped]
|
|
|
| |
|
|
| |
| |
| Robert |
Hi Christoph
I realize that the generation of the .out file is normal. My understanding is that this disappears once the assembly is compiled. However I have not seen following error in an .out file before:-
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.PermissionSetAttribute' attribute -- 'Access is denied. ' c:\WINNT\Temp\yxouf9ik.0.cs(396,9): error CS0647: Error emitting 'System.Security.Permissions.PermissionSetAttribute' attribute -- 'Access is denied. ' ERROR: could not get the task list
I am using the XmlSerializer(Type) constructor.
Do you have any idea what could cause this?
Thanks
|
|
|
| |
|
|
| |
| |
| Christoph Schittko [MVP] (VIP) |
Robert,
That error is somewhat confusing coming out of the compilation step. Have you looked at the file that's causing the error?
Does the Type your serializing carry any special security attributes?
-- HTH Christoph Schittko [MVP] Software Architect, .NET Mentor
"Robert" <Click here to reveal e-mail address> wrote in message news:Click here to reveal e-mail address... [Original message clipped]
|
|
|
| |
|
|
| |
| |
| Robert |
Christoph
This error is intermittent, so the file is being compiled sometimes... There are no special attributes on it.
I am struggling trying to diagnose this one!
Thanks for your help.
|
|
|
| |
|
| |
| |
| Christoph Schittko [MVP] (VIP) |
Robert,
what are you doing to capture the error? Are you running your application with the diagnostics swtich set so all files created by the XmlSerializer stay in the temp dir so you can take a look at the line that's causing the problem?
Are you always serializing the same types or how many different types are you trying to serialize?
-- HTH Christoph Schittko [MVP] Software Architect, .NET Mentor "Robert" <Click here to reveal e-mail address> wrote in message news:Click here to reveal e-mail address... [Original message clipped]
|
|
|
| |
|
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
BootFX
Reliable and powerful .NET application framework. |
|
|
|
|
|
|