This is the code,
Public Class TestClass
Public arrayOfArrayList(10) As ArrayList
End Class
<WebMethod()> Public Function HelloWorld() As String
Dim test As TestClass = New TestClass
Dim sw As IO.StreamWriter = New
StreamWriter(File.Open("c:\temp\statoWebService.xml",
System.IO.FileMode.OpenOrCreate))
Dim xmlSer As System.Xml.Serialization.XmlSerializer = New
System.Xml.Serialization.XmlSerializer(test.GetType())
xmlSer.Serialize(sw, test)
End Function
and this is the error:
System.IO.FileNotFoundException: ?
File name: "-pfa3ijp.dll"
at System.Reflection.Assembly.nLoad(AssemblyName fileName, String
codeBase, Boolean isStringized, Evidence assemblySecurity, Boolean
throwOnFileNotFound, Assembly locationHint, StackCrawlMark& stackMark)
at System.Reflection.Assembly.InternalLoad(AssemblyName assemblyRef,
Boolean stringized, Evidence assemblySecurity, StackCrawlMark& stackMark)
at System.Reflection.Assembly.Load(AssemblyName assemblyRef, Evidence
assemblySecurity)
at System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly()
at System.CodeDom.Compiler.CompilerResults.get_CompiledAssembly()
at System.Xml.Serialization.Compiler.Compile()
at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings)
at
System.Xml.Serialization.XmlSerializer.GenerateTempAssembly(XmlTypeMapping
xmlTypeMapping)
at System.Xml.Serialization.XmlSerializer..ctor(Type type, String
defaultNamespace)
at System.Xml.Serialization.XmlSerializer..ctor(Type type)
at WebService1.Service1.HelloWorld() in
c:\inetpub\wwwroot\WebService1\Service1.asmx.vb:line 64
=== Pre-bind state information ===
LOG: Where-ref bind. Location = C:\WINDOWS\TEMP\-pfa3ijp.dll
LOG: Appbase = file:///c:/inetpub/wwwroot/WebService1
LOG: Initial PrivatePath = bin
Calling assembly : (Unknown).
===
LOG: Policy not being applied to reference at this time (private, custom,
partial, or location-based assembly bind).
LOG: Attempting download of new URL file:///C:/WINDOWS/TEMP/-pfa3ijp.dll.
please note that the aspnet user has full right on windows\temp.
Tu-Thach said:
The reason I suggest that you use database/file for this is because of
your requirement: ...should not be cleared even against machine reboot. As
for the XmlSerializer, I don't know what you are doing to pinpoint the
problem. Maybe you can post your code snippet.