473,662 Members | 2,575 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

win32all: buggy IE proxy stuff and execScript()

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.c om/groups?hl=en&lr =&ie=UTF-8&oe=UTF-8&newwindow=1&s afe=off&selm=ma ilman.103487870 2.25947.python-list%40python.o rg>

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.pytho n 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".
Jul 18 '05 #1
0 3022

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

Similar topics

0
1613
by: Mike Cannon | last post by:
I'm having a problem with the newer version of win32all and Python 2.3 with code that works fine on Python-2.2 (details below). Both machines are Windows XP. The code that breaks is derived from the venerable jet2sql.py cookbook example. I added a routine that uses the daoEngine collection "TableDefs" and indexes it with a string (the table name). That works on Py-2.2/win32all-148 but not with Py-2.3/win32all-159. Any help ?
0
1261
by: The Jetman | last post by:
Folks: Have seen this minor problem w/ WIN32ALL-157 thru 159. I install a fresh copy of Python 2.3. Then proceed to install WIN32ALL. It always crashes the 1st time thru w/ the following dump from FAULTLOG.TXT: ********************************************************************** Date 10/30/2003 Time 19:42 WIN32ALL-159 caused an invalid page fault in module MSVCRT.DLL at 016f:7800d269. Registers:
3
5711
by: Werner Merkl | last post by:
Hi, Python is really great, for small to big programs. For my colleagues and some circumstances I sometimes need to "compile" a script using py2exe. Cause I use Windows, I like to use the (Windows) ability, to add some version infos, comments, etc to the exe file. If I use explorer to check, these properties are visible and correct.
0
1619
by: PiErre | last post by:
Hi All, I am trying to install win32 extension 162 on python 2.2.3 on a virtual (vmware) machine with win2k server sp3 (but I tested that the same happens on either win2k sp2 or win2ksp3 on a real biprocessor). I keep getting the drwatson error reported below during win32all 162 installation (during the compiling step, near the end of the progression bar - it can pass unnotice, but some symptoms are that you don't have a finish button -...
16
60600
by: Paul Sweeney | last post by:
Does anyone know of a working (python) https proxy which allows viewing of unencrypted data being sent from my browser to an https site? I've worked my way through most on the list at http://xhaus.com/alan/python/proxies.html, but while many claim to support https, if you actually point your browser at the proxies, they work fine for http, but not for https pages. TIA
2
1452
by: nitrogenycs | last post by:
Hello, I need a way to get a notification whenever a variable of an object changes. The approach should be non-intrusive so that I can use existing objects without modifying them. I want to be notified no matter who or what did change the wrapped object - even whenever an object internal methods changes the variables. So I coded the piece of code shown below (just copy and paste it, it's ready-to-run).
6
2874
by: sameer | last post by:
..NET Framework 1.1 VS2003 Application is making webservice calls from behind a proxy server and then freezes and dies. Questoin is can i use webservice over proxy server( i guess another name of them is ISA ... if i a not wrong), if yes how? Sameer
7
15420
by: Pro1712 | last post by:
Hello, I need to write a simple proxy server. What I want to do is to use HttpListener to get requests from the browser, add some proxy information and some other stuff and send the request to the internet. Then I want to send the answer back to the browser... Sounds simple... But how can I do this?
1
3106
by: Drelus | last post by:
I'm using an Ajax call to open a search box in the page and I want the focus to go to the box automatically. So, in the httpObject.responseText, I tried sending the following in addition to the search box markup: <script type="text/javascript"> document.getElementById('Message').focus(); </script> and, after writing the response using innerHTML, the originating Ajax function calls an eval function to enable the JavaScript, the critical...
0
8432
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8344
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8857
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8546
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8633
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7367
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6186
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4347
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
1993
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.