What do you make of this error message ?

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.
 
S

Schultz

I would scan your computer for a virus. I don't think that MS would put
crazy dll names in the .NET Framework. The aspnet_wp.exe process,
starting up on its own is what leads me to think you have a virus.
 
D

Derek Harmon

Schultz said:
I would scan your computer for a virus. I don't think that MS would put
crazy dll names in the .NET Framework.

It's no virus.

"Crazy" dll names and paths are generated by the .NET Framework in
temporary folders all the time to make them unique.
The aspnet_wp.exe process,
starting up on its own is what leads me to think you have a virus.

aspnet_wp.exe is supposed to start up when the class is a web page:

Alex is having a problem with the serialization assembly XmlSerializer creates.
What you may not know is that everytime an XmlSerializer is created for a
Type, it generates code for serialization and deserialization on-the-fly and
puts them in a uniquely-named assembly in the temp folder.

First thing to check is to make sure that ASPNET has permission to
read, write and create files in it's Temp folder (the path to this temp
folder is listed in the Exception's stack trace). If the serializer failed
to emit the assembly, then it won't be found when you need it.

Other things that can lead to this are those for which the code generated
by the XmlSerializer fails to compile (hence, the .dll is never written out
and that's why it cannot be found).


Derek Harmon
 
A

Alex Nitulescu

Hi, Derek. I have checked the security, and for C:\Windows\Temp I have the
following security settings:

Administrators - Full control
aspnet_wp account - Full control
Creator-owner - none
Power Users - everything but full control
System - Full control.

Are we talking here, maybe, about another TEMP folder ???

PS. Regarding aspnet_wp - I mean I work in vs.net, then I close it and I
have NO OTHER APP open, but aspnet_wp is still there. If I kill it, it comes
back to life in less than a sec !
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top