A
Alex Nitulescu
_______________________________________________________________________________________
System.IO.FileNotFoundException: File or assembly name biypfduw.dll, or one
of its dependencies, was not found. File name: "biypfduw.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
Serialization.Serialization_XML.cmdSerializeXML_Click(Object sender,
EventArgs e) in C:\Documents and Settings\Administrator\My Documents\My
Projects\ASPNETProjects\vsnet\Serialization\Serialization_XML.aspx.vb:line
73 === Pre-bind state information === LOG: Where-ref bind. Location =
C:\DOCUME~1\RADU\ASPNET\LOCALS~1\Temp\biypfduw.dll LOG: Appbase =
file:///C:/Documents and Settings/Administrator/My Documents/My
Projects/ASPNETProjects/vsnet/Serialization 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:/DOCUME~1/RADU/ASPNET/LOCALS~1/Temp/biypfduw.dll.
_______________________________________________________________________________________
* On a previous run, it said something about "xduzgu.dll", and on the run
before, something about a dll with an equally creative name ! Does my ASP
farmework make these names up ??? Hey, here's another one: "0zmck009.dll",
and yet another: "qom1azim.dll" ! It starts to get interesting !
* What's even better, after each attempt I get a empty "ShoppingCart.xml"
file in my working folder - however, I can't delete it (Explorer says that
the file "ShoppingCart.xml" is in use) unless I close VS.NET, I manually
kill the aspnet_wp.exe process (which is revived immediately EVEN IF vs.net
is at that point closed !!!), and only then can I delete the file "with
impunity".
I was trying to "XML serialize" some classes, with this code:
_______________________________________________________________________________________
Imports System.Xml.Serialization
Imports System.IO
Public Class Serialization_XML
Inherits System.Web.UI.Page
Protected WithEvents txtUsername As System.Web.UI.WebControls.TextBox
Protected WithEvents RequiredFieldValidator1 As
System.Web.UI.WebControls.RequiredFieldValidator
Protected WithEvents Requiredfieldvalidator4 As
System.Web.UI.WebControls.RequiredFieldValidator
Protected WithEvents txtCCNumber As System.Web.UI.WebControls.TextBox
Protected WithEvents lstCart As System.Web.UI.WebControls.ListBox
Protected WithEvents cmdSerializeXML As System.Web.UI.WebControls.Button
Protected WithEvents cmdDeserializeXML As System.Web.UI.WebControls.Button
Protected WithEvents lblResults As System.Web.UI.WebControls.Label
Public Class ShoppingCart
Public Username As String
Public CreditCardNumber As String
Public CartItems() As CartItem
End Class
Public Class CartItem
Public ProductName As String
Public ProductPrice As Decimal
End Class
Private Sub cmdSerializeXML_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles cmdSerializeXML.Click
Dim objShoppingCart As New ShoppingCart()
Dim objCartItem As CartItem
Dim colCartItems As New ArrayList()
Dim objItem As ListItem
Dim objStreamWriter As StreamWriter
Dim objXMLSerializer As XmlSerializer
Try
'Create the shopping cart:
With objShoppingCart
.Username = txtUsername.Text
.CreditCardNumber = txtCCNumber.Text
For Each objItem In lstCart.Items
objCartItem = New CartItem()
objCartItem.ProductName = objItem.Text
objCartItem.ProductPrice = objItem.Value
colCartItems.Add(objCartItem)
Next objItem
.CartItems = colCartItems.ToArray(GetType(CartItem))
End With
'Serialize to XML:
objStreamWriter = File.CreateText(MapPath("ShoppingCart.xml"))
'objXMLSerializer = New XmlSerializer(GetType(ShoppingCart))
objXMLSerializer = New XmlSerializer(objShoppingCart.GetType)
objXMLSerializer.Serialize(objStreamWriter, objShoppingCart)
objStreamWriter.Close()
Catch ex As Exception
lblResults.Text &= "<li>" & ex.ToString
End Try
End Sub
End Class
_______________________________________________________________________________________
The error happens on "objXMLSerializer.Serialize(objStreamWriter,
objShoppingCart)".
Thank you,
Sleepless in Montreal, Canada.
System.IO.FileNotFoundException: File or assembly name biypfduw.dll, or one
of its dependencies, was not found. File name: "biypfduw.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
Serialization.Serialization_XML.cmdSerializeXML_Click(Object sender,
EventArgs e) in C:\Documents and Settings\Administrator\My Documents\My
Projects\ASPNETProjects\vsnet\Serialization\Serialization_XML.aspx.vb:line
73 === Pre-bind state information === LOG: Where-ref bind. Location =
C:\DOCUME~1\RADU\ASPNET\LOCALS~1\Temp\biypfduw.dll LOG: Appbase =
file:///C:/Documents and Settings/Administrator/My Documents/My
Projects/ASPNETProjects/vsnet/Serialization 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:/DOCUME~1/RADU/ASPNET/LOCALS~1/Temp/biypfduw.dll.
_______________________________________________________________________________________
* On a previous run, it said something about "xduzgu.dll", and on the run
before, something about a dll with an equally creative name ! Does my ASP
farmework make these names up ??? Hey, here's another one: "0zmck009.dll",
and yet another: "qom1azim.dll" ! It starts to get interesting !
* What's even better, after each attempt I get a empty "ShoppingCart.xml"
file in my working folder - however, I can't delete it (Explorer says that
the file "ShoppingCart.xml" is in use) unless I close VS.NET, I manually
kill the aspnet_wp.exe process (which is revived immediately EVEN IF vs.net
is at that point closed !!!), and only then can I delete the file "with
impunity".
I was trying to "XML serialize" some classes, with this code:
_______________________________________________________________________________________
Imports System.Xml.Serialization
Imports System.IO
Public Class Serialization_XML
Inherits System.Web.UI.Page
Protected WithEvents txtUsername As System.Web.UI.WebControls.TextBox
Protected WithEvents RequiredFieldValidator1 As
System.Web.UI.WebControls.RequiredFieldValidator
Protected WithEvents Requiredfieldvalidator4 As
System.Web.UI.WebControls.RequiredFieldValidator
Protected WithEvents txtCCNumber As System.Web.UI.WebControls.TextBox
Protected WithEvents lstCart As System.Web.UI.WebControls.ListBox
Protected WithEvents cmdSerializeXML As System.Web.UI.WebControls.Button
Protected WithEvents cmdDeserializeXML As System.Web.UI.WebControls.Button
Protected WithEvents lblResults As System.Web.UI.WebControls.Label
Public Class ShoppingCart
Public Username As String
Public CreditCardNumber As String
Public CartItems() As CartItem
End Class
Public Class CartItem
Public ProductName As String
Public ProductPrice As Decimal
End Class
Private Sub cmdSerializeXML_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles cmdSerializeXML.Click
Dim objShoppingCart As New ShoppingCart()
Dim objCartItem As CartItem
Dim colCartItems As New ArrayList()
Dim objItem As ListItem
Dim objStreamWriter As StreamWriter
Dim objXMLSerializer As XmlSerializer
Try
'Create the shopping cart:
With objShoppingCart
.Username = txtUsername.Text
.CreditCardNumber = txtCCNumber.Text
For Each objItem In lstCart.Items
objCartItem = New CartItem()
objCartItem.ProductName = objItem.Text
objCartItem.ProductPrice = objItem.Value
colCartItems.Add(objCartItem)
Next objItem
.CartItems = colCartItems.ToArray(GetType(CartItem))
End With
'Serialize to XML:
objStreamWriter = File.CreateText(MapPath("ShoppingCart.xml"))
'objXMLSerializer = New XmlSerializer(GetType(ShoppingCart))
objXMLSerializer = New XmlSerializer(objShoppingCart.GetType)
objXMLSerializer.Serialize(objStreamWriter, objShoppingCart)
objStreamWriter.Close()
Catch ex As Exception
lblResults.Text &= "<li>" & ex.ToString
End Try
End Sub
End Class
_______________________________________________________________________________________
The error happens on "objXMLSerializer.Serialize(objStreamWriter,
objShoppingCart)".
Thank you,
Sleepless in Montreal, Canada.