473,386 Members | 1,924 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 for xml load

var strPath = "c:\myXml.xml";

var objDom = new ActiveXObject("Msxml2.DOMDocument");
alert('step 1');
objDom.load(strPath);
alert('step 2');
................

AFTER step 1 I'm getting an errorrrrrrrrrrrr. Im just going crazy.
Error: Access denied!
Yes, if I put strPath like : http://somehost/myXml.xml it is going to
work.
But I need the user to be able to pick up this xml with an <input
type=file>.
It won't be any upload, invloved, just read the damn path to the xml
and load the xml. WHY is this happen?

Thanks!
Jul 20 '05 #1
1 2996
Because JavaScript in a client-browser is running in
a "sandbox", and won't let you out as long as you
don't sign your scripts.

objDom.load("C:\..."); are accessing the local file-system.
Javascript are *only* allowed to access files on the
server it originated.

(And thank God for that!)
If you really need this functionality, I would recommend
that you contact Thawte or VeriSign to get yourself a
Code Signing certificate, and convince your users to accept and
install your certificate when they access your page.

Signed Scripts *can* access local files.

--
Dag.
"sean" <ja*********@yahoo.se> wrote in message
news:d9*************************@posting.google.co m...
var strPath = "c:\myXml.xml";

var objDom = new ActiveXObject("Msxml2.DOMDocument");
alert('step 1');
objDom.load(strPath);
alert('step 2');
...............

AFTER step 1 I'm getting an errorrrrrrrrrrrr. Im just going crazy.
Error: Access denied!
Yes, if I put strPath like : http://somehost/myXml.xml it is going to
work.
But I need the user to be able to pick up this xml with an <input
type=file>.
It won't be any upload, invloved, just read the damn path to the xml
and load the xml. WHY is this happen?

Thanks!

Jul 20 '05 #2

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

Similar topics

12
by: Chad Crowder | last post by:
Hi all, I hope someone can give me a hand, because I'm out of ideas. I keep getting this message: Access to the path "C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\Temporary ASP.NET...
5
by: Raterus | last post by:
I'm just throwing this error out for my sanity, I've seen posts about this, but never solutions. I'm using VS.NET 2003, Framework 1.1, and I'm getting a random error about every 1 out of 10 times...
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...
6
by: Chuck Yeager via DotNetMonster.com | last post by:
I think I am giong to die, this is driving us nuts. Here is the error we are getting when trying to use CrystalReportViewer: OS: XP SP1 and another machine XP SP2 (same errors) IDE: VS .NET...
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...
2
by: job | last post by:
In a sharepoint setup using smartpart to load our user controls using enterprise blocks (data) we are getting some strange errors (logged to the event log). We dont get the error all the time. When...
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...
8
by: ajos | last post by:
hi frnds, im trying to convert my servlets database configuration from ms access to mysql database.however im getting some error like no driver found exception. to verify this error ive...
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...
6
by: fyitang | last post by:
hi guys, here is the sample: string strFileFullName = ""; try { FileInfo currentFile = GetOneFile("some directory"); strFileFullName = currentFile.FullName; // do someting...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
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
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
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,...

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.