This article covers some of the most Frequently Asked Questions (FAQ) about
developing with the Microsoft Internet Client SDK. You can find this and
other FAQ articles by querying on the keyword "FAQ."
This FAQ is also available on the Microsoft Web site at:
Setup
- Q. What are the system requirements for installing the SDK?
A. To download and use the Internet Client SDK, you will need the following:
- The Internet Explorer 4.0 or 4.01 (Internet Explorer 3.x and preview releases of Internet Explorer 4.0 are not supported.)
- Windows NT 4.0 or Windows 95. More recent beta versions of Windows were not targeted for support, but might work if you upgrade to Internet Explorer 4.0 Preview 2.
Active Desktop
- Q. I can't seem to turn ActiveDesktop on from an NT Server box. Am I
missing something?
A. Active Desktop is currently disabled by default on Windows NT Server
machines. You can turn it on by removing the "NoActiveDesktop"
restriction found under the following registry key and then rebooting
the machine:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\
Policies\Explorer
Channels
- Q. What MIME type do I specify in my dynamically generated CDF file? CDF files that are dynamically generated through Active Server Pages (ASP)
should insert the following line at the top of the file (before any CDF
lines):
<% Response.ContentType = "application/x-cdf" %>
This ensures that servers return the correct MIME/content type "application/x-cdf."
Problems with CDF files being displayed as HTML text inside the Internet
Explorer 4.0 browser, instead of invoking the subscription wizard, may
likely be caused by the server returning the incorrect MIME type of
"text/html" instead of the desired "application/x-cdf".
- Q. When dynamically generating a CDF file from an Active Server Pages
(ASP) page, is the ASP file the one the user needs to subscribe to?
A. Yes, assuming that the correct CDF MIME type is specified in the ASP
page, as illustrated in the FAQ above, double-clicking on a link to the
ASP file should bring up the CDF subscription wizard appropriately.
- Q. I cannot use the ampersand character in my CDF TITLE. Do I have to
treat certain characters special when working with CDF files?
A. As mentioned in the "CDF Parsing Rules and Hints" section of the CDF
Reference, CDF supports encoding of ASCII characters with the format
&#nnn. The ampersand character, therefore, could be encoded with its ASCII decimal value of 38 by using the string &#038.
To specify "Peaches & Cream", for instance, here's what your <TITLE> tag would look like:
<TITLE>Peaches&#038;Cream</TITLE>
- Q. Is it necessary to specify the <!DOCTYPE> tag in my CDF file?
A. No, Internet Explorer 4.0 does not use the <!DOCTYPE> tag.
- Q. Is http://www.w3c.org/channel.dtd a valid URL for a <!DOCTYPE> tag?
A. No, this URL is only an example, does not actually exist, and is best
not used in actual CDF files.
- Q. Is there a way to detect from an HTML page whether the user is
already subscribed to it?
A. Currently there is no way to do this, although the possibility of
exposing this information from the HTML object model is currently being
investigated.
- Q. Is there a difference between the subscription cache and the regular cache that Internet Explorer maintains?
A. All subscription information go into the same cache maintained by
Internet Explorer. The subscription content in the cache, however, is
especially marked so that it does not get deleted when a user clears the
cache.
- Q. If the user is browsing a subscribed channel while they are connected to the Internet, is content pulled from the cache, or does Internet Explorer query the server again?
A. Internet Explorer looks at the expires HTTP header returned by the
server when the page was retrieved and checks to see if the cached page
is still valid. If it is, then content is pulled from the cache;
otherwise, Internet Explorer queries the server again for the content.
Note that with the latter, when Internet Explorer re-queries the server
for content, in most cases, Internet Explorer will issue an HTTP GET
request with an If-Modified-Since header, which helps reduce the server
load.
- Q. Does the actual download of the HTML page occur upon subscription to the site, or only during a subscription update?
A. Actual download occurs during subscription update. However, users can
manually update a subscription any time they want.
- Q. From a CDF file, is there a way to specify items to be cached,
without having the items appear in the channel bar's item list? For
example, can I specify a WAV file to be downloaded as part of the
subscription update, so that it gets cached and is available when the
user browses offline?
A. Yes, here's the correct way to do this:
<ITEM HREF="http://example.microsoft.com/sound.wav">
<USAGE VALUE="NONE"></USAGE>
</ITEM>
Note that in XML, an element that does not have child elements can be
represented in a more compact format. For instance, the above <USAGE>
line could be written more compactly in this manner (note the final / at
the end of the tag):
<USAGE VALUE="NONE"/>
Also, when listing multiple items that are to be cached but not viewed
in the channel pane, instead of marking each one with a <USAGE
VALUE="NONE"/>, it is better to place them all in one sub-channel that
is marked with a usage tag, as illustrated in the example below:
<CHANNEL>
<USAGE VALUE="NONE"/>
<ITEM HREF="http://example.microsoft.com/sound1.wav"/>
<ITEM HREF="http://example.microsoft.com/sound2.wav"/>
<ITEM HREF="http://example.microsoft.com/sound3.wav"/>
</CHANNEL>
- Q. Is there a way to specify the order of items to be cached from a CDF file? We want to ensure that high priority items are downloaded first
during a subscription update.
A. No, there are no plans to support for this for Internet Explorer 4.0.
- Q. Is it possible to specify multiple schedules for updates in one CDF file?
A. No, only one schedule can be specified per CDF in Internet Explorer
4.0. Also, a desktop component cannot be bundled with a channel in one
CDF. They have to be two separate CDFs to work correctly.
- Q. Is it possible to specify a global time for the <SCHEDULE> tag, so that my channel updates occur between certain times, regardless of the time zone?
A. Currently there is no way to specify local or global time in a CDF
file. Information specified in the <EARLIESTTIME> and <LATESTTIME> tags are both considered local and ignore any timezone information specified in the <STARTDATE> and <ENDDATE> tags.
- Q. How do I keep Internet Explorer 4.0 from opening a new window when a user clicks on a link from a desktop component?
A. The way to do this is to specify a TARGET="_top" with the <A HREF>
tag.
- Q. I haven't been able to get my desktop component to work unless I put it on a separate CDF from the rest of my channel. Is this how it's
designed to work?
A. Yes, desktop components have to be in a separate CDF file from the
rest of the channel.
- Q. I notice that a TDC contained in a Desktop component does not
render data correctly. What am I doing wrong?
A. This is a known problem with no workaround available at the moment.
We will post more information here as it becomes available.
- Q. I notice that the text I specified in my <ABSTRACT> tag gets
truncated when displayed as a tooltip from the Channel Bar. Is there a
limit to the number of characters I can specify in my channel's
<ABSTRACT> tag?
A. This is a bug in the current implementation of the Channel bar and
should be fixed in a future build.
Dynamic HTML
- Q. Is there a way to implement a custom tooltip over anchors in Internet Explorer 4.0 (the same way you can use the ALT attribute in an <IMG> tag)?
A. By default, Internet Explorer 4.0 renders the URL of the HREF as a
tooltip, which may not always be the desired behavior. Yes, the way to
do this is to specify the tooltip in the TITLE attribute of the <A tag> as in this example:
<a href="file.htm" TITLE="Tooltip goes here">some text</a>
- Q. How can I change the HTML or text associated with an element? I used to be able to do this using the rangeFromElement method, but now I keep getting the error "Object does not support this property or method."
Have things changed?
A. Yes, the rangeFromElement method has been removed. Use
innterHTML/outerHTML and innerText/outerText to manipulate text or HTML.
- Q. Why do I get an "Object does not support this property or method"
error when using the multimedia controls in my page?
A. Considerable changes have been made to the multimedia controls in
Internet Explorer 4.0 Preview 2. For information on the multimedia
controls, please refer to the Internet Client SDK documentation under
the "Internet Multimedia" section. More documentation which highlights
all the differences will be made available shortly.
- Q. How do I determine the client width and height?
A. There are new properties on the body object, clientWidth and
clientHeight, which can be used for this purpose.
- Q. How do I change the current cursor being used as mouse pointer?
A. Yes, there is a cursor CSS attribute that can be used. Refer to the
Internet Client SDK documentation under Dynamic HTML\HTML and CSS
Reference section for more information.
- Q. Why do I get the error "Wrong number of arguments" in my event
handlers?
A. Events do not have parameters. All information can be retrieved using
the window.event object.
- Q. I'm finding that IFRAMES within a relatively positioned <DIV> tag causes Internet Explorer 4.0 to crash every time. This makes it difficult to relatively position IFRAMES. Is this a known problem, and is there a workaround?
A. Yes, this is a known problem. The workaround is to put the
positioning on the <IFRAME> directly.
- Q. Is there a list of known issues related to CSS positioning and
repainting?
A. Here's a list of what should be working by Internet Explorer 4.0
Preview 2:
- Display Property
- Visibility Property
- Hit testing correctly
- Nested DIVs
- Accurate Positioning
- Overflow property
Here is a list of what may not work properly by Internet Explorer 4.0
Preview 2:
- Clip property
- Positioned items with unspecified width/height; (that is, all positioned items must have a width and height -- this can be in percentage)
- Width=auto
- Negative z-index
- Selection
WebBrowser Control
- Q. In the WebBrowser documentation for Visual Basic developers, the
Navigate and Navigate2 methods look identical. Is there a difference?
A. The only difference is that the URL parameter is packaged as a
VARIANT in Navigate2 instead of a BSTR. (You could verify this in the
WebBrowser documentation for C/C++ developers.) Unlike a C++
application, a Visual Basic application is not able to use the
WebBrowser control to navigate into special folders in the shell
namespace like "My Computer." Currently, the shell does not expose an
object that provides a PIDL, which a VB application can then use in a
Navigate2 call.
For additional information about WebBrowser navigation using a PIDL from a C++ application, please see the following article in the Microsoft Knowledge Base:
Q167834 HOWTO: Web Browser Navigation Using a PIDL
- Q. I have an application that uses the WebBrowser control. Is it
possible to install just the WebBrowser control, without installing
Internet Explorer 4.0?
A. No, there is no way to do this for both Internet Explorer 3.x and
Internet Explorer 4.0. The minimal install will install the browser.
Also, note that Internet Explorer 3.x and 4.0 cannot coexist on the same
machine. Please see the following Web page for more information about redistributing Internet Explorer:
http://www.microsoft.com/ie/ieak/
Component Packaging
- Q. When downloading a digitally signed file, rather than popping up the Certificate dialog box as expected, a message box comes up indicating
that the file has been digitally signed but that it cannot be confirmed.
What's wrong?
A. Microsoft has recently confirmed a rare Certificate Verification bug
caused by the REG files offered as part of the tools set of the ActiveX
SDK. The bug is that the REG files, Wvtston.reg and Wvtstoff.reg, sets
the system to check Verisign's revocation server extraneously. This
error occurs only when your system is set to check the Revocation
server, and the Revocation server itself is down (a very rare
occurrence).
The recommended solution is to use SetReg.exe available in the Internet
Client SDK's \Inetsdk\Bin folder, rather than the REG files in the
ActiveX SDK. SetReg.exe should be used to disable Revocation checking on
your machine.
By issuing the following command, the off-line revocation server for
individual certificates is disabled:
setreg 4 true
By issuing the following command, the off-line revocation server for
commercial certificates is disabled:
setreg 5 true
- Q. What version of the MFC DLLs will ship with Internet Explorer 4.0?
I'd like to know so I don't have to worry about packaging the MFC DLLs
with my ActiveX Control.
A. Any component should be careful not to rely on the presence of any
MFC DLLs with the currently installed browser, as Internet Explorer 4.0
and future versions of Internet Explorer may ship alternative versions,
or may not even ship any MFC DLLs at all.
A component that uses the MFC DLLs as dependencies should package the
MFC DLLs accordingly.
For additional information about how to correctly package MFC
DLLs correctly with your MFC component, please see the following
article(s) in the Microsoft Knowledge Base:
Q167158 HOWTO: Packaging MFC Controls for Use Over the Internet
- Q. Is there a way to see a debug trace of code download activity in
Internet Explorer 4.0?
A. In Internet Explorer 3.x, this was made possible by installing the
debug versions of Urlmon.dll and Wininet.dll, as outlined in the following article in the Microsoft Knowledge Base:
Q169437 HOWTO: Debugging Code Download Activity in Internet Explorer 3.x
In Internet Explorer 4.0 Preview 2, there is a tool available in the
Internet Client SDK that allows you to do this more easily. Check out
\Inetsdk\Bin\Cdllogvw.exe. There is also a Cdllogvw.txt available in the
same directory for more details.
- Q. I've written an ActiveX control that I've marked as Safe for
Scripting and I'm having trouble getting it to work when running off a
page on a local hard drive. What am I doing wrong?
A. The problem may be due to any of the following:
- A missing dependent DLL.
- Necessary security level set on the wrong zone.
- A control that is not marked as "safe for scripting and
initialization" will not be loaded if the page that references the
control is being accessed from the local hard drive. Note that this
behavior may or may not change in future builds of Internet Explorer.
For more information on marking ActiveX controls as "safe for scripting
and initialization", please refer to the Internet Client SDK docs on
"Safe Initialization and Scripting for ActiveX Controls" under the
Component Development/ActiveX Controls section.
Control Development
- Q. How can I improve performance in my ActiveX Control?
A. For better performance make your control an apartment model control.
Internet Explorer 4.0 uses multiple threads and may host the control in
a secondary thread. If the control is not created as apartment model
aware and marked as such, it is created and executed in the context of
the calling application's primary thread, requiring calls on the
control's methods to be marshaled between threads. This can cause a
performance hit and can be very prominent if there are many non-
apartment model controls in an HTML page. To make a control apartment
model, the control needs to be marked as such in the registry and has to
be written so that it is apartment model safe.
More information on apartment model and other threading models can be
found in the following article in
the Microsoft Knowledge Base:
Q150777 INFO: Descriptions and Workings of OLE Threading Models
- Q. What is the secret to debugging a control embedded in an HTML page in
Internet Explorer 4.0? Whenever I try to start a debug session with
Internet Explorer 4.0 in the Visual C++ debugger, I get kicked out of
the debugger.
A. With Internet Explorer 4.0's shell integration, this is not as
straightforward as debugging controls in Internet Explorer 3.x. The
details on how to do this correctly are outlined in the following article in
the Microsoft Knowledge Base:
Q167715 HOWTO: Debugging ActiveX Controls in IE 4.0 Browser
Scripting
- Q. How do I determine from a script if the Internet Explorer 4.0 browser
is running off-line or not?
A. Currently, there is no way to determine this from a script.
Although the IWebBrowser2 interface provides a get/put_Offline method
that indicates whether or not the WebBrowser is reading from the cache,
there is no way to get this information from the WebBrowser object model
up to the script level. If desired, you could write an ActiveX control
that gets this information from the WebBrowser object model and expose
it as a property or method, which can then be accessed from a script.
We are currently investigating the possibility of exposing this in the
Dynamic HTML Object Model, so as to be accessible from JAVA applets as
well.
- Q. Why do I get a Permission Denied error whenever I try to access a
frame's document from a script written in another frame's document? The
same code runs fine in Internet Explorer 3.x.
A. This is due to a cross-frame security feature that's implemented in
Internet Explorer 4.0, but not in Internet Explorer 3.x. A frame running
on one server is not able to access another frame's document running on
another server. Similarly, with the introduction of zones in Internet
Explorer 4.0 Preview 2, a script cannot access pages across zones.
For additional information about this new cross-frame security in Internet
Explorer 4.0, please see the following
article(s) in the Microsoft Knowledge Base:
Q167796 PRB: "Permission Denied" When Scripting Across Frames
- Q. Why do I get a Permission Denied error whenever I try to access a
frame on a different first tier domain, but on the same second tier
domain?
A. This is another side effect of Internet Explorer 4.0's cross-frame
security feature described above. A frame running on
example1.microsoft.com cannot access a frame on example2.microsoft.com.
The correct way to do this is to set the domain property on both pages
to the common substring domain. In this case, setting the domain to
microsoft.com, as illustrated below:
<SCRIPT>
document.domain = "microsoft.com"
</SCRIPT>
- Q. From a client-side script, how do I check for the browser version so
my application can degrade gracefully if the browser does not support
the new Internet Explorer 4.0 features?
A. You can use the JScript function below to determine the version of
the browser it is running on from a client-side script. The function
returns the major version number for any Microsoft Internet Explorer
browser, and zero (0) for others. Use of this function assures that the
script is compatible with future versions of the Internet Explorer.
// This function returns Internet Explorer's major version number,
// or 0 for others. It works by finding the "MSIE " string and
// extracting the version number following the space, up to the
// decimal point, ignoring the minor version number
<SCRIPT LANGUAGE="JavaSCRIPT">
function msieversion()
{
var ua = window.navigator.userAgent
var msie = ua.indexOf ( "MSIE " )
if ( msie > 0 ) // If IE, return version number
return parseInt (ua.substring (msie+5, ua.indexOf (".", msie )))
else // If another browser, return 0
return 0
}
</SCRIPT>
For additional information, please see the following
article(s) in the Microsoft Knowledge Base:
Q167820 HOWTO: Determining Browser Version from a Script
- Q. Is there a way to detect the browser's support for the new Internet
Explorer 4.0 features from a server-side script?
A. The Browser Capability component that comes with Active Server Pages
(ASP) provides your scripts with a description of the capabilities of
the clients Web browser by comparing the User-Agent HTTP Header with the
entries in the Browscap.ini file. In order for an ASP application to
detect the browser's support for the new Internet Explorer 4.0 features,
copy the latest Browscap.ini from
http://www.cyscape.com/browscap/
to your \windows\system32\inetsrv\asp\cmpnts directory and execute a server-side script similar to the example described in following article in the
Microsoft Knowledge Base:
Q167820 HOWTO: Determining Browser Version from a Script
HTML
- Q. Why are my HTML pages with frames not showing up in Internet Explorer
4.0? They used to work fine in Internet Explorer 3.x.
A. Unlike Internet Explorer 3.0, Internet Explorer 4.0 does not support
<FRAMESET> tags embedded within <BODY> tags. This was done in Internet
Explorer 4.0 to ensure compatibility with Netscape. To work around the
problem, move the <FRAMESET> outside the <BODY> tags.
In some cases, a <NOFRAMES> element is specified within the <FRAMESET>
tags, as in the example below:
<BODY>
<FRAMESET>
<NOFRAMES>Sorry, your browser does not support frames! </NOFRAMES>
</FRAMESET>
</BODY>
Although Internet Explorer 4.0 supports frames, when the above HTML code
is displayed in Internet Explorer 4.0, the content specified within the
<NOFRAMES> tag is displayed. Moving the <FRAMESET> outside the <BODY>
tags causes the page to display correctly.
- Q. Why doesn't Internet Explorer 4.0 close the <PLAINTEXT> container
like Internet Explorer 3.x did?
A. The <PLAINTEXT> tag is designed to render all of a Web page's
subsequent text without parsing any tags, including its own </PLAINTEXT>
tag. Internet Explorer 4.0 supports this tag as it is defined by the
HTML DTD. This element is not recommended as different browsers may not
support it consistently. Instead, use the <PRE> tag and display all
reserved characters (such as brackets) with their corresponding HTML
character entities.
Miscellaneous
- Q. I notice that my remote calls are failing on Internet Explorer 4.0,
although when I install the DCOM95 Web release, everything suddenly
works correctly. What's wrong?
A. Pre-Beta1 Internet Explorer 4.0 setup failed to properly create the
"DCOM Protocols" value under the registry key
HKLM\Software\Microsoft\RPC. Although Internet Explorer 4.0 setup writes
a value in the registry, it is an sz value rather than the required
multisz. If Internet Explorer 4.0 were installed on a system that
previously had DCOM95 installed, you would not see the problem.
This problem is fixed in the Beta1 release of Internet Explorer 4.0.
- Q. Is it possible to have Internet Explorer 3.x and Internet Explorer
4.0 coexist on the same machine?
A. No, there are no plans to support the coexistence of these two
Internet Explorer versions at this time. Internet Explorer 3.x and
Internet Explorer 4.0 share system components that cannot exist in
multiple copies on the same machine.
- Q. What is the difference between ADO and ADOR, and which should I be
using on my Web pages?
A. The Active Data Object (ADO) components ship in two forms - one for a
Web server, and another for the client. The ADO component installed with
Internet Explorer 4.0 is the ADO Recordset (ADOR). ADOR provides an
object model for script access to data supplied by a data source object
(DSO) embedded in a Web page. It does not, however, provide ADO
Connection or Command objects. These are provided only as part of the
server installation.
Included with the Internet Client SDK in self-extracting archives is the
full set of ADO components. When building applications using ADO for
Internet Explorer 4.0, your client side scripts should depend only on
the availability of the Recordset object. The full ADO interfaces are
intended for use with Active Server Pages and custom business objects
that run on a Web server. Refer to Mdac.txt in the Inetsdk\Bin folder
for more details.