Unknown error in XmlSerializer

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi,

when calling the XmlSerializer constructor, I get the following error:

Top Level Exception
Type: System.IO.IOException
Message: Unknown Error (-1).
Source: mscorlib
Stack Trace: at System.IO.__Error.WinIOError(Int32 errorCode, String
str)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean bFromProxy)
at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
at
System.CodeDom.Compiler.CodeCompiler.FromSourceBatch(CompilerParameters
options, String[] sources)
at System.CodeDom.Compiler.CodeCompiler.FromSource(CompilerParameters
options, String source)
at
System.CodeDom.Compiler.CodeCompiler.System.CodeDom.Compiler.ICodeCompil
er.CompileAssemblyFromSource(CompilerParameters options, String source)
at System.Xml.Serialization.Compiler.Compile()
at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[]
xmlMappings)
at System.Xml.Serialization.XmlSerializer..ctor(Type type, String
defaultNamespace)
at System.Xml.Serialization.XmlSerializer..ctor(Type type)
at ...


Any ideas?

Thanks,
Brecht
.



Relevant Pages

  • RE: accessing file on network machine
    ... System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, ... FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: HttpPostedFile file locking issue?
    ... Once the upload completes successfully the application calls a web service ... Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, ... FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean ...
    (microsoft.public.dotnet.framework.aspnet)
  • HttpPostedFile file locking issue?
    ... Once the upload completes successfully the application calls a web service ... Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, ... FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean ...
    (microsoft.public.dotnet.framework.aspnet)
  • System.IO.__Error.WinIOError in XmlSerializer constructor
    ... access, FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, ... options, String source) ...
    (microsoft.public.dotnet.xml)
  • The info you requested
    ... System.IO.__Error.WinIOError(Int32 errorCode, String str) at ... FileShare share, Int32 bufferSize, Boolean useAsync, String msgPath, Boolean ... bFromProxy) at System.IO.FileStream..ctor(String path, FileMode mode, ... FileAccess access, ...
    (microsoft.public.dotnet.languages.csharp)