473,386 Members | 1,738 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,386 software developers and data experts.

access denied


Hi!

I'm new in JavaScript, and tried out some examples.

If found an XML example at MSDN MSXML 4.0 DOM which is:
http://msdn.microsoft.com/library/de...th_hn_2uck.asp

var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.4.0");
xmlDoc.async = false;
xmlDoc.resolveExternals = false;
xmlDoc.load("C:\\temp\\books.xml");
if (xmlDoc.parseError.errorCode <> 0) {
var myError = xmlDoc.parseError;
alert("You have error " + myErr.reason);
} else {
alert(xmlDoc.xml);
}

Where ich changed the '<>' to '!='

but runnung this in IE6.0 I got an error 'access denied' at the loa
statement. The file could be opened in IE6.0. Erverything run
clientside without IIS.

What the reason for that?
Thanks for help
-
sinn

Jul 23 '05 #1
16 7804
sinna wrote:
Hi!

I'm new in JavaScript, and tried out some examples.

If found an XML example at MSDN MSXML 4.0 DOM which is:
http://msdn.microsoft.com/library/de...th_hn_2uck.asp

var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.4.0");
xmlDoc.async = false;
xmlDoc.resolveExternals = false;
xmlDoc.load("C:\\temp\\books.xml");
if (xmlDoc.parseError.errorCode <> 0) {
var myError = xmlDoc.parseError;
alert("You have error " + myErr.reason);
} else {
alert(xmlDoc.xml);
}

Where ich changed the '<>' to '!='

but runnung this in IE6.0 I got an error 'access denied' at the load
statement. The file could be opened in IE6.0. Erverything runs
clientside without IIS.

What the reason for that?
Thanks for help!


This works on my Win98 IE6

function showURL(adr) {
try {
var objDOM = new ActiveXObject("Msxml2.DOMDocument");
objDOM.async = false;
alert('adr= '+adr);
if (objDOM.load(adr))
alert(objDOM.xml);
else
alert("Error: " + objDOM.parseError.reason);
}
catch(e) {
alert("Error: " + e);
}
}
Jul 23 '05 #2
sinna wrote:
I'm new in JavaScript, and tried out some examples.
If found an XML example at MSDN MSXML 4.0 DOM which is:
http://msdn.microsoft.com/library/de...th_hn_2uck.asp

var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.4.0");
xmlDoc.async = false;
xmlDoc.resolveExternals = false;
xmlDoc.load("C:\\temp\\books.xml");
if (xmlDoc.parseError.errorCode <> 0) {
var myError = xmlDoc.parseError;
alert("You have error " + myErr.reason);
} else {
alert(xmlDoc.xml);
}

Where ich changed the '<>' to '!='
but runnung this in IE6.0 I got an error 'access denied' at the load
statement. The file could be opened in IE6.0. Erverything runs
clientside without IIS.
What the reason for that?


Try using this XML Sniffer to see what versions your browser supports.
When I tried your code I got 'Automation Server Can't Create Ojbect'.

The sniffer shows this about my system, not sure how to interpret it but
I'm not surprised there's a problem when trying to create an v4.0
object. You might see if you have similar results. If so you may have
some upgrades to install.

MSXML Installed
MSXML2 Installed
MSXML2 v2.6 Automation server can't create object
MSXML2 v3.0 Installed
MSXML2 v4.0 Automation server can't create object
Mode Replace V3

http://www.bayes.co.uk/xml/index.xml...ml_sniffer.htm

Good Luck,
MIke

Jul 23 '05 #3
mscir wrote:

This version of your code worked fine for me after installing MSXML 4.0
Service Pack 2 on my machine, you can get it here:

http://www.microsoft.com/downloads/d...DisplayLang=en

MSXML 4.0 Service Pack 2 (SP2) is a complete replacement of MSXML 4.0
and MSXML 4.0 Service Pack 1 (SP1). MSXML 4.0 SP2 provides a number of
security and bug fixes. MSXML 4.0 SP2 does not replace MSXML 3.0...

msxml.msi 5166 KB

