Unique AJAX permission problem

N

nick

Hi I have a web form sitting inside a desktop application written in
Delphi (rendered by its browser component based on IE engine). The form
runs in 2 modes:

- live mode: all data freshly fetched a predefined external server
- local mode: users can save the entire html of the web form to a local
..html file and view it at a later time.

The problem arises in local mode when the user tries run ajax code from
what is effectively a local html file (eg. c:\path\submission111.html)
and obviously we get "permission denied" due to cross domain
restriction. The workarounds that I've been reading so far
unfortunately aren't gonna work in this case (eg. the "proxy"
solution).

Any suggestion would be very much appreciated.
 
T

Tim Williams

nick said:
Hi I have a web form sitting inside a desktop application written in
Delphi (rendered by its browser component based on IE engine). The form
runs in 2 modes:

- live mode: all data freshly fetched a predefined external server
- local mode: users can save the entire html of the web form to a local
.html file and view it at a later time.

The problem arises in local mode when the user tries run ajax code from
what is effectively a local html file (eg. c:\path\submission111.html)
and obviously we get "permission denied" due to cross domain
restriction. The workarounds that I've been reading so far
unfortunately aren't gonna work in this case (eg. the "proxy"
solution).

If they're "viewing it at a later time" then what is the benefit if they're
still required to be online in order to use the Ajax code?
Are you locally persisting information they've entered into the form ?

Tim
 
R

Randy Webb

nick said the following on 10/24/2006 11:53 PM:
Hi I have a web form sitting inside a desktop application written in
Delphi (rendered by its browser component based on IE engine). The form
runs in 2 modes:

- live mode: all data freshly fetched a predefined external server
- local mode: users can save the entire html of the web form to a local
.html file and view it at a later time.

The problem arises in local mode when the user tries run ajax code from
what is effectively a local html file (eg. c:\path\submission111.html)
and obviously we get "permission denied" due to cross domain
restriction. The workarounds that I've been reading so far
unfortunately aren't gonna work in this case (eg. the "proxy"
solution).

Any suggestion would be very much appreciated.

Look into the "Mark of the Web". It effectively puts local files into
the Internet Zone (At least in IE proper it does). In doing that, you
also remove it from the Local Zone so that it can't save files locally.

Try opening the web form in IE itself and see if you get the same
Permission Denied message. If not, then it's something in the app itself
that is not allowing the cross-domain aspect. As for using the
HTTPRequest Object locally, I have never tried posting information but I
use it quite extensively to read files from the web. The small app I
have takes a URL and gives me the HTML code, the included files, all of
it in one single file. Then I can save that file locally. It makes it a
lot easier to debug peoples online files without having to manually
figure it all out. And it all works using the HTTPRequest Object in IE.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top