Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > win32all: buggy IE proxy stuff and execScript()

Reply
Thread Tools

win32all: buggy IE proxy stuff and execScript()

 
 
gcash
Guest
Posts: n/a
 
      08-07-2003
OK, I was writing code using WIN32ALL to do automation scripts for
common things we do in IE a lot at work, since grunt-n-point gets
very boring after a while. I snarfed the code from

<http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&newwindow=1&safe=off&selm=mailman.1034878702.259 47.python-list%40python.org>

which was very useful. (Thanks, Dave!)

Finally I get to a beta stage and give it to some of the guys in my
group to test, and they get "Access is denied" errors executing the
execScript() method, which runs some javascript in the browser
context.

They're running pretty much the exact same windows install I am, so I
beat my head against the wall for a day trying to figure out what's
going on. Some people can run things as "Administrator", some folks
can run it as their user, some get it to work under both accounts, and
some can't get it to work under any account. My machine never had any
problems, even when I tried to make it break.

I'm using Win2K Pro SP 4 with all the critical patches, Python 2.2.3,
and win32all build 156.

I thought it was strange that I got NO Google hits on my error
message, and no one else was having the problem.

I was getting nowhere so I decided to post to comp.lang.python about
my problem and see if some bright person had an idea. Not only is this
the most coding I've ever done under Windows, but this is probably the
most I've USED Windows in years.

So I whipped up a short script to demonstrate the problem, and since
no one would have access to our internal sites, I used www.python.org
as my example site.

I wanted to cut'n'paste the error message, so I ran the script on my
bosses' machine. AND IT WORKED. I changed the site back to our
internal website and it crashed. Obviously this immediately narrows it
down to the proxy settings, which I compared to the ones on my
machine.

It turns out that if the site is listed in the "bypass proxy" list, it
becomes a "Local Intranet" site and you get permission errors NO
MATTER how you set the permissions for the "Local Intranet" zone. I
experimented a lot with this, and I got my machine to finally get
permission errors.

Obviously a bug, but I didn't find anything in MSDN or MS KB on it.

Here's what you need to do as a workaround:

1. Open the "Tools->Internet Options" menu.
2. Select the "Security" tab.
3. Click the "Local Intranet" zone icon.
4. Click the "Sites" button.
5. Uncheck the "Include all sites that bypass the proxy server"
item.
6. Hit the "OK" buttons twice.

That fixes it by putting these sites into the "Internet" zone, and you
have to do this for the Windows user(s) that will be running IE
scripts, as it's a per-user thing.

It seems that it doesn't matter what the permissions are for the
"Internet" zone, as I cranked those all the way up and didn't have any
problems.

Am I really the first person to run into this?

-gc

--
The Stones of Ranthenge are written through-and-through, though in an
ancient script composed solely of decimal points. There are none who
understand these strange inscriptions outside of one order of Monks,
who refer to this place as "The Stones That Are Nine-Edge-Down".
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
IllegalArgumentException with Socket API and Proxy with Proxy.Type.HTTP Greg Java 4 08-16-2012 08:26 PM
Proxy pattern and java.lang.reflect.Proxy/InvocationHandler Karsten Wutzke Java 1 08-20-2007 11:05 AM
Inbound Proxy and Outbound Proxy chellappa VOIP 0 04-07-2006 10:58 AM
Press Release: Scalable SIP Proxy and RTP Media Proxy for NAT traversal sales@lanscapecorp.com VOIP 1 01-23-2006 06:32 PM
Proxy and non Proxy configurations Alejandro Molina ASP .Net Security 0 07-15-2004 05:04 AM



Advertisments