Q
|
I'm trying to follow the example in the documentation for using the EstDownloadTimeDesc method, but I am getting errors. What can be wrong?
|
A
|
Unfortunately the code example found in the BrowserHawk 6 and earlier documentation has a few issues which prevent this sample from working as expected.
The first issue is a typo in the line that reads:
bhObh.EstDownloadTimeDesc "c:\inetpub\wwwroot\downloads\myfile.zip"
Note that it lists the object name as "bhObh" when it should state "bhObj", as follows:
bhObj.EstDownloadTimeDesc "c:\inetpub\wwwroot\downloads\myfile.zip"
Without ths correction you will get an error such as "Object required".
The next issue is that, under some versions of IIS, you must include parentheses around the file name, such as:
bhObj.EstDownloadTimeDesc("c:\inetpub\wwwroot\downloads\myfile.zip")
If you do not include parentheses and they are required, you will receive an error which states: "Expected end of statement".
|