I can load a file applicationHost.config
<Parent>
<Child1 test="program" />
<Child2>
<Node number="123456789" />
</Child2>
<Child3>
<Hello World="!!!" />
</Child3>
</Parent>
just fine in one folder C:\Users\Public\Documents\temp
but if I move that file to another folder C:\Windows\System32\inetsrv\config
I get a "Failed to open file" with erroreRow=0 and errorCol=0
Code snippet:
std::string fileName = "C:\\Windows\\System32\\inetsrv\\config\\applicationHost.config";
//fileName = "C:\\Users\\Public\\Documents\\temp\\applicationHost.config";
std::string output;
TiXmlDocument doc;
if(doc.LoadFile(fileName))
As you can see I am using an absolute path, so there shouldn't be any worry about relative directories. Also, the file in both instances have read-only UNCHECKED, and users set to EVERYONE with full control on.
Why can't I load the file when it's in C:\\Windows\\System32\\inetsrv\\config\\applicationHost.config