473,387 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

MSXML load throws E_ACCESSDENIED

Hi,

I have written an application in Microsoft Visual C++ (Visual Studio
6.0) that uses MSXML 4.0 SP2. When I try to load an XML from a file, it
throws an E_ACCESSDENIED (HRESULT = 0x80070005) exceptioon. I am not
sure why this is happenning. The sample code is:

IXMLDOMDocument2Ptr spXMLDocument;
spXMLDocument.CreateInstance(CLSID_DOMDocument40);

try
{
VARIANT vSourceFile;
VariantInit(&vSourceFile);

vSourceFile.vt = VT_BSTR;
vSourceFile.bstrVal = _bstr_t("C:\\Data.xml");

VARIANT_BOOL vbReturnCode = VARIANT_FALSE;
vbReturnCode = spXMLDocument->load(vSourceFile); //This is
the line that throws the exception.
}
catch(_comk_error &e)
{
AfxMessageBox(e.Description());
}

If I replace the load method with the loadXML method and pass the XML
as a string, it works fine.

I am trying to run this program on a machine with a French version of
WinXP. I tried to use MSXML 6.0 in stead of MSXML 4 and that seems to
have solved the problem. The thing is that we do not want to recompile
and re-release the program with MSXML 6. I am not sure why this fails
with MSXML 4.0.

I have a feeling that this has something to do with access rights but I
could be wrong.

Another problem on the same machine is that IE cannot display the XML
(even though it is well-formed). IE gives a message "XML page cannot be
displayed.......class not registered". I am not sure if these two
problems are related.

Any feedback would be appreciated.

Regards.

Jan 9 '06 #1
0 1523

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Michael | last post by:
Hi, I have a problem parsing XML file using XSLT stylesheet by using : using System.Xml; using System.Xml.XPath; using System.Xml.Xsl; // load Xsl stylesheet XslTransform myXslTrans = new...
1
by: Michael McCarthy | last post by:
using MSXML.dll, I have the following code: XMLHTTPRequest tempXML = new XMLHTTPRequest(); string strURL = "http://someURIgoeshere.com/"; try { tempXML.open("GET", strURL, false, "", "");...
11
by: Lucky | last post by:
hi guys, i need to parse html data that i've got from "Inet" object in vb6. now i want to prase the html data. here i got 2 options. one is MSXML and other is MSHTML. i tried both of them but i...
0
by: upendra.desai | last post by:
Hi, I have written an application in Microsoft Visual C++ (Visual Studio 6.0) that uses MSXML 4.0 SP2. When I try to load an XML from a file, it throws an E_ACCESSDENIED (HRESULT = 0x80070005)...
0
by: upendra.desai | last post by:
Hi, I have written an application in Microsoft Visual C++ (Visual Studio 6.0) that uses MSXML 4.0 SP2. When I try to load an XML from a file, it throws an E_ACCESSDENIED (HRESULT = 0x80070005)...
3
by: Sharon | last post by:
How can I find what MSXML version I have installed? -- Thanks Sharon
5
by: Jeroen | last post by:
We're using MSXML to transform the XML document we have to an XHTML file using an XSLT. Now the problem is that the dotnet implementation we made does something subtly different from the...
4
by: mrjaxon | last post by:
I have a C# web application which leverages MSXML that I am trying to migrate to a 64 bit environment. Currently the application is built on the .NET 2.0 Framework and using MSXML 6 (though I had...
6
by: Anthony Jones | last post by:
People, Anyone else got an IIS7 server out there that they can test this little ASP file:- <% Set xml = Server.CreateObject("MSXML2.DOMDocument.3.0") xml.loadXML "<root />" Set xsl =...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.