The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,780 other followers

Archive for February 6th, 2014

KnowRoaming | Reduce Roaming Fees

Posted by jpluimers on 2014/02/06

Interesting: reducing phone costs when abroad. KnowRoaming | Reduce Roaming Fees.

Posted in LifeHacker, Power User | Leave a Comment »

Voorkom hoge belkosten met Fritz!Box: zet remote access en MyFritz! uit; misbruik telefonie aan de gang

Posted by jpluimers on 2014/02/06

Zelf ben ik klant bij xs4all, maar het komt ook bij andere Nederlandse en buitenlandse (met name Duitse) gebruikers van Fritz!Box apparatuur voor: ineens enorm hoge belkosten.

Gelukkig was bij mij alles goed ingesteld, en had ik geen MyFritz! actief, dus (nog?) geen misbruik hier.

Onderstaande heb ik gepost op de Tweakers.net site. Een deel is generiek, en een deel specifiek voor xs4all: Read the rest of this entry »

Posted in Power User | Leave a Comment »

.NET/C#: When XmlSerializer throws “Unable to generate a temporary class (result=1).” / “error CS2001”

Posted by jpluimers on 2014/02/06

A while ago, I had this error when running an application on a hardened server:

Unhandled Exception:System.InvalidOperationException:
Unable to generate a temporary class (result=1).
error CS2001: Source file 'C:\windows\TEMP\0hocq2nq.0.cs' could not be found  error CS2008: No inputs specified
at System.Xml.Serialization.Compiler.Compile(Assembly parent, String ns, XmlSerializerCompilerParameters xmlParameters, Evidence evidence)
at System.Xml.Serialization.TempAssembly.GenerateAssembly(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, Evidence evidence, XmlSerializerCompilerParameters parameters, Assembly assembly, Hashtable assemblies)
at System.Xml.Serialization.TempAssembly..ctor(XmlMapping[] xmlMappings, Type[] types, String defaultNamespace, String location, Evidence evidence)
at System.Xml.Serialization.XmlSerializer..ctor(Type type, XmlAttributeOverrides overrides, Type[] extraTypes, XmlRootAttribute root, String defaultNamespace, String location, Evidence evidence)
at System.Xml.Serialization.XmlSerializer..ctor(Type type, XmlAttributeOverrides overrides, Type[] extraTypes, XmlRootAttribute root, String defaultNamespace, String location)
at System.Xml.Serialization.XmlSerializer..ctor(Type type, Type[] extraTypes)

Usually I’m not the first with strange errors, but searching for “Unhandled Exception:System.InvalidOperationException: Unable to generate a temporary class” didn’t get many results.

This was a program running from SSIS under a non-system domain account with very little access.

My first guess was the right now: the XmlSerializer wants to generate a temporary C# file, then compile it into a temporary assembly. Since it cannot generate the C# file because the account does not have access to %windir\TEMP%, the compiler cannot find the (not generated) C# file.

After a few tries, I searched for XmlSerializer without GenerateAssembly, where the first hit ended at Changing where XmlSerializer Outputs Temporary Assemblies – Scott Hanselman.

That post indicated I should try looking for tempFilesLocation in the XmlSerializer context.

That got me these posts: Read the rest of this entry »

Posted in .NET, .NET 1.x, .NET 2.0, .NET 3.0, .NET 3.5, .NET 4.0, .NET 4.5, C#, C# 1.0, C# 2.0, C# 3.0, C# 4.0, C# 5.0, Development, Software Development | Leave a Comment »

 
%d bloggers like this: