Discussion:
Windows 2003 Server, MDAC 2.8 and RDS
(too old to reply)
rkaine
2004-12-08 22:15:04 UTC
Permalink
I have an application that is a hodge podge of different connection types. I
have installed it on a Windows 2003 Server, running MDAC 2.8.

I have merged handler.reg and handsafe.reg.

I have performed the following steps:

"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DataFactory\HandlerInfo\
HandlerRequired = 0 and DefaultHandler is "" (Null string).

"HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W3SVC\Parameters\ADCLaunch" has a key called RDSServer.Datafactory.

Virtual Web MSADC exists pointing to 'C:\Program Files\Common
Files\System\msadc'

Virtual Web 'MSADC' Properties
Execute Permissions: Scripts and Executables
Directory Security/IP Address and Domain Name Restrictions: "Access is
Granted" to all IP Addresses
At the moment because I am frustrated...
Permissions: Everyone (Full Control)

This is the object as defined in my .ASP page.

<OBJECT CLASSID="clsid:BD96C556-65A3-11D0-983A-00C04FC29E33" ID="rdsCarrier">
<param name="SERVER"
value="http://<%=Request.ServerVariables("SERVER_NAME")%>">
<param name="CONNECT" value="<%=Application("RDS_Connection_String")%>">
<param name="FETCHOPTIONS" value=1>
<param name="EXECUTE" value=1>
</object>

I have tried all possible variations on FETCHOPTIONS (1,2,3) and EXECUTE(1,2)

I then execute a SQL query...

rdsCarrier.SQL = "SELECT BLAH, BLAH FROM tblBLAH WHERE BLAH = BLAH"
rdsCarrier. Refresh

To this point everything seems ok.

When I try to do the following:

rdsCarrier.FilterColumn = strColumn;

I get an error telling me 'Operation can not be performed while async
operation is pending'.

If I put an alert ahead of this command to check rdsCarrier.ReadyState it
returns a '2' or 'adcReadyStateLoaded' which means: 'The current query is
still executing and no rows have been fetched. The DataControl object's
Recordset is not available for use.'

I have verified server and connect by hardcoding the data as well as adding
Handler = MDSFMAP.Handler and numerous other configurations.

I am at a loss. What am I doing wrong?????
Jim Rodgers
2004-12-09 05:32:42 UTC
Permalink
Here is my standard list of tips.
If anyone would like to update or correct this list, it will be appreciated.

==============================

Here's my current checklist of things that must be done right... Plus
(included in this same list), things that don't matter but I think they
do... (I refer to the latter items as my voodoo roosters feet.

(THANKS to Brian Muth for telling me about item #4 for Win 2003 Server -
which had been eating my lunch for weeks!)

1. In my VB6 program, I use ADO 2.8 (i.e., reference MDAC 2.8), but I
believe most other versions would work almost as well.

I open an ADODB.Connection thus...

cnMyAdodbConnection.ConnectionString = _
"Provider=MS Remote;" + _
"Data Source=" + strDataSource + ";" + _
"Remote Server=" + strDataServer
cnMyAdodbConnection.Open

...where strDataSource is the name of the ODBC System DSN which points
to the data source, an Access 2000 mdb file, and strDataServer which says
something like http://10.0.0.1 which is where the System DSN is defined.

For the simple RDS application, DO _NOT_ define a remote handler or
remote provider in the connection string! If you specify the MSJet 4.0
OLEDB provider as the remote provider, then the data source is the file path
ON THAT SERVER. If you specify Jet as the remote provider, I think you will
not be able to call parameterized queries (or any queries?) SAVED in the mdb
file using the same familiar syntax used in local connections. (Actually, I
never got that to work.)


2. Go to the Start/Run window and enter msdfmap.ini. Make sure you have
fixed-up the following items (*) exactly as shown here:

[connect default]
; If we want to disable unknown connect values,
; then we set Access to NoAccess
;
* ; Access=NoAccess
* Access=ReadWrite

[sql default]
; If we want to disable unknown sql values,
; then we set Sql to an invalid query.
* ; Sql=" "


3. Make sure the correct ADC and DataFactory registry entries are present.
You need these even if you use "MS Remote" rather than explicitly invoking
RDS objects in your VB6 code.
First, there're the ADCLaunch entries...
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services...
\W3SVC\Parameters\ADCLaunch]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services...
\W3SVC\Parameters\ADCLaunch\AdvancedDataFactory]

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services...
\W3SVC\Parameters\ADCLaunch\RDSServer.DataFactory]
Then there're the RDS Data Factory entries...
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DataFactory]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DataFactory...
\HandlerInfo]
"HandlerRequired"=dword:00000000
"DefaultHandler"=""
"DisableAutoSafe"=dword:00000001

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DataFactory...
\HandlerInfo\SafeHandlerList]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DataFactory...
\HandlerInfo\SafeHandlerList\MSDFMAP.Handler]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DataFactory...
\HandlerInfo\SafeHandlerList\MSDFMAP_VB.Handler]

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DataFactory...
\HandlerInfo\SafeHandlerList\MSDFMAP_VC.Handler]


