views:

63

answers:

1

I am working on a tool that accepts an html string, downloads any images found in the code and replaces the image sources with the new local urls. When an image source redirects to another url, I get an access denied error on the request for it:

msxml3.dll error '80070005'

Access is denied.

(i.e. Original URL is: http://ads.cpafuel.com/42/5/0, and redirects to: http://img.directtrack.com/cpafuel/files/5.jpg)

I feel like this has something to do with IE's security settings, but am not sure which one. Any tips are greatly appreciated!

A: 

In order to allow this you need to enable cross-domain data access. You do this in the security settings for the zone you are using (probably internet zone in this case).

  • Open the Internet Options dialog, select the security tab
  • Select the appropriate zone, click Custom Level...
  • Scroll down to the Miscellaneous category
  • Under "Access data sources across domains", change to Prompt or Enable.

Note I'm not actually recommending you do this, if you do then just leave it set for the duration of what you are doing then put it back to disabled.

Have you considered installing the tool as a HTA? I dont't think such security restrictions do not apply when installed as a HTA.

AnthonyWJones