Link to home
Start Free TrialLog in
Avatar of Doug
DougFlag for United States of America

asked on

The 'DB2OLEDB' provider is not registered on the local machine.

I get this error when I am running an aspx page on our new server.  

Here is my connection information.
Provider=DB2OLEDB;Network Transport Library=TCPIP;Host CCSID=37;PC Code Page=28591;Package Collection=DATAWHSE;Initial Catalog=<E?A??>;Network Address=<(*&$&($*)@!>;Network Port=446;User ID=<userid>;Password=<pswd>;

Some information omitted because I don't know what's confidential or not...

When I use a udl file on the server, using the same information (actually this connection string was taken from a udl file opened in notepad)  it works fine.  

Please help!  I'm desperate!

Avatar of Doug
Doug
Flag of United States of America image

ASKER

FYI--HIS 2000 SP1 is installed with Update 813321.

This was working the other day and now it is not.  I had no access to the server so I have no idea what happened.  I now have direct access to the machine to troubleshoot this issue.
Avatar of Doug

ASKER

This string is stored in the machine.config file in the appSettings tags.  .NET Framework v1.1.4322 is installed on this machine.
Avatar of Doug

ASKER

Here is the error message when I run the .aspx file.
The 'DB2OLEDB' provider is not registered on the local machine.
It is generated from the try catch code here...
Public Function DB2Connection() As OleDbConnection
     Dim strDB2 as String = System.Configuration.ConfigurationSettings.AppSettings("XXXXX.GLOBAL.DB2ConnectionString") & "User ID=<userID>;Password=<pswd>;"

     Dim objConn As new OleDbConnection(strDB2)
          Try
               objConn.Open()
          Catch ex As Exception
               objConn = Nothing
               response.Write (ex.Message & "<br>")
               response.Write ("problem creating connection<br>")
               response.Write(strDB2)
               response.End
          End Try
Return objConn
.
.
.
As far as the platform, you have to be a little more specific.  I am by no stretch of the imagination anything close to familiar with this stuff.  
It is running in a Windows 2000 SP4 environment...
Avatar of Doug

ASKER

The operating system is the same as the old one.  The peculiar thing is, that it was working last week.
Avatar of Doug

ASKER

Also, my co-worker can get it running fine on his local machine.
Avatar of Doug

ASKER

**Solved**
When VS.NET was installed (I think it was VS.NET) it modified the db2oledb.dll file located in the...Host Integration Server\System folder.  

When the program was being compiled on the local machine then uploaded to the server, the files were different.  The one on the server was more new (as far as modified date goes).  Once I copied the file from the one that the aspx was compiled on to the server and registered it (regsvr32...), it worked.

Hope this helps someone else because I was at my wits end with this one.

Requesting paq and refund.  Any objections let me know.
ASKER CERTIFIED SOLUTION
Avatar of ee_ai_construct
ee_ai_construct
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Doug

ASKER

update to this issue...
My above solution turned out to be temporary.  When the server was rebooted, the problem returned.  I then went back to the drawing board to try and solve it.  It took a while and many sleepless nights but I did it.  The solution is NTFS permissions.  

I ran NTFILEMON (found at www.sysinternals.com) ran my asp and aspx pages that used the db2oledb.dll file to get the DB2OLEDB provider is not registered on the local machine error (on aspx page).  In asp it said something different but it still errored out.  Then I turned off NTFILEMON and saved the log file.  I opened the text file and searched through it for db2oledb.dll and found that <machinename>\ASPNET needed Read/Execute access to the ...\Host Integration Server\System folder for the aspx stuff to work, and IUSR_<machinename> needed Read/Execute access to this same folder for the asp connections to work.  I have done extensive testing and this solution has held true (at least for my issue).

I hope this helps someone else and saves their sanity ('cause I sure lost mine during this).