473,664 Members | 2,728 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

XML Serialization issue

I have a .NET Windows Service that needs to run without interruption
for long periods of time (weeks or months). Everything works great
except that every once in a great while I get the following type of
exception when reading data from a file via XML Serialization:

System.IO.FileN otFoundExceptio n: Could not find file 'C:\WINDOWS\TEM P
\muodpwwm.dll'. (see rest of call stack below).

The problem is that the serialization works for hours, but once I get
this error it fails on every subsequent attempt. The standard answer
I've found is to give my service account read/write on Windows\TEMP.
But it already has that so something else is causing this. Also, I'm
serializing the same type every time, so it is not an issue of the
type having inherent serialization issues.

here's the kicker, I've tried to precompile a serialization assembly
using SGEN.exe, which will create a compield assembly used to
serialize your types instead of compiling one on the fly. But the
runtime does not seem to be using it. For example, if the assembly
that has my types is Foo.Bar.dll then I've generated
Foo.Bar.XmlSeri alizers.dll and placed it in the same directory.

But my app still seems to be compiling the serialization DLLs on the
fly. The docs for this are really thin. Is there something else I
needto be doing to make sure the my precompiled serialization assembly
is used?
---
File name: 'C:\WINDOWS\TEM P\muodpwwm.dll'
at System.IO.__Err or.WinIOError(I nt32 errorCode, String
maybeFullPath)
at System.IO.FileS tream.Init(Stri ng path, FileMode mode, FileAccess
access, Int32 rights, Boolean useRights, FileShare share, Int32
bufferSize, FileOptions options, SECURITY_ATTRIB UTES secAttrs, String
msgPath, Boolean bFromProxy)
at System.IO.FileS tream..ctor(Str ing path, FileMode mode,
FileAccess access, FileShare share)
at
Microsoft.CShar p.CSharpCodeGen erator.FromFile Batch(CompilerP arameters
options, String[] fileNames)
at
Microsoft.CShar p.CSharpCodeGen erator.FromSour ceBatch(Compile rParameters
options, String[] sources)
at
Microsoft.CShar p.CSharpCodeGen erator.System.C odeDom.Compiler .ICodeCompiler. CompileAssembly FromSourceBatch (CompilerParame ters
options, String[] sources)
at
System.CodeDom. Compiler.CodeDo mProvider.Compi leAssemblyFromS ource(CompilerP arameters
options, String[] sources)
at System.Xml.Seri alization.Compi ler.Compile(Ass embly parent,
String ns, XmlSerializerCo mpilerParameter s xmlParameters, Evidence
evidence)
at
System.Xml.Seri alization.TempA ssembly.Generat eAssembly(XmlMa pping[]
xmlMappings, Type[] types, String defaultNamespac e, Evidence evidence,
XmlSerializerCo mpilerParameter s parameters, Assembly assembly,
Hashtable assemblies)
at System.Xml.Seri alization.TempA ssembly..ctor(X mlMapping[]
xmlMappings, Type[] types, String defaultNamespac e, String location,
Evidence evidence)
at
System.Xml.Seri alization.XmlSe rializer.Genera teTempAssembly( XmlMapping
xmlMapping, Type type, String defaultNamespac e)
....
// etc
---

Dec 4 '07 #1
2 9638
On Dec 4, 1:55 pm, compurhyt...@gm ail.com wrote:
I have a .NET Windows Service that needs to run without interruption
for long periods of time (weeks or months). Everything works great
except that every once in a great while I get the following type of
exception when reading data from a file via XML Serialization:

System.IO.FileN otFoundExceptio n: Could not find file 'C:\WINDOWS\TEM P
\muodpwwm.dll'. (see rest of call stack below).

The problem is that the serialization works for hours, but once I get
this error it fails on every subsequent attempt. The standard answer
I've found is to give my service account read/write on Windows\TEMP.
But it already has that so something else is causing this. Also, I'm
serializing the same type every time, so it is not an issue of the
type having inherent serialization issues.

here's the kicker, I've tried to precompile a serialization assembly
using SGEN.exe, which will create a compield assembly used to
serialize your types instead of compiling one on the fly. But the
runtime does not seem to be using it. For example, if the assembly
that has my types is Foo.Bar.dll then I've generated
Foo.Bar.XmlSeri alizers.dll and placed it in the same directory.

But my app still seems to be compiling the serialization DLLs on the
fly. The docs for this are really thin. Is there something else I
needto be doing to make sure the my precompiled serialization assembly
is used?