4. Make sure you have a VIRTUAL root in Default Web Servers called /MSADC
that points to the "c:\program files\common files\system\msadc" directory
and have "Read" permitted in the web root setup on IIS. You do not need a
default document, or directory browsing, or write permitted, or execution or
scripts enabled. This is critical on Win2k Server. I don't know what
impact it has on "Win3k" IIS, but I have run out of time to test every
little thing.

And, as Brian Muth pointed-out, in Win 2003 you need an "IIS Web Service"
enabled that turns-on the "c:\program
files\commonfiles\system\msadc\msadcs.dll" file. I suspect this may be
missing from systems that do not have a Visual InterDev (Visual Studio)
installed. Finally, the "c:\program files\commonfiles\system\msadc\"
directory and its contents need to have NTFS security to permit access by
the "IUSR_myservername" user account. This is regardless of Win2k, Win3k,
etc.

5. And here's the secret requirement for MDB files in RDS! You need NTFS
security to permit read/write/change/modify access by the IUSR_myservername
user account on the directory where the DSN will go to get to the mdb file.
Furthermore, this security must be made to propagate to all objects in this
directory so the LDB lock file will have proper security. Otherwise you will
get an error saying it is LOCKED exclusively by another user.

WARNING: You must assure that others who maintain this database don't write
over the mdb file with an "updated" copy that breaks these permissions. The
published procedure for maintaining this database must spell-out checking
these NTFS file permissions for the entire directory and it contents.

<!-- END OF LIST -->
rkaine
2004-12-09 13:17:02 UTC
Permalink
Can you explain this further. I know I haven't done anything specific with
regards to an 'IIS Web Service" and this may be my problem, because I've done
everything else.
Post by Jim Rodgers
And, as Brian Muth pointed-out, in Win 2003 you need an "IIS Web Service"
enabled that turns-on the "c:\program
files\commonfiles\system\msadc\msadcs.dll" file. I suspect this may be
missing from systems that do not have a Visual InterDev (Visual Studio)
installed.
rkaine
2004-12-09 20:45:44 UTC
Permalink
I have found the solution...

Add a Web service extension
1. In the left pane of the Internet Information Services (IIS) Manager
window, locate, and then right-click Web Service Extensions.
2. Click Add a new Web Service Extension. The New Web Service Extension
dialog box appears.
3. Type RDS in the Extension name box, and then click Add. The Add file
dialog box appears.
4. Type System Drive Letter:\Program Files\Common
Files\System\msadc\msadcs.dll in the Path to file box, check the 'allow'
checkbox and then click OK.

Note System Drive Letter is the placeholder for the letter that is
assigned to your system drive where the operating system is installed.
5. Click OK.

You may or may not have to restart IIS.

For the complete solution see KB #837981

http://support.microsoft.com/default.aspx?scid=kb;en-us;837981


This is all that was missing.
Post by rkaine
Can you explain this further. I know I haven't done anything specific with
regards to an 'IIS Web Service" and this may be my problem, because I've done
everything else.
Post by Jim Rodgers
And, as Brian Muth pointed-out, in Win 2003 you need an "IIS Web Service"
enabled that turns-on the "c:\program
files\commonfiles\system\msadc\msadcs.dll" file. I suspect this may be
missing from systems that do not have a Visual InterDev (Visual Studio)
installed.
Jim Rodgers
2004-12-10 17:34:14 UTC
Permalink
EXACTLY.

I will update my RDS checklist to include the link you mention.

Enjoy your RDS.
Post by rkaine
I have found the solution...
Add a Web service extension
1. In the left pane of the Internet Information Services (IIS) Manager
window, locate, and then right-click Web Service Extensions.
2. Click Add a new Web Service Extension. The New Web Service Extension
dialog box appears.
3. Type RDS in the Extension name box, and then click Add. The Add file
dialog box appears.
4. Type System Drive Letter:\Program Files\Common
Files\System\msadc\msadcs.dll in the Path to file box, check the 'allow'
checkbox and then click OK.
Note System Drive Letter is the placeholder for the letter that is
assigned to your system drive where the operating system is installed.
5. Click OK.
You may or may not have to restart IIS.
For the complete solution see KB #837981
http://support.microsoft.com/default.aspx?scid=kb;en-us;837981
This is all that was missing.
Post by rkaine
Can you explain this further. I know I haven't done anything specific with
regards to an 'IIS Web Service" and this may be my problem, because I've done
everything else.
Post by Jim Rodgers
And, as Brian Muth pointed-out, in Win 2003 you need an "IIS Web Service"
enabled that turns-on the "c:\program
files\commonfiles\system\msadc\msadcs.dll" file. I suspect this may be
missing from systems that do not have a Visual InterDev (Visual Studio)
installed.
Loading...