Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Distributed Applications / April 2004

Tip: Looking for answers? Try searching our database.

Bug: Configuration Management Application Block using XML

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Chris Mullins - 24 Apr 2004 00:17 GMT
There appears to be a bug in the XMLFileStorage class for the Configuration Management app block.

Let's suppose I have an XML Config file that looks like:
<configuration>
 <MyServer>
   <!--
  Server Configuration
  -->
       <testnode name="test"/>
</MyServer>
</configuration>

The 'Read' method in the XMLFileStorage Class grabs the whole "MyServer" Node, and checks to see if it's signed or encrypted, then hands back 'sectionNode.FirstChild'

Problem is, the FirstChild is actually an XML Comment block, so the config section handler promptly falls apart with invalid cast exceptions.

Signature

Chris Mullins

Mickey Williams - 24 Apr 2004 01:23 GMT
> There appears to be a bug in the XMLFileStorage class for the Configuration Management app block.

Don't know if you've already corrected it, but changing the code to
something like this will work:

XmlNode node = sectionNode.FirstChild;
while(node.NodeType != XmlNodeType.Element && node.NextSibling != null)
node = node.NextSibling;
return node;

Signature

Mickey Williams
Author, "Microsoft Visual C# .NET Core Reference", MS Press
www.servergeek.com

Chris Mullins - 24 Apr 2004 01:45 GMT
Yea, fixing it wasn't too difficult - I actually did just about exactly what
you descibed.

However, this is in a few spots - the Signing and Encryption segment have
the same bug present in them but (since I'm not using them) I didn't fix it.

I just wanted to report the bug, so that it gets fixed in 'real' version up
on the MS site. That way, months from now, when I download it again, and
have forgotten all about this, I don't hit the same problem.

... after all, the whole point of these wonderfull Application Blocks is
that they're tested and production ready. Imagine my surprise when, in prep
for going live, I commented my configuration.xml file so that customers
would be able to make changes to it in an informed way, and "poof", broken
application.

Signature

Chris Mullins

> > There appears to be a bug in the XMLFileStorage class for the
> Configuration Management app block.
[quoted text clipped - 6 lines]
>  node = node.NextSibling;
> return node;
Steven Cheng[MSFT] - 24 Apr 2004 09:20 GMT
Hi Chris,

Thanks for posting here. Yes, the Configuration management Application
block does have the problems you metioned which we need to use some certain
skills to workaround it. In fact, these Application Blocks are developed
not only by Microsoft but also third-party members. So its a complete Free
open source component and following is the Configuration management block's
workspace on the www.gotdotnet.com

#patterns & practices Configuration Management Application Block for .NET:
Home
http://www.gotdotnet.com/community/workspaces/workspace.aspx?id=01875f69-935
8-437b-a8ae-fa4bf2e3080f

There has the source control list, bug tracker list and also message board
there. We can feel free to report the problems or issuss of the component
there. Also, since its source is accessable,  we can also do some
modification and recompiled them on ourside if you feel necessary.

Anyway, thank you for sharing your experience with us. Hope these issues
will be improved in the new releases.

Regards,

Steven Cheng
Microsoft Online Support

Signature

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)


Signature

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

mickey williams - 27 Apr 2004 06:40 GMT
> Hi Chris,
>
[quoted text clipped - 4 lines]
> open source component and following is the Configuration management block's
> workspace on the www.gotdotnet.com

The problem is that these application blocks are held out to be
best-practice, well-tested implementations of well-known enterprise
patterns. What you're saying is that this one is broken, and we'll need to
fix it ourselves, and we shouldn't complain because it's free. It's
statements like this that make me less likely to commit to your untested
code rather than code developed by my team.

Although some app blocks have good support, you can see on GDN that a number
of application blocks get very little support - the message boards have
questions that remained unresolved for long periods of time.

Signature

Mickey Williams
Author, "Microsoft Visual C# .NET Core Reference", MS Press
http://www.servergeek.com


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.