all groups > dotnet xml > may 2004 >
You're in the

dotnet xml

group:

Xml Serialization Intermittent Failure


Xml Serialization Intermittent Failure Robert
5/30/2004 6:41:02 PM
dotnet xml:
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

Thank

rober
Microsoft (R) Visual C# .NET Compiler version 7.10.3052.
for Microsoft (R) .NET Framework version 1.1.432
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.
Re: Xml Serialization Intermittent Failure Robert
6/3/2004 7:26:04 PM
Hi Christop

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.
for Microsoft (R) .NET Framework version 1.1.432
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 lis

I am using the XmlSerializer(Type) constructor

Do you have any idea what could cause this

Re: Xml Serialization Intermittent Failure Christoph Schittko [MVP]
6/3/2004 8:20:38 PM
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

[quoted text, click to view]

Re: Xml Serialization Intermittent Failure Robert
6/3/2004 9:31:02 PM
Christop

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

Re: Xml Serialization Intermittent Failure Christoph Schittko [MVP]
6/3/2004 10:08:17 PM
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


[quoted text, click to view]

Re: Xml Serialization Intermittent Failure Christoph Schittko [MVP]
6/5/2004 11:18:30 AM
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
[quoted text, click to view]

AddThis Social Bookmark Button