473,320 Members | 2,202 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,320 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 1521

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: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.