Author Topic: what the hell is up with .NET 2.0 configuration custom sections?  (Read 766 times)

0 Members and 1 Guest are viewing this topic.

recursivelyenumerable

  • you might think that; I couldn't possibly comment
  • Senior Member
what the hell is up with .NET 2.0 configuration custom sections?
« on: November 12, 2007, 07:06:51 AM »
is there at least some way to get some more detailed information on why it's not recognizing your custom section?  like, have the XML deserializer throw an exception at some point or whatever?  something, anything more informative than an unexplained null result, I'm sure I failed to dot an i in one spot or another, but damned if I can spot any difference from the examples I'm seeing.

the last time I encountered error reporting this stupid was with a custom scripting language created by another programmer at our company, and it infuriated me so much I ended up rewriting the entire interpreter myself.  please don't make me rewrite .net.
« Last Edit: November 12, 2007, 07:11:52 AM by recursivelyenumerable »
QED

recursivelyenumerable

  • you might think that; I couldn't possibly comment
  • Senior Member
Re: what the hell is up with .NET 2.0 configuration custom sections?
« Reply #1 on: November 12, 2007, 09:21:16 AM »
screw it, I'm putting the settings in a goddamn 100% xml-brain-damage free text file and parsing it myself.  I can't believe how much time I wasted on this.  I will never try to write idiomatic code again.
« Last Edit: November 12, 2007, 09:22:58 AM by recursivelyenumerable »
QED

cubicle47b

  • Member
Re: what the hell is up with .NET 2.0 configuration custom sections?
« Reply #2 on: November 12, 2007, 01:05:31 PM »
I'd check for invalid XML characters in the custom settings you added.  I've seen a similar sounding error before when the XML parser failed because of that.

recursivelyenumerable

  • you might think that; I couldn't possibly comment
  • Senior Member
Re: what the hell is up with .NET 2.0 configuration custom sections?
« Reply #3 on: November 12, 2007, 01:14:19 PM »
I'm not seeing any, but shouldn't OpenExeConfiguration or something complain about actual XML parsing errors?
« Last Edit: November 12, 2007, 01:17:25 PM by recursivelyenumerable »
QED

Van Cruncheon

  • live mas or die trying
  • Banned
Re: what the hell is up with .NET 2.0 configuration custom sections?
« Reply #4 on: November 12, 2007, 01:17:51 PM »
is there an honest-to-Jebus valid schema for this xml, or is this the usual HURR WE PUT IT IN ANGLE BRACES N SHIT pseudo-xml that might as well be a flat text file? if so, why not use the XmlValidatingReader class and just look at the output from the async validation returned event?
duc

Howard Alan Treesong

  • キング・メタル・ドラゴン
  • Icon
Re: what the hell is up with .NET 2.0 configuration custom sections?
« Reply #5 on: November 12, 2007, 01:20:58 PM »
I hate XML that is just like "who needs key value pairs when you could put the key in angle braces! this is the future!"

also an anagram of idiomatic is "am i idiot? c." which is the exchange you have with the janitor at 930 PM when you're still there debugging worthless XML.
乱学者

Van Cruncheon

  • live mas or die trying
  • Banned
Re: what the hell is up with .NET 2.0 configuration custom sections?
« Reply #6 on: November 12, 2007, 01:25:04 PM »
hey, i love xml, but it isn't actually xml serialization if you just strcat angle braces and data and then write it straight to file
« Last Edit: November 12, 2007, 01:27:44 PM by Professor Prole »
duc

Van Cruncheon

  • live mas or die trying
  • Banned
Re: what the hell is up with .NET 2.0 configuration custom sections?
« Reply #7 on: November 12, 2007, 01:29:20 PM »
also as a guy who participated in the ecma iii il opcode implementation in the urt back in the early days of .net, i should add that you are welcome to rewrite it and i shall lol behind you
duc

recursivelyenumerable

  • you might think that; I couldn't possibly comment
  • Senior Member
Re: what the hell is up with .NET 2.0 configuration custom sections?
« Reply #8 on: November 12, 2007, 01:36:22 PM »
Personally I hate XML (at least as a data serialization format), period.  It's an astoundingly baroque solution for a simple and well-understood problem.  But I was trying to be nice and do things the ".net way". 

I thought the configuration manager was supposed to generate its own schema via this magical quasi-declarative reflection shit.  All the necessary specs should be there in the attributes.


Quote
XML is touted as an external format for representing data.
This is not a hard problem. All we require are two properties:
* Self-describing From the external representation one
should be able to derive the corresponding internal
representation.
* Round-tripping If one converts from an internal representation
to the external representation and back
again, the new internal representation should equal the
old.

Lisp S-expressions, for example, possess these properties.
XML has neither property. It is not always self-describing,
since the internal format corresponding to an external XML
description depends crucially on the XML Schema that is
used for validation (for instance, to tell whether data is an
integer or a string). And it is not always round-tripping,
since some pathological Schemas lack this property (for instance,
if there is a type union of integers and strings). So
the essence of XML is this: the problem it solves is not hard,
and it does not solve the problem well.
QED

drozmight

  • Senior Member
Re: what the hell is up with .NET 2.0 configuration custom sections?
« Reply #9 on: November 12, 2007, 01:44:00 PM »
I used XML once after a big wind storm last year... but now I've since forgotten it. ...was learning it for some reason.
rub

recursivelyenumerable

  • you might think that; I couldn't possibly comment
  • Senior Member
Re: what the hell is up with .NET 2.0 configuration custom sections?
« Reply #10 on: November 12, 2007, 01:45:36 PM »
While working on a hobby project I read the entire W3C XSLT spec, how's that for masochism.  (And I ended up deciding not to use XSLT.)
QED

Van Cruncheon

  • live mas or die trying
  • Banned
Re: what the hell is up with .NET 2.0 configuration custom sections?
« Reply #11 on: November 12, 2007, 01:58:33 PM »
i've read a lot -- a LOT -- of ietf drafts and specs. admittedly, it's my job, but still, it's not THAT unpleasant

i find reading ayn rand or transcriptions of ron paul stump speeches far more loathesome
duc

Howard Alan Treesong

  • キング・メタル・ドラゴン
  • Icon
Re: what the hell is up with .NET 2.0 configuration custom sections?
« Reply #12 on: November 12, 2007, 02:07:50 PM »
XML would be a lot better if we returned to <gold>standard</gold>
乱学者

recursivelyenumerable

  • you might think that; I couldn't possibly comment
  • Senior Member
Re: what the hell is up with .NET 2.0 configuration custom sections?
« Reply #13 on: November 12, 2007, 02:15:36 PM »
I wouldn't compare XML to Rand/Paul, it's more like Scientology.
QED

T234

  • Canadian Legal Expert and Hillballer
  • Senior Member
Re: what the hell is up with .NET 2.0 configuration custom sections?
« Reply #14 on: November 12, 2007, 04:57:01 PM »
I knew there was a reason I took the networking option.

FUCK YOU FLOWCHARTS AND PSUEDOCODE

UP YOURS ALICE, SLOW AND STEADY MY ASS
« Last Edit: November 12, 2007, 04:58:47 PM by T234 »
UK

recursivelyenumerable

  • you might think that; I couldn't possibly comment
  • Senior Member
Re: what the hell is up with .NET 2.0 configuration custom sections?
« Reply #15 on: November 12, 2007, 05:23:47 PM »
I figured out the problem, it had nothing to do with the XML schema or with my custom section classes for that matter.   I was loading the wrong file. :-[

but now I have to deal with other, equally annoying problems involving web services!
QED