Flicks FAQ: Faq

Back to the top of the FAQ

OCX/ASP Component Problem solver

NOTE:To search this FAQ by keyword, press CONTROL and F simultaneously. The Windows FIND box will appear. Type in the keyword, and click FIND NEXT until you find the topic that addresses your question.

Q. When I try and add or remove users, I get error code 50 instead!

A. The software has expired! Also see here.
Or are you using Windows 2000?

Q. Can I call the OCX module from within a Visual C++ project?

A. Sure, use the Class Wizard, Automation Tab, Add Class, From a Type library, and select the ocx file directly. The class wizard will generate the necessary integration files automatically.

Q. ocxQmail and permissions for the spool directory (Create Dir Error: C:\Flicks\ocxQmail\spool)

A. If you are getting these errors, then make sure the permissions are set up as follows:

Administrator (Full Control)
Everyone (Read only)

Everyone full control

Everyone full control

Everyone full control

Q. When I try and use ASP examples similar to yours I get 501 errors!

A. Make sure you have ASP installed - you will need at least IIS3 for this.

Q. How do I send emails with html content?

A. Use the XHeader method, for OCXMail, or ocxQmail.

Q. Sometimes Emails send from the queue, sometimes they do not

A. http://cr.yp.to/docs/smtplf.html I believe ocxqmail was sticking a lf (line feed) on the end of very long lines of html. We noticed it in the cybercon message. Replace any line breaks (br) or paragraphs (p) with the same character along with a vbcrlf this has cleaned up the problem.

Q. When I added code similar to your example I get an error saying "object not found".

A. Make sure you use regsvr32 on the component first, and whenever you move it.

Q. I get, "The call to Server.CreateObject failed. The requested object instance cannot be created. " with an error code of 0177:80040154.

Be sure files and directories that the object needs have full permissions, including spool directories if appropriate and the installation directory. Note that sometimes permissions do not change to what you have made them until a reboot! Make sure that the OCX component has read and execute permissions for IUSR_machineName and IWAM_machineName.

