Strange Problem Serializing XML File

Z

zacks

A couple of the engineers I work with are seeing a strange problem
with an application I developed in .NET 2.0. I am suspecting this is
being caused by the environment since so far it only happens on one of
our customer's servers. The server is a Microsoft Cluster Server that
has a primary server and one mirrored server. The cluster has a group
of NAS drives that appear to the users as local drives.

When the engineer trys to save the XML file the application is
designing (saved using a StreamWriter and an XMLSerializer) to a NAS
drive, the file is saved with the filename:

FILE.xmlNEW

The engineer can save the file on the current desktop and the filename
will be:

FILE.xml

Any ideas on what is causing this and how I can prevent it from
happening, or handle it in some way?
 
K

kimiraikkonen

A couple of the engineers I work with are seeing a strange problem
with an application I developed in .NET 2.0. I am suspecting this is
being caused by the environment since so far it only happens on one of
our customer's servers. The server is a Microsoft Cluster Server that
has a primary server and one mirrored server. The cluster has a group
of NAS drives that appear to the users as local drives.

When the engineer trys to save the XML file the application is
designing (saved using a StreamWriter and an XMLSerializer) to a NAS
drive, the file is saved with the filename:

FILE.xmlNEW

The engineer can save the file on the current desktop and the filename
will be:

FILE.xml

Any ideas on what is causing this and how I can prevent it from
happening, or handle it in some way?

Hi,
Could you just try renaming file just after serialization is finished
using:
My.Computer.FileSystem.RenameFile

Put it in a try-catch then determine, if your files are restricted not
to be renamed by user or if they have to have an fixed / auto naming
by your system for *somereason*, an exception may be thrown then you
can get more idea about it.

Hope this helps,

Onur
 
Z

zacks

Hi,
Could you just try renaming file just after serialization is finished
using:
My.Computer.FileSystem.RenameFile

Put it in a try-catch then determine, if your files are restricted not
to be renamed by user or if they have to have an fixed / auto naming
by your system for *somereason*, an exception may be thrown then you
can get more idea about it.

Hope this helps,

That sounds like a good way to try and handle the situation, BUT, I am
wondering if the same thing that is causing this to happen would cause
problems with the File.Move method, since the way it is being saved
now is with a standard StreamWriter.
 

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

Top