PC Review


Reply
Thread Tools Rating: Thread Rating: 1 votes, 1.00 average.

Timeouts are not supported exception

 
 
Bob
Guest
Posts: n/a
 
      10th Jan 2006
I am trying to xml serialize an object but when I pass in a memory stream I
get an exception saying that "Timeouts are not supported by this stream."
Why are timeouts required? This happens when I compile with VS2k5 .Net 2.0.
It seems to work with .Net 2k3.

public void Serialize(Stream stream)
{
XmlSerializer serializer = new
XmlSerializer(typeof(MyObject));
XmlTextWriter writer = new
XmlTextWriter(stream,System.Text.Encoding.GetEncoding(1252));
serializer.Serialize(writer,this);
writer.Flush();
}



 
Reply With Quote
 
 
 
 
Bob
Guest
Posts: n/a
 
      10th Jan 2006
After more investigation it appears there was a FileStream object as a
member on the object I was trying to serialize. This is where the error was
coming from not the memory stream I was passing in. Removing the FileSteam
got it to work. Sometimes error messages can be so vague.


"Bob" wrote in message news:(E-Mail Removed)...
>I am trying to xml serialize an object but when I pass in a memory stream I
>get an exception saying that "Timeouts are not supported by this stream."
>Why are timeouts required? This happens when I compile with VS2k5 .Net
>2.0. It seems to work with .Net 2k3.
>
> public void Serialize(Stream stream)
> {
> XmlSerializer serializer = new
> XmlSerializer(typeof(MyObject));
> XmlTextWriter writer = new
> XmlTextWriter(stream,System.Text.Encoding.GetEncoding(1252));
> serializer.Serialize(writer,this);
> writer.Flush();
> }
>
>
>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
UrldownloadtoFileA - System Not supported exception Question allan teo Microsoft Dot NET Compact Framework 0 11th May 2006 05:31 AM
forms authentication timeouts and session timeouts =?Utf-8?B?SmFzb24=?= Microsoft ASP .NET 0 22nd Jun 2004 11:24 AM
Directory.GetCurrentDirectory() throws Not Supported exception David W Microsoft Dot NET Compact Framework 1 5th Jan 2004 03:36 PM
SelectObject not supported exception Miguel Angel Morales Microsoft Dot NET Compact Framework 5 31st Dec 2003 08:20 AM
Exception: 'ResourcePool' is not supported on the current platform. Evgeny Molkov Microsoft ADO .NET 3 2nd Oct 2003 12:07 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:53 AM.