function loadxmldoc() {
var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.4.0");
xmlDoc.async = false;
xmlDoc.resolveExternals = false;
xmlDoc.load("C:\\WINDOWS\\SYSTEM\\wmpscheme.xml");
if (xmlDoc.parseError.errorCode != 0) {
var myError = xmlDoc.parseError;
alert('Error: '+myErr.reason);
}
else
alert(xmlDoc.xml);
}

Good Luck,
Mike

Jul 23 '05 #4

mscir wrote:
*sinna wrote:
I'm new in JavaScript, and tried out some examples.
If found an XML example at MSDN MSXML 4.0 DOM which is:


http://msdn.microsoft.com/library/de...th_hn_2uck.asp

var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.4.0");
xmlDoc.async = false;
xmlDoc.resolveExternals = false;
xmlDoc.load("C:\\temp\\books.xml");
if (xmlDoc.parseError.errorCode <> 0) {
var myError = xmlDoc.parseError;
alert("You have error " + myErr.reason);
} else {
alert(xmlDoc.xml);
}

Where ich changed the '<>' to '!='
but runnung this in IE6.0 I got an error 'access denied' at th

load
statement. The file could be opened in IE6.0. Erverything runs
clientside without IIS.
What the reason for that?


Try using this XML Sniffer to see what versions your browse
supports.
When I tried your code I got 'Automation Server Can't Creat
Ojbect'.

The sniffer shows this about my system, not sure how to interpret i
but
I'm not surprised there's a problem when trying to create an v4.0
object. You might see if you have similar results. If so you ma
have
some upgrades to install.

MSXML Installed
MSXML2 Installed
MSXML2 v2.6 Automation server can't create object
MSXML2 v3.0 Installed
MSXML2 v4.0 Automation server can't create object
Mode Replace V3

http://www.bayes.co.uk/xml/index.xml...ml_sniffer.htm

Good Luck,
MIke *

First thanx!

The sniffer reports:

MSXML Sniffer
MSXML Installed
MSXML2 Installed
MSXML2 v2.6 Installed
MSXML2 v3.0 Installed
MSXML2 v4.0 Installed
Mode Replace V3

Which should mean MSXML is installed propper.

Is there any security option that has to be changed, so that JS can
access local files?
Andrea
-
sinn

Jul 23 '05 #5
sinna wrote:
<snip>
MSXML Sniffer
MSXML Installed
MSXML2 Installed
MSXML2 v2.6 Installed
MSXML2 v3.0 Installed
MSXML2 v4.0 Installed
Mode Replace V3

Which should mean MSXML is installed propper.

Is there any security option that has to be changed, so that JS cann
access local files?


I don't know right now... I wonder if it's due to v4.0's tighter
security. To help diagnose it, did you try this to see if it would work?

function showURL(adr) {
try {
var objDOM = new ActiveXObject("Msxml2.DOMDocument");
objDOM.async = false;
alert('adr= '+adr);
if (objDOM.load(adr))
alert(objDOM.xml);
else
alert("Error: " + objDOM.parseError.reason);
}
catch(e) {
alert("Error: " + e);
}
}
Jul 23 '05 #6
sinna wrote:
<snip>
Is there any security option that has to be changed, so that JS cann
access local files?


Are the html page with the javascript function and the xml doc running
on the same machine? Check this out:

http://oldlook.experts-exchange.com:..._20684307.html
Jul 23 '05 #7

mscir wrote:
*sinna wrote:
Hi!

I'm new in JavaScript, and tried out some examples.

If found an XML example at MSDN MSXML 4.0 DOM which is:


http://msdn.microsoft.com/library/de...th_hn_2uck.asp

var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.4.0");
xmlDoc.async = false;
xmlDoc.resolveExternals = false;
xmlDoc.load("C:\\temp\\books.xml");
if (xmlDoc.parseError.errorCode <> 0) {
var myError = xmlDoc.parseError;
alert("You have error " + myErr.reason);
} else {
alert(xmlDoc.xml);
}

Where ich changed the '<>' to '!='

but runnung this in IE6.0 I got an error 'access denied' at th

load
statement. The file could be opened in IE6.0. Erverything runs
clientside without IIS.

