| Subcribe via RSS

Error Message: Could not find file ‘c:\windows\system32\inetsrv\System.Xml.XmlDocument’.

January 13th, 2010 Posted in XML

Someday I’ll free myself from the XML hell I seem to be mired in, but that day is not today. So I’ve got a fun new issue. The previous coder stored all the user entry values in session values without thinking about the fact that this won’t run correctly once it goes live in the web farm. So now I have to switch all those values over to be stored in the cookie and a few in the database that need to be secured. So in my haste to switch everything over, I ran across the error message “Could not find file ‘c:\windows\system32\inetsrv\System.Xml.XmlDocument’.” Huh? All I’ve done is try to store the Xml string into a XmlDocument object like so:

After pondering and tinkering with this for the better part of 30 minutes, it finally occured to me. The Load method of XmlDocument is used to access an Xml file on the server whereas the LoadXml method is used to load a previously defined Xml string. Popped that in, and it worked like a charm. Now what is my next error?