10-28-2011 04:51 AM
I am receiving an error from a web application:
An attempt was made to access the framework without having logged on to a database. Please log on to a database first.
I am certain the error is in the setup of the work station where we are trying to develop as the same source works on other machines.
I believe something was done incorrectly in the installation process.
It is a 64 bit Win 7 machine with SQL R2 ACT7 instance set up locally.
I have read some posts that this might be a 32 bit vs. 64 bit issue. I have been trying to figure this out for 2 weeks now. Any help is greatly appreciated.
10-28-2011 06:14 AM
Are you trying to use the SDK or the OLEDB?
Can you log into the database normally?
What version of ACT! (from Help | About)?
You might see this ACT! Knowledge Base article -
10-28-2011 06:25 AM
Thanks for your response.
The connection is attmepted from the web application's web.config string:
<add key="ACTOLEConnection" value="Provider=ACTOLEDB2.1;Data Source=c:\ACTDB\ACTFILENAME.pad;User Id=username;Password=password"/>
No trouble accessing the file through ACT it self (from the machine in question).
Version = 126.96.36.199 HF 1
10-28-2011 06:53 AM
Sounds like the connection string is failing, can you connect outside your web application?
Best way to test is to create a text file, rename the extension to .udl. This will create a new datalink file where you can test the connection to your database, also is the web app running on the same machine as the Act install?
10-28-2011 07:10 AM
I created the udl.
Should I be seeing the ACTOLEDB provider in the Provider tab? I do not.
Yes. The machine is running/ hosting ACT and contains the web application running in IIS.
10-28-2011 07:19 AM
Yes, you should see the provider listed. In the program files folder you should be able to find ACTOLEDB2.dll, might need to reregister this assembly. We have a copy of gacutil in the program file folder as well, drag and drop the assembly onto the gacutil executable then try again and see if it's listed.
10-28-2011 07:25 AM
The ACTOLEDB2.dll file is there in Act for Windows dir.
I dragged it to gacutil and it ran.
But the ACTOLEDB provider is still not listed when I double click the udl file.
This is a 64 bit machine. Is this an issue?
10-28-2011 07:45 AM
I think that it could be. The ACTOLEDB2.dll is a 32 bit dll, this does prohibit it from running in 64 bit windows environments, but does prevent it from running in 64 bit applications. The UDL file we created on this system is a 64 bit text file and is only finding 64 bit providers.
There are instructions here for using a udl file to retrieve the 32 bit providers.
Has this worked in the past? Is the Web App a 64 bit application, if so then that is likely the issue.
10-28-2011 07:53 AM
10-28-2011 08:09 AM
OK. That worked.
The ACTOLEDB provider is now listed and I made a connection to the ACT file.
Now to figure out how to make the web application do the same trick.
I have inherited this and am trying to recreate the development environemnt for some immediately needed changes.