What the reason for that?
Thanks for help!


This works on my Win98 IE6

function showURL(adr) {
try {
var objDOM = new ActiveXObject("Msxml2.DOMDocument");
objDOM.async = false;
alert('adr= '+adr);
if (objDOM.load(adr))
alert(objDOM.xml);
else
alert("Error: " + objDOM.parseError.reason);
}
catch(e) {
alert("Error: " + e);
}
} *


This leeds to the on "object Error", which is thrown by the loa
methode. Removing the try .. catch statment produces again the 'acces
denied' message.

Thanx

Andrea
-
sinn

Jul 23 '05 #8

mscir wrote:
*mscir wrote:

This version of your code worked fine for me after installing MSXM
4.0
Service Pack 2 on my machine, you can get it here:

http://tinyurl.com/aw2g

MSXML 4.0 Service Pack 2 (SP2) is a complete replacement of MSXM
4.0
and MSXML 4.0 Service Pack 1 (SP1). MSXML 4.0 SP2 provides a numbe
of
security and bug fixes. MSXML 4.0 SP2 does not replace MSXML 3.0...

msxml.msi 5166 KB

function loadxmldoc() {
var xmlDoc = new ActiveXObject("Msxml2.DOMDocument.4.0");
xmlDoc.async = false;
xmlDoc.resolveExternals = false;
xmlDoc.load("C:\\WINDOWS\\SYSTEM\\wmpscheme.xml");
if (xmlDoc.parseError.errorCode != 0) {
var myError = xmlDoc.parseError;
alert('Error: '+myErr.reason);
}
else
alert(xmlDoc.xml);
}

Good Luck,
Mike *


Hi Mike,

I hoped that this would help.
I donwloaded the .msi file and installed it, but it seems that I ha
allready SP2 installed, cause the install offered jus
repair/uninstall.
But the repair dosn't help.

I tried this on another computer were MSXML40 is not installed. ther
it works. (changing 'Msxml2.DOMDocument.4.0' to 'Msxml2.DOMDocument')

I believe that maybe a option in the IE could be the solution.

thank you
Andrea
-
sinn

Jul 23 '05 #9

mscir wrote:
*sinna wrote:
<snip>
Is there any security option that has to be changed, so that J

cann
access local files?


Are the html page with the javascript function and the xml do
running
on the same machine? Check this out:

http://oldlook.experts-exchange.com:...Q_20684307.htm
*


Hi,

Yes they do! It's all local. There is no webserver involved. Both th
HTML and the XML are resided in the same local directory.

The link deals with the crossplattform problem which I should no
have.

thank you

Andrea
-
sinn

Jul 23 '05 #10

sinna wrote:
*Hi,

Yes they do! It's all local. There is no webserver involved. Both th
HTML and the XML are resided in the same local directory.

The link deals with the crossplattform problem which I should no
have.

thank you

Andreas *


Hi,

It works if the files are an a network drive, but if the are on a loca
drive I got a error "ACCESS DENIED"

Seems to be problem with the access rights.

Any ideas?

Andrea
-
sinn

Jul 23 '05 #11

sinna wrote:
*Hi Mike,

I hoped that this would help.
I donwloaded the .msi file and installed it, but it seems that I ha
allready SP2 installed, cause the install offered jus
repair/uninstall.
But the repair dosn't help.

I tried this on another computer were MSXML40 is not installed. ther
it works. (changing 'Msxml2.DOMDocument.4.0' t
'Msxml2.DOMDocument')

I believe that maybe a option in the IE could be the solution.

thank you
Andreas *

Hi,

It works if the files are an a network drive, but if the are on a loca
drive I got a error "ACCESS DENIED"

Seems to be problem with the access rights.

Any ideas?

Andrea
-
sinn

Jul 23 '05 #12
sinna wrote:
sinna wrote: <snip> It works if the files are an a network drive, but if the are on a local
drive I got a error "ACCESS DENIED". Seems to be problem with the access rights.
Any ideas?


Sounds like you were right about it being a security issue all along. i
don't have IIS, can't use it on my win98, used PWS when doing ASP pages,
don't know how to set IIS security features. You might consider posting
to these newsgroups:

