Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


Access Denied error when I try ie.document.frames.item(0).document.body.innerhtml

Posted on 2006-06-01
Medium Priority
Last Modified: 2008-01-09
I have a VB6 program that monitors an IE window.  It watches for the correct page to be loaded and then checks to see if the user has logged in.

The problem that I am having is I'm getting an error when it runs on some workstations.

The code looks like:

Dim ieDoc As MSHTML.HTMLDocument
Set ieDoc = ie.document  'If I do ieDoc.body.innerHTML here it allways works
Dim ieFrames As MSHTML.FramesCollection
Set ieFrames = ieDoc.frames

Dim mainFrame As MSHTML.HTMLWindow2
Set mainFrame = ieFrames.Item(2)

Dim mainFrameDoc As MSHTML.HTMLDocument
Set mainFrameDoc = mainFrame.document 'on some workstations this doesn't work  I get a  "Access is denied." error.  Number (-2147024891)

tempHTML = mainFrameDoc.body.innerHTML

I've tried to track down what the differences between the workstations that work and the ones that don't, but I haven't found any significant differences yet.

Question by:jsw3nson
  • 2
  • 2
LVL 30

Expert Comment

by:Irwin Santos
ID: 16812138
the workstations that have a problem need to have the following

- correct network share & permissions
- user logging in needs security & permissions

Author Comment

ID: 16812167
I use the same user on all machines.

What share and permissions should I check?
LVL 30

Expert Comment

by:Irwin Santos
ID: 16820205
Depending on your app and OS

NTFS permissions on the folder to at least read
IIS permissions for the user on the folder to at least access
LVL 10

Accepted Solution

eyal_mt earned 1500 total points
ID: 16828531
Access denied between frames, usually happens when you try to access one frame from another where both have different domain names, this is a security feature that can be overriden using browser definitions.
So, you may have different default configuration for IE on the different machines (have a look at the custom security setting options).
Or maybe somehow on different machines you use differnt domain names - and you only have a problem when they do not match.

Author Comment

ID: 16842791
I don't understand how NTFS or IIS security would matter?  I'm loggin in as the same user on each box.  The user is in the admin group.  I don't know if the web application is running on IIS or not.  I can't modify anything on the server anyway.  The user has full control for NTFS rights.

I've read about the cross frame security, but why would it work on one machine and not on another?  As far as I can tell the workstations are the same...

IE version = 6.0.2900.2180.xpsp_sp2_gdr.050301-1519
vpdate versions:; SP@; 3283;

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

CTAs encourage people to do something specific to show interest in your company, product or service. Keep reading to learn why CTAs should always be thought of as extremely important, albeit small, sections of websites.
How do you create a user-centered user experience on your website? And what are some things you should consider in the process?
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmakerā€¦
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).
Suggested Courses
Course of the Month15 days, 20 hours left to enroll

580 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question