M
Michael Dyremo
Hello!
We have a serious problem with the class
System.Xml.Serialization.XmlSerializer
in .NET 1.1. The problem has occured on Windows 2000
Servers with Service Pack 2, 3 and 4. We havent tested
on Windows 2003 Servers yet. The error occurs on
some servers, but not on all. This code worked fine
in .NET 1.0.
The code looks like this:
XmlSerializer xs1 = new XmlSerializer(typeof
(MyClass1), "urn:name1");
XmlSerializer xs2 = new XmlSerializer(typeof
(MyClass2), "urn:name2");
XmlSerializer xs3 = new XmlSerializer(typeof
(MyClass3), "urn:name3");
XmlSerializer xs4 = new XmlSerializer(typeof
(MyClass4), "urn:name4");
XmlSerializer xs5 = new XmlSerializer(typeof
(MyClass5), "urn:name5");
The first 3 or 4 rows work fine, but then we get the
exception attached below. The problem does only occur (in
out tests) when we have signed the exe-file with our key.
An unsigned assembly does not seem to have this problem.
Our key is set to FullTrust.
Also, when running a test-program on this, I found that
the code above were executing very slow when the assembly
was signed, and much faster when the assembly was
unsigned.
Is this a known problem in .NET 1.1?
Is there a way to get around it?
I have a small test-program I can send you, if you want.
Unhandled Exception: System.TypeInitializationException:
The type initializer fo
r "Lettera.Sys.Services.MQ.Adapter.Entrypoint" threw an
exception. ---> System.I
O.FileNotFoundException: File or assembly name
s_ywqtnb.dll, or one of its depen
dencies, was not found.
File name: "s_ywqtnb.dll"
at System.Reflection.Assembly.nLoad(AssemblyName
fileName, String codeBase, B
oolean isStringized, Evidence assemblySecurity, Boolean
throwOnFileNotFound, Ass
embly locationHint, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad
(AssemblyName assemblyRef, Boolean
stringized, Evidence assemblySecurity, StackCrawlMark&
stackMark)
at System.Reflection.Assembly.Load(AssemblyName
assemblyRef, Evidence assembl
ySecurity)
at
System.CodeDom.Compiler.CompilerResults.get_CompiledAssemb
ly()
at
System.CodeDom.Compiler.CompilerResults.get_CompiledAssemb
ly()
at System.Xml.Serialization.Compiler.Compile()
at System.Xml.Serialization.TempAssembly..ctor
(XmlMapping[] xmlMappings)
at System.Xml.Serialization.XmlSerializer..ctor(Type
type, String defaultName
space)
at Lettera.Sys.Services.MQ.Adapter.Entrypoint..cctor()
in D:\Proj.NET\Edm\V-S
tore\MqAdapters\VStoreAdapter100\Entrypoint.cs:line 483
=== Pre-bind state information ===
LOG: Where-ref bind. Location = C:\DOCUME~1
\lettera\LOCALS~1\Temp\1\s_ywqtnb.dll
LOG: Appbase =
D:\Lettera\Environments\Accept\Support\Test\
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===
LOG: Policy not being applied to reference at this time
(private, custom, partia
l, or location-based assembly bind).
LOG: Attempting download of new URL
file:///C:/DOCUME~1/lettera/LOCALS~1/Temp/1/
s_ywqtnb.dll.
--- End of inner exception stack trace ---
at Lettera.Sys.Services.MQ.Adapter.Entrypoint.Main
(String[] args)
We have a serious problem with the class
System.Xml.Serialization.XmlSerializer
in .NET 1.1. The problem has occured on Windows 2000
Servers with Service Pack 2, 3 and 4. We havent tested
on Windows 2003 Servers yet. The error occurs on
some servers, but not on all. This code worked fine
in .NET 1.0.
The code looks like this:
XmlSerializer xs1 = new XmlSerializer(typeof
(MyClass1), "urn:name1");
XmlSerializer xs2 = new XmlSerializer(typeof
(MyClass2), "urn:name2");
XmlSerializer xs3 = new XmlSerializer(typeof
(MyClass3), "urn:name3");
XmlSerializer xs4 = new XmlSerializer(typeof
(MyClass4), "urn:name4");
XmlSerializer xs5 = new XmlSerializer(typeof
(MyClass5), "urn:name5");
The first 3 or 4 rows work fine, but then we get the
exception attached below. The problem does only occur (in
out tests) when we have signed the exe-file with our key.
An unsigned assembly does not seem to have this problem.
Our key is set to FullTrust.
Also, when running a test-program on this, I found that
the code above were executing very slow when the assembly
was signed, and much faster when the assembly was
unsigned.
Is this a known problem in .NET 1.1?
Is there a way to get around it?
I have a small test-program I can send you, if you want.
Unhandled Exception: System.TypeInitializationException:
The type initializer fo
r "Lettera.Sys.Services.MQ.Adapter.Entrypoint" threw an
exception. ---> System.I
O.FileNotFoundException: File or assembly name
s_ywqtnb.dll, or one of its depen
dencies, was not found.
File name: "s_ywqtnb.dll"
at System.Reflection.Assembly.nLoad(AssemblyName
fileName, String codeBase, B
oolean isStringized, Evidence assemblySecurity, Boolean
throwOnFileNotFound, Ass
embly locationHint, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad
(AssemblyName assemblyRef, Boolean
stringized, Evidence assemblySecurity, StackCrawlMark&
stackMark)
at System.Reflection.Assembly.Load(AssemblyName
assemblyRef, Evidence assembl
ySecurity)
at
System.CodeDom.Compiler.CompilerResults.get_CompiledAssemb
ly()
at
System.CodeDom.Compiler.CompilerResults.get_CompiledAssemb
ly()
at System.Xml.Serialization.Compiler.Compile()
at System.Xml.Serialization.TempAssembly..ctor
(XmlMapping[] xmlMappings)
at System.Xml.Serialization.XmlSerializer..ctor(Type
type, String defaultName
space)
at Lettera.Sys.Services.MQ.Adapter.Entrypoint..cctor()
in D:\Proj.NET\Edm\V-S
tore\MqAdapters\VStoreAdapter100\Entrypoint.cs:line 483
=== Pre-bind state information ===
LOG: Where-ref bind. Location = C:\DOCUME~1
\lettera\LOCALS~1\Temp\1\s_ywqtnb.dll
LOG: Appbase =
D:\Lettera\Environments\Accept\Support\Test\
LOG: Initial PrivatePath = NULL
Calling assembly : (Unknown).
===
LOG: Policy not being applied to reference at this time
(private, custom, partia
l, or location-based assembly bind).
LOG: Attempting download of new URL
file:///C:/DOCUME~1/lettera/LOCALS~1/Temp/1/
s_ywqtnb.dll.
--- End of inner exception stack trace ---
at Lettera.Sys.Services.MQ.Adapter.Entrypoint.Main
(String[] args)