microsoft.public.xml
microsoft.public.inetserver.iis.security

----------------------------------------------------------------------

If you download this page and copy the xml file you want to open to the
folder where you download it, can you load the xml page?

http://rdcpro.com/xmldev/tools/

----------------------------------------------------------------------

The above page mentions setting browser security to allow acceess across
domains, although it may not be an issue for you now:

"Accessing XML documents from domains other than this one might be
disabled in your browser. To change your cross-domain data security
setting to 'Prompt.' In IE 6, go to Tools=>Internet Options and click
the 'Security' tab. Select Internet, then click the 'Custom Settings'
button. "Scroll down to 'Miscellaneous' and under 'Access Data Sources
Across Domains,' select 'Prompt'. "Click 'OK,' and answer 'Yes' to the
warning dialog. Click 'Ok' to close the 'Internet Options' dialog.
Internet Explorer will now ask for permission any time it tries to
access data from other Domains. If you do not trust a site making this
request, you should click 'No' whenever you see the dialog."

-----------------------------------------------------------------------

I don't know if this applies either:

http://www.derkeiler.com/Newsgroups/...3-10/0024.html

HOWTO: Track "Permission Denied" Errors on DLL Files

http://support.microsoft.com/?id=286198

-----------------------------------------------------------------------

If these don't help, you might also consider posting here:

http://www.perfectxml.com/msxmlask.asp

Good Luck,
Mike

Jul 23 '05 #13

mscir wrote:
*sinna wrote:
sinna wrote:

<snip>
It works if the files are an a network drive, but if the are on

local
drive I got a error "ACCESS DENIED". Seems to be problem with th

access rights.
Any ideas?


Sounds like you were right about it being a security issue all along
i
don't have IIS, can't use it on my win98, used PWS when doing AS
pages,
don't know how to set IIS security features. You might conside
posting
to these newsgroups:

microsoft.public.xml
microsoft.public.inetserver.iis.security

----------------------------------------------------------------------

If you download this page and copy the xml file you want to open t
the
folder where you download it, can you load the xml page?

http://rdcpro.com/xmldev/tools/

----------------------------------------------------------------------

The above page mentions setting browser security to allow accees
across
domains, although it may not be an issue for you now:

"Accessing XML documents from domains other than this one might be
disabled in your browser. To change your cross-domain data security
setting to 'Prompt.' In IE 6, go to Tools=>Internet Options an
click
the 'Security' tab. Select Internet, then click the 'Custo
Settings'
button. "Scroll down to 'Miscellaneous' and under 'Access Dat
Sources
Across Domains,' select 'Prompt'. "Click 'OK,' and answer 'Yes' t
the
warning dialog. Click 'Ok' to close the 'Internet Options' dialog.
Internet Explorer will now ask for permission any time it tries to
access data from other Domains. If you do not trust a site makin
this
request, you should click 'No' whenever you see the dialog."

-----------------------------------------------------------------------

I don't know if this applies either:

http://www.derkeiler.com/Newsgroups/...3-10/0024.html

HOWTO: Track "Permission Denied" Errors on DLL Files

http://support.microsoft.com/?id=286198

-----------------------------------------------------------------------

If these don't help, you might also consider posting here:

http://www.perfectxml.com/msxmlask.asp

Good Luck,
Mike *

Hi Mike,

thank you for helping me!

I don't use IIS either!
I found a solution, but I don't realy understand what is the bi
difference. I attached my solution.

cheers
Andrea

+----------------------------------------------------------------
| Attachment filename: xmlload.htm.txt
|Download attachment: http://www.forum4designers.com/attac...?postid=249697
+----------------------------------------------------------------

-
sinn

Jul 23 '05 #14
sinna wrote:
<snip>
I found a solution, but I don't realy understand what is the big
difference. I attached my solution.


Couldn't read it, also you're not supposed to use attachments with this
newsgroup. Would you mind posting the code here?

Jul 23 '05 #15

mscir wrote:
*sinna wrote:
<snip>
I found a solution, but I don't realy understand what is the big
difference. I attached my solution.


