Warning: The content of this article may be out of date. It was last updated in 2002.
This document is intended to explain how the autodial helper feature implemented for bug 93002 works and why it works that way.
In the consumer versions of Windows, (Windows 95, Windows 98, Windows ME) autodial for all applications is controlled from the Control Panel, in the Internet Options applet, under the tab Connections. If you turn on the autodial feature, Windows will automatically dial whenever any application tries to access a network address that can't be reached. Technically, this control panel applet (Internet Options) is part of Internet Explorer. It is not present in early versions of Windows until Internet Explorer is installed. Despite this fact, the feature is triggered by any application that uses networking.
Starting with Windows NT, and in all NT-based versions (Windows NT, Windows 2000, and Windows XP, including XP Home) Microsoft has changed the behavior of autodial. For these OSs, the autodial options found in the Internet Options control panel applet only apply to Microsoft applications, including Internet Explorer and Outlook. Microsoft added a Windows System Service (Remote Access Auto Connection) to handle autodial for all other applications. If this service is running, and Control Panel | Network Connections | Advanced | Dialup Preferences is set to enable autodial, then any application trying to access the Internet will trigger the autodial feature whenever an Internet address cannot be reached. However, this service will won't function if you have a LAN card installed, unless that particular address has been accessed in the past via a dialup connection.
Before the implementation of the Autodial Helper feature, Mozilla would trigger the autodial feature on NT-based operating systems, but only if certain conditions are met. These conditions are as follows:
- The autodial service is running
- Control Panel | Network Connections | Advanced | Dialup Preferences | Enable autodial by location is set for some location
- A dialup connection has been configured
- There is no LAN connected OR The dialup connection has been used to access the Internet address in question.
Most systems are not set up correctly for this to happen, and most users have no idea how all these details work. So, as more people move to Windows XP from Windows 98, the autodial suddenly stops working for them. In fact, it's not Mozilla that is broken, it's that Microsoft has changed the way things work from Windows 98 to Windows XP.
In an attempt to help users who want to use the autodial feature of the OS, I added the Autodial Helper Feature requested in bug 93002.
This feature doesn't do anything on Linux, Mac, or the consumer versions of Windows.
The "correct" way too use the autodial feature in NT-based OSs is for the user to configure the system to use the autodial service. If the user has a modem and no LAN card, this service will work reliably for them. Whenever an Internet address cannot be reached, because of a DNS lookup failure for example, the system will try to dial. However, if the user has both a modem and a LAN card, the service will be less reliable for them. The only way the service will work in this case is if the Internet address has been accessed some previous time via the modem. These addresses are stored in an OS database, the RAS Autodial Addresses db, and a set of heuristics are used to determine if an address is already in the database or not. Essentially, if some address at domain.com is in the database, then any address at domain.com is considered to be in the database. Also, if any address that starts with www is in the database, then any other address that begins with www is considered to be in the database. It is important to note that the function of this system service in no way depends on the settings found in Control Panel | Internet Options | Connections.
Since the service is the correct way to use autodial for these OSs, the first part of the fix to this bug is to help users of the service. Generally, if the service is running, and an address can't be reached, the autodial helper adds the address to the RAS Autodial Address db. The next time this address is tried and can't be found, the autodial service will be triggered and dialup will commence.
Many Windows XP users, especially Windows XP Home users, don't understand that Microsoft has changed how autodial works. To them it looks like Mozilla is broken because Windows doesn't try to dial when the feature is turned on in Control Panel | Internet Options | Connections when they are using Mozilla but it does when they are using Internet Explorer. "What's a system service" they might ask when told about how autodial is supposed to work now.
The second part of this fix is for those users. We try to mimic the autodial system service if it is not running and the user has the autodial feature turned on in Control Panel | Internet Options | Connections. If an address can't be reached, we trigger the autodial features from inside Mozilla. If a default dialup connection is configured, we use that one. If more than one dialup connection is configured, and none is selected as the default, we display a list of dialup connections and let the user choose one.
First, you will need to configure a dialup connection and make sure it works when triggered manually.
If you are using a system with just a modem, the best approach is to configure the Remote Access Auto Connection service to automatically start. Then enable autodial for a dialup connection: Control Panel | Network Connections | Advanced | Dialup Preferences. This will handle autodial whenever an address can't be found.
If you are using a system with both a LAN and a modem connection, and you want to use the autodial feature whenever you are not connected to the LAN, it's probably better to use the Control Panel | Internet Options | Connections options. Select "Dial whenever a network connection is not present" or "Always dial my default connection". These two behave the same for Mozilla, and trigger autodial when you fail to reach a requested address.
There have been a few bug reports filed against this new feature that are the result of the fact that Mozilla now looks at the Control Panel | Internet Options | Connections settings. Some users have had the autodial setting turned on, but Mozilla never triggered them before. Starting in Mozilla 1.1, autodial is triggered whenever an address can't be reached (Mozilla now mimics the Remote Access Autodial service.) See bug 160846, bug 167624, and bug 160846. If a user doesn't want the OS to use autodial, he must turn off the feature from the OS.
There is also a problem with the AOL client when used as a dialer. bug 166134 describes how the AOL client installs itself as a dialer, but it doesn't behave like other dialers. The problem is with the AOL client, be the bug could probably be fixed by not changing Mozilla to avoid using the AOL client as a dialer even though it installs itself as one.
A parallel feature has been requested in bug 130774: if we trigger the autodial connection, we should ask the user if he wants to hang up the connection when we close Mozilla.
There also has been some confusion about what online/offline means. In Mozilla, it means try to access the network or not. To some users, it means connected to a network or not. Some people expect an option to toggle online/offline should trigger dialup or disconnect. This is a misunderstanding of this mode. Hanging up a dialup connection should not cause Mozilla to go into offline mode. Making a dialup connection should not cause Mozilla to go into online mode.
A Pref to Disable
Users can bypass the feature altogether by setting the pref
false. Since the feature was implemented close to the release of Netscape 7, the pref was added so that we could include the feature in the 7.0 release with the feature turned off and enable it in specific cases. The feature was turned on in Mozilla 1.1 to get more exposure. Mozilla 1.1 also includes a fix to bug 157733, which allows our interaction with the autodial service to work a little more reliably. I don't see a need to expose this pref in the UI, but perhaps it should be there. Or pehaps we should assume Mozilla users can configure the autodial service and disable the helper by default, but Netscape users need a little more help, and enable it for them.
- Author(s): Benjamin Chuang
- Last Updated Date: October 2, 2002
- Copyright Information: Portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a Creative Commons license | Details.