Also check you are trying to create the correct object. For instance, if you are using AuthentiX ISP, (as opposed to AuthentiX Standard) make sure you are using
Set auth = Server.CreateObject("

The error 80040154 can also mean REGDB_E_CLASSNOTREG, or "class not registered.".

Q. When I added code similar to your example I still get an error saying "object not found". This is what I get:

 server object error 'ASP0177:800401f3
 the call to Server.CreateObject failed.
 the requested object instance cannot be created

A. First check you have the correct version of mfc42.dll
Perhaps you registered the component with regsvr32 in one subdirectory and moved it to another. Reregister it.
Perhaps IIS or the login context of the application running the component does not have proper security permissions to access the component or the directory you installed it to.
Maybe your server is running low on memory.
Maybe you need to restart the IIS server or machine after registering the component.

Tip from the top: One user solved the problem which he had on his 2nd NT-Server, by setting read/write access for the user "IUSR_xx" in the directory containing the OCX component.

Q. When I am trying to update information in the database (UserModify) etc, the data seems updated as far as the OCX is concerned, but the other components (the filter, Windows GUI) don't see the change!

A. Check the Application Event Log. Is there a message with Source "Flicks", and Message contents:

The description for Event ID ( 0 ) in Source 
( Flicks ) could not be found. It contains 
the following insertion string(s): 
Invalid Filename: Code 5, Access denied.  The 
File cannot be accessed
If so, you need to modify the directory containing both the ocx component and the authx.adb database file so that the user "IUSR_MachineName" has full access.

Q. When I use the sendmail method, I get an error message:
Mail was not sent, error message is:Bad recipient name: jnolan@imagin.com

A. Try surrounding the recipient name with angle brackets: <jnolan@imagin.com>

It is possible (if the from name is not in the domain of the smtp server) that spam-relaying has been disallowed. Ask your ISP if this is the case, or adjust the from-name.

Q. The mail software puts linebreaks/CRLF's into my text without me wanting it to!

A. Make sure you break you message up with CRLF's at least every 800 characters. Otherwise the mail software is forced to break it into 1k chunks so as to conform with the requirements of the SMTP protocol.

Q. I am getting "Connect Error: WSAECONNREFUSED".

A. This means the SMTP server refused the connection from the client. Check passwords, and the configuration of the SMTP server.

WSAECONNECTIONREFUSED means no connection could be made because the target computer actively refused it. This usually results from trying to connect to a service that is inactive on the foreign host­that is, one with no server application running.

If you used a hostname, did it resolve to the correct address? If the hostname resolution uses a local hosttable, it's possible you resolved to an old obsolete address.

Also the server may have spam-relay prevention turned on. Check its setting for this.

Q. When I use the sendmail method, I get 'cannot open socket'.
Q. When I use the sendmail method, I get "Could not open socket 25"
Q. I am getting "WSAEHOSTUNREACH".
Q. I am getting "Connection timed out (1): XError1".

A. There is a problem connecting to your mailserver. Make sure it is not inside a firewall, the address is correct or check for some other problem. You need to be able to contact the mailserver from the machine you are running the software on.

I've tried ocxQmail in my MS Windows 2K Advance Server (IIS 5.0) using ASP and no problem while sending queued emails to my company own domain (i.e. scs.com.sg). However, whenever I tried to send to other domain, like yahoo.com, I'll always get this error "Could not connect to mailserver: mx4.mail.yahoo.com (Connect Error: WSAETIMEDOUT)" - system tried to connect to mailserver mx1.mail.yahoo.com, max2.mail.yahoo.com & mx4.mail.yahoo.com. Is there any settings which I missed out in my server?

There is something strange with the DNS server.

ocxQmail likely won't work behind a proxy, without special settings. It expects to be connected to the internet with a specified IP address, and named DNS servers. See Dial-Up Networking/Properties/Internet Protocol/General, and/or see your Network Administrator.

ocxQmail gets its DNS server list from HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\NameServer

If this is empty, it then looks in System/CurrentControlSet/Services/xxx/Parameters/Tcpip/IPAddress in HKEY_LOCAL_MACHINE

// where xxx might be something like Elnkii, depending on the card
// perhaps these IP addresses are stored in a different area,
// or Win2K has placed permissions on them which make them inaccessible to AXISP

If its still empty, then it gets them from:
HKEY_LOCAL_MACHINE /Software /Flicks Software /ocxQmail /1.0 /ocxQmailConfig


	/Flicks Software
create a value called defaultDNS, of type REG_SZ, and set it to be your DNS IP addresses, separated by spaces.
"defaultDNS", ""

NOTE: All the registry areas above should have permissions set so that the software can read them. Otherwise you can get all sorts of errors such as "Trial Version Expired" or "Cannot connect to domain" even though the domain is accessible!

Q. When I send mail , I get an XError3 message!

A. XError3 means the server rejected the "From Name". It is possible (if the from name is not in the domain of the smtp server) that spam-relaying has been disallowed. Ask your ISP if this is the case, or adjust the from-name.

Q. ocxQmail fails with a DNS timeout (WSAETIMEDOUT)if not given access to the following IP address on port 53:,,,

The dispatcher service appears to cycle through the above IPs regardless of the DNS settings on my machine. When I specifically denied access to port 53 on the above IP addresses ocxQmail would not resolve my mailserver domain name. When I granted access to the above IPs ocxQmail worked perfectly. The same thing happens when using the IP address in place of the domain name. If all of the above DNS servers become unavailable or the DNS owners change their IP address ocxQmail customers may find that their mail mysteriously stops working. Also if alot of people are using ocxQmail for bulk emails your customers may be unintentionally creating excessive DNS queries against these servers. Also for international customers like myself it takes around 20 hops for me to get to those DNS servers. I also went through your list server and found a number of people with a similar problem.


Normally, the software looks in HKEY_LOCAL_MACHINE\SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters"

then at NameServer.

This usually works, however if it doesn't, then it defaults to the hard coded values:

as you pointed out. However, I believe it should also look in

HKEY_LOCAL_MACHINE\System\\CurrentControlSet\\Services\\Tcpip\\Parameters\\I nterfaces\\

Then it should look at each key in there, and in each key look for a registry value NameServer as well. Then compile the list of DNS servers from that.

A.#2 My ocxQmail is now working. I turned on Windows 2000 auditing so that I could see which registry keys ocxQmail was accessing.

It looks in:


however it does not access (which is where my DNS information is):

HKEY_LOCAL_MACHINE\System\\CurrentControlSet\\Services\\Tcpip\\Parameters\\I nterfaces\\

I added my DNS server IP to the NameServer key in the first registry branch above and ocxQmail started resolving off my internal DNS server(woohoo!). I also verified this with my packet sniffer - no more external DNS queries were detected and I could see ocxQmail talking to my internal DNS server.

Q. I'm using your mail program. I'm trying to do an attachment but I'm getting an error. It says "failed to map file 1". Any suggestions?

A. Sounds like you are trying to email an attachment. The software is unable to open the file. Make sure it is not open for writing by another process, and that the process trying to send the message has read permissions for the file. For example, make sure IUSR_MachineName has read access to the file.

Q. Sending attachments from the machine the browser is on.

A. You cannot send an attachment from a client machine. You can only send attachment files that are located on the server. To be able to send client attachments using ASP from a client browser would be a gross breach of security.

Q. I send mail and the result is OK, however the email doesn't arrive!

A. Check the mailserver value is correct, and that the email address is correct. Also if the from address is not in the domain of the mailserver, and the mailserver has spam-relaying protection, it may not go through.

Q. I cannot update the OCX, I cannot delete the old one. I stopped IIS?

A. The OCX could be being held open by another application. Rename the file, and reboot. That should do it.

Q. I purchased the registered version of OCXMail but the tag line is still there

A. Are you sure you installed the correct zipfile? If you have just purchased the software and are installing over the trial version, are you sure you are installing the software sent to you? If you are sure you are installing the correct version, then perhaps the old files are still 'hanging' around. There are several reasons this could happen, for example you may have forgotten to stop IIS before the installation procedure, or the OCX was loaded by another program that was still running. Make sure you stop IIS from the control panel, and uninstall the software from the control panel - add/remove programs. If that fails, then rename the file (ocxmail.ocx?), and reboot. Then reinstall.

Q. With OCXHttp, how do I set it up to use a proxy server?

A. Run Internet Explorer, and setup the proxy settings from there. This changes the wininet settings that OCXHttp uses.

Q. With OCXHttp, I cannot set cookies!

A. When using cookies, the IUSR_machinename must have read/write permissions into the \WINNT\Cookies directory. Or else it cannot do the cookies correctly.

Q. ocxQmail: Detect Function failed with error code: 2

A. Look in the event log, there should be additional information there. Likely there is a code 5 - Access Denied. Check permissions on the appropriate accounts, processes and files.

Q. I am using OCXHttp, and it is getting stuck in an ASP loop. In another script I get
"A trappable error occurred in an external object. The script cannot continue running."

A. One user reports excellent results with Auction Submits solution to this problem

Due to a problem with wininet.dll that comes with Internet Explorer 4.01, SSL will not work. IE4.01 and above disable SSL! Use a version prior to IE4.01 on your server machine, or contact Microsoft for details on when a fix will be available.
See the Microsoft article: System Services Accessing SSL sites, for a workaround.

One recent version of WinInet that is known to work is as follows:
IE version 4.72.3110.8
wininet.dll is version 4.72.3110.0.

Some customers report that IE5 works fine. Others say no. See Microsoft Case# SRX000114602385.

1/18/00: OCXHttp uses wininet.dll. There are new articles from Microsoft that indicate problems using SSL in more recent versions of wininet.dll.

See Microsoft articles:
Using WinInet APIs in a System Service to access SSL sites
WinInet Not Supported for Use in Services
PRB: Loading Remote XML or Sending XML HTTP Requests from Server Is Not Supported
for more details and possible workarounds.

Q. I'm getting VBScript runtime error '800a01ad': ActiveX component can't create object.

A. In order to first make sure that permissions are not an issue in the correct operation of the software, make sure IUSR_machineName and IWAM_machineName has full access (read, write and execute - All) to the flicks installation directory and the system32 directory. You may wish to experiment later with reducing the amount of access granted to these directories, in accordance with any security policy. Likely you will need at least write access to the Flicks installation directory, so that the ASP based remote Administration can update its configuration files held there. Also you will definitely need at least read permission on system32!

If this doesn't work, then make sure Everyone has Full Access to the following, in order:

  • The Flicks Software installation directory
  • The Flicks Software registry area (use regedt32.exe):
    	/Flicks Software
  • The system32 directory
Make sure that permissions are replicated to subkeys and subdirectories.

In the last resort try User Manager Policies/Audit, and enable access tracing on the above areas Run the script again, and check the event log to help track down the problem.

Also see Microsoft's KB article on this subject.

If you are using MTS, this may help:

  • Make sure you have MDAC 2.x installed.
  • Register \program files\common files\System\MSADO15.dll with RegSvr32.
  • Make sure IUSR_<Server> AND IWAM_<Server> accounts both have Read/Execute NTFS rights on the following folders cascaded down.
        - \program files\common files\System
        - \Winnt
        - \InetPub\WWWRoot
  • Open Console and make sure that there's a valid IP Address in "Default Web
    "'s Properties.  If the permissions were messed up before and you opened
    Console, it's likely that the IP would change to "All Unassigned".
  • Reboot server.  Don't assume that stopping/starting the service will work

Date: Wed, 22 Mar 2000 21:29:25 -0700
From: Andrew Strilaeff <teachme@idontknow.com>
Reply-To: andrew@simmco.com
Organization: Simmco, Inc.
X-Mailer: Mozilla 4.6 [en] (Win98; I)
X-Accept-Language: en
MIME-Version: 1.0
To: Kevin <SUPPORT@flicks.com>
Subject: Re: MultiPart Email on OCXQmail
References: <4.1.20000322160537.026db870@>
Content-Type: multipart/alternative;

SUCCESS! The following code sends a multipart/alternative email message. 
The ID# in the boundary is just a made-up long string. Note the 2 extra -'s 
at the end, and the 2 preceeding -'s before each part. This follows RFC1521 
so the linefeeds between the parts are important. 

<% LANGUAGE=VBScript %> 
SET mailer = Server.CreateObject("ocxQmail.ocxQmailCtrl.1") 
mailServer = "" 
fromName = "Andrew" 
fromAddress = "andrew@simmco.com" 
recipient = "Pyrabyte@aol.com" 
cTypeString = "multipart/alternative; boundary=""FC320AB7687B0BF0662FFCE9""" 
result = Mailer.XHeader("Content-Type", cTypeString) 
result = Mailer.XHeader("MIME-Version", "1.0") 
toAddressList = recipient 
whenToSend = now 
messageSubject = "Test, Again" 
messageText = "" & vbCrLf & _ 
     "--FC320AB7687B0BF0662FFCE9" & vbCrLf & _ 
     "Content-Type: text/plain; charset=us-ascii" & vbCrLf & _ 
     "Content-Transfer-Encoding: 7bit" & vbCrLf & _ 
     "" & vbCrLf & _ 
     "This IS a test" & vbCrLf & _ 
     "" & vbCrLf & _ 
     "--FC320AB7687B0BF0662FFCE9" & vbCrLf & _ 
     "Content-Type: text/html; charset=us-ascii" & vbCrLf & _ 
     "Content-Transfer-Encoding: 7bit" & vbCrLf & _ 
     "" & vbCrLf & _ 
     "<HTML>This <B><FONT SIZE=+3><FONT COLOR=#999900>IS</FONT><FONT COLOR=#FF6666> a " & vbCrLf & _ 
     "<A HREF=http://www.teachmeonline.com/>test</A></FONT></FONT></B></HTML>" & vbCrLf & _ 
     "" & vbCrLf & _ 

result = mailer.Q(mailServer, fromName, fromAddress, priority, returnReceipt,  _
toAddressList, ccAddressList, bccAddressList, attachmentList, messageSubject, messageText) 

Response.Write ("Message sent!") 


PS, Capitalized HTML tags was the secret for making HTML work on AOL! 
(still can't send images though) 

By Flicks Software http://www.flicks.com/authentix/discover/main.htm

Back to the top of the FAQ