---
File name: 'C:\WINDOWS\TEM P\muodpwwm.dll'
at System.IO.__Err or.WinIOError(I nt32 errorCode, String
maybeFullPath)
at System.IO.FileS tream.Init(Stri ng path, FileMode mode, FileAccess
access, Int32 rights, Boolean useRights, FileShare share, Int32
bufferSize, FileOptions options, SECURITY_ATTRIB UTES secAttrs, String
msgPath, Boolean bFromProxy)
at System.IO.FileS tream..ctor(Str ing path, FileMode mode,
FileAccess access, FileShare share)
at
Microsoft.CShar p.CSharpCodeGen erator.FromFile Batch(CompilerP arameters
options, String[] fileNames)
at
Microsoft.CShar p.CSharpCodeGen erator.FromSour ceBatch(Compile rParameters
options, String[] sources)
at
Microsoft.CShar p.CSharpCodeGen erator.System.C odeDom.Compiler .ICodeCompiler.-CompileAssembly FromSourceBatch (CompilerParame ters
options, String[] sources)
at
System.CodeDom. Compiler.CodeDo mProvider.Compi leAssemblyFromS ource(CompilerP-arameters
options, String[] sources)
at System.Xml.Seri alization.Compi ler.Compile(Ass embly parent,
String ns, XmlSerializerCo mpilerParameter s xmlParameters, Evidence
evidence)
at
System.Xml.Seri alization.TempA ssembly.Generat eAssembly(XmlMa pping[]
xmlMappings, Type[] types, String defaultNamespac e, Evidence evidence,
XmlSerializerCo mpilerParameter s parameters, Assembly assembly,
Hashtable assemblies)
at System.Xml.Seri alization.TempA ssembly..ctor(X mlMapping[]
xmlMappings, Type[] types, String defaultNamespac e, String location,
Evidence evidence)
at
System.Xml.Seri alization.XmlSe rializer.Genera teTempAssembly( XmlMapping
xmlMapping, Type type, String defaultNamespac e)
...
// etc
---
I believe that I have solved it. The XMLSerializers DLL seems to need
to be the same version as the source DLL. Once I sync'd the versions
my tests have run continuously for 2 days (and counting).

Mike
Dec 7 '07 #2
We had the same issue with System.IO.FileN otFoundExceptio n: Could not find file "C:\WINDOWS\TEM P\xxxx.dll" with an ASP.NET 1.1 application.

We corrected it by deleting tons (several GB) of tmp files that had collected in C:\Windows\Temp over time. Once we deleted the tmp files all was well!

Aug 6 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

37
4988
by: Ben | last post by:
Hi, there. Recently I was working on a problem where we want to save generic closures in a data structure (a vector). The closure should work for any data type and any method with pre-defined signature. When developing this lib, I figured that the pointer-to-member-function, although seemingly an attractive solution, does not work well for us.
2
6195
by: Dominic | last post by:
Hi everybody, I'm planning to use serialization to persist an object (and possibly its child objects) in my application. However, I'm concerned about the backward compatibility issue. I'm evaluating if we can easily resolve this issue. For example, I have a class MyClass consisting of 100 fields.
6
2709
by: Uttam | last post by:
Hello, We are at a very crucial decision making stage to select between .Net and Java. Our requirement is to download a class at runtime on the client computer and execute it using remoting or rmi. Just to keep my question short I am posting trimmed version of my code. //file: Serializable.cs
3
2867
by: Steve | last post by:
I've been following a couple remoting tutorials on the web, they are all pretty much the same. I've got my different applications built(client, server and remote object (dll)) The client is able to get a reference to the remote object and that works fine. When I try to make a call to a remote object's method I get an exception: System.Runtime.Serialization.SerializationException: Cannot find the assembly ProcessTest,...
5
2119
by: George Ter-Saakov | last post by:
I have 2 classes one is document and another is collection of documents. When i am trying to use XmlSerializer to serialize class which has clsDcoumentIds member variable i am getting an exception "System.InvalidOperationException: The type clsDocumentId was not expected." public class clsDocumentId { string _sDocumentId; public clsDocumentId() {}
7
1790
by: Joe | last post by:
I've tracked the performance issue down to a single class. This class derives from CollectionBase and stores a basic value type such as string, int, double, etc... I also store the type itself which you can see I'm using when calling AddValue. I implemented ISerializable and GeteObjectData. Here's what I tried: for (int i = 0; i < this.Count; i++) info.AddValue("item" + i.ToString(), this, typeof(type) );
1
1894
by: Rucha | last post by:
We are using ACAServices in our project, and are passing entity classes as parameters to the ACAServiceMethod. We are using a private variable entityState to indicate whether the entity is new/updated and so on. At present we are not using any custom serialization in our project, we just decorate the entity class with “Serializable” attribute as shown below:
1
11093
by: kikisan | last post by:
I am developing a windows service which utilizes the following classes: interface IPersistable; abstract class PersistableObject : IPersistable;
3
1522
by: girish574 | last post by:
After the integration of boost serialization code, the exceptions are not at all getting caught in my application. Im building on RHEL4 kernel 2.6.9-42.ELsmp and gcc version is 4.0.2. The application terminates when exception is thrown. Removing the serialization code makes the exceptions getting caught. The worst part is im not able to reproduce the scenario in a small program.
0
8437
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
8778
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8549
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8636
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7375
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6187
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4185
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2764
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1759
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.