Couldn't read it, also you're not supposed to use attachments wit
this
newsgroup. Would you mind posting the code here? *


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>XML load</title>
</head>

<body vLink="#000066" aLink="#000066" link="#000066
bgColor="#ffffff" leftMargin="0" topMargin="0" marginheight="0
marginwidth="0">

<div id="xmlobj" xmlurl="" ><br/><br/>Loading...</div>

<script language="javascript">
var xmlfile;
xmlfile = "C:/Test.xml";
xmlobj.xmlurl = xmlfile;

var xmlDoc = new ActiveXObject("Msxml2.DOMDocument");
xmlDoc.async = false;
xmlDoc.resolveExternals = false;
xmlDoc.preserveWhiteSpace = false;
xmlDoc.load( xmlobj.xmlurl );
if (xmlDoc.parseError.errorCode != 0)
alert("Error");
else
alert(xmlDoc.xml);
</script>

</body>
</html
-
sinn

Jul 23 '05 #16
Hi Mike or anyone else,

Just wanted to ask you how you installed MSXML 4.0 Core Services SP2 (I
have Visual Studio .NET Professional Installed on Windows XP)?

I donwloaded the relevant files:

msxml.msi 5166 KB
msxml4msms.exe 768 KB
MSXML4SP_RelNote.htm 23 KB
msxmlcab.exe 723 KB
msxmlsdk.exe 3392 KB

from->
http://www.microsoft.com/downloads/d...g=en&FamilyID=
3144b72b-b4f2-46da-b4b6-c5d7485f2b42

However, it didn't have any instructions as to how to install it. It
said if I was going to use the MSI file to install it, I had to download
the Windows Installer 2.0, but this is only required if you want to
package up MSXML 4.0 with your applicaiton right? So without downloading
the Windows Installer, I double-clicked on the msxml.msi file where I
had saved it. Then it installed. When I went to the directory where I
had installed it, there was nothing there. I don't understand. Please
help me, any feedback would be much appreciated.

Kind regards,

Noah.
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 23 '05 #17

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

Similar topics

2
by: calfdog | last post by:
Hello, Does anyone know a workaround for calling fireEvent. With the latest from Microsoft OS XP2 and Hot fixes to IE it now gives an "access denied" error in Python when called. Here is what...
0
by: Steve | last post by:
Hi, Yesterday I signed up for another dedicated linux server with the hosting company I use and I am having problems getting MySQL 4.1.3 working on it. I've tried just about everything I can...
9
by: | last post by:
Hi All, I have allready tried to ask a similar question , but got no answer until now. In the meantime, I found, that I cannot understand some thread-settings for the Main() function . If I use...
0
by: ASP.Confused | last post by:
The old message looked a little stale, so I am re-posting it here. Anybody have any ideas of what I could do?!? The previous responses to this question are below. If you want to look at the...
16
by: Brad | last post by:
After compiling my asp.net project I'm receiving a "BC31011 - Access is denied" error when attempting to run or debug. The only thing that seems to resolve problem is IISReset. After a reset my...
12
by: Ron Weldy | last post by:
I have a test server runinng 2003/IIS 6 with a mixture of asp and asp.net files. On my workstation I have a share set up to the folder where the web files reside. I am just doing quick and dirty...
3
by: Shailesh Humbad | last post by:
I figured out what was causing the "Access is Denied" error when calling functions from referenced DLLs in my service. I've tried to be very detailed, so bear with me. It turns out that...
3
by: David Thielen | last post by:
Hi; I created a virtual directory in IIS 6.0 and my asp.net app runs fine. But when it tries to write a file I get: Access to the path is denied. - C:\Inetpub\wwwroot\RunReportASP\images ...
8
by: Jeremy Ames | last post by:
I am trying to move an application from my system to a new test system. I really should have tried an easier program first, but I didn't really have a chance. My application was originally written in...
0
by: Andy | last post by:
Thanks Peter, I thought I'd give an update on this problem. My application had 2 assemblies that contained classed for the Data access and business logic layer. It was on one of them that I was...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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.