Coldfusion COM not registered - dll

First time ever using ColdFusion.
We have a website that uses ColdFusion 9 on our live server. It calls a COM DLL to encrypt certain things. The code on our live server works fine.
Since I may be taking over the project I installed ColdFusion 10 Developer edition on my local machine and copied all the source code and DLL's down to my local machine for testing.
I am getting an error that it can't instantiate the COM object because it is not registered but I KNOW it is registered because the DLL works on other parts of our website that are still in Classic ASP and will run on my local machine. I actually wrote a ASP script inside the the ColdFusion test site on my machine to test the DLL and everything works fine so it IS registered (via regsvr32.exe).
The ColdFusion page was done by an outside company that we are going to be breaking ties with and I don't have the password to their ColdFusion control panel even though it is on one of our servers. I wanted to look at their settings. Is there some setting that I need to set in the control panel on my machine? If there is I haven't found it yet.
Any ideas?
EDIT:
Here is the code:
<cfscript>
objEnc = CreateObject("com", "mycom.myclass");
</cfscript>
Also, I am running the 32-bit version of CF on a Windows 7 Pro 64-bit OS.
EDIT:
Another edit just for some more info:
The Windows 2008R2 server that it runs successfully on is a 64-bit server. So OS shouldn't have anything to do with it.
Should I try to find Version 9 developer edition on adobe's site and see if it works since it matches the CF version on the server? Haven't been able to find that yet and now Adobe just released 11.

After downgrading my local machine to ColdFusion 9 I can now access the COM DLL perfectly. Which is probably for the best since our server is running CF9. My testing will be with same version. Thanks for all you guy's input.
Randy

Related

Classic ASP: 32-bit dll running slow in 64-bit windows 2003 R2 AFTER domain change

My Classic ASP app is using COM version of ActiveReports to get data out of a very small SQL server 2008 database (less than 200MB) and generating PDFs on request from the simple ASP app. The PDF size is about 8KB. The ASP server runs on W2k3R2 64-bit. I had done the following:
Used regsvr32 in SysWOW64 to register the DLLs
Enabled 32-bit support for IIS running under 64-bit WinOS
The ASP server was on the UAT domain while we were testing, and it used to be able to produce the PDF reports within 5 seconds...then the management decided to 'join' the PROD domain instead; and for some strange reasons, the PDF generation processes took 1-5 minutes instead of seconds. Regardless on unregistering/registering the DLLs again, numerous IIS restarts, adding IUSRS and IWAM users into the local admin group, and re-enabling 32-bit support within IIS, there is no improvements in performance.
Using the SQL profiler, we are 100% sure the bottleneck is not caused by SQL connections, but the generation of PDFs.
We are totally baffling with this problem, is there anything else we should look at, apart from changing server (as a last resort)? Thanks.
pause can be caused by attempt to access to the printer settings in the rendering engine, please try to use MyReport.Printer.DeviceName = "" code before MyReport.Run()

SQL error SQLState 08001 from MS Access 2010 runtime 32bit

My Problem is that I cannot connect to an SQL Server Express 2008 64bit Database via an Access Runtime 32bit, neither by Windows authentification nor by SQL auth.
On the Windows 2011 Small Business Server runs a Virtual machine with Windows 7 Prof. 32 bit. From this Windows I tested my Access App. using a (32bit) SQL Driver 11, which works fine.
The same Access App used from a 64 bit Windows 7 Prof. Client using a 64bit SQL Driver 11 fails with SQLState 08001 error.
The Thing which I do not understand is, that ODBC Connection test is successful, a data link (UDL) is successful, but not my Access App.
When starting the app, the first Thing is to run a stored procedure through a passthrougquery and grab data from a certain tbl in the SQL-Database. This SP brings the Connection error, but not an runtime error from Access (I removed even an error handler!).
So, how can I find the reason or any error in the Access app (if there is one)?
I am helpless as anything I know to test or to do I already tried out to make the app run. As I cannot even install the SQL Driver 11 in 32bit, it should not be a Driver related error.
Does anyone know a test-app, where I cannot only connect but retrieve data from an SQL-Database or any other tricks to check the Access to the database?
Thanks your help!
Access usually is installed as a 32bit Application. So on 64bit computers it will use the 32bit subsystem. On Windows 7 all the default shortcuts to the ODBC Data Source Administrator utility will lead to the 64bit version of it. Whatever you see or configure there is completely irrelevant, as your 32bit Access is not going to see it.
Solution:
You need to explicitely open the 32bit version of the ODBC Admin utility and configure the data source there.
To make sure you get the right version, use Windows Explorer and open this file: C:\WINDOWS\syswow64\odbcad32.exe
Well, what I found out meanwhile is, that the Connection Fails when trying to use a Connection like this "ODBC; DSN=MyDSN;....." but it works, when I make a Connection DNS-less, by connecting with "ODBC;DRIVER=SQL Server Native Client 11; SErver=myServer;....".
Maybe this is exactly that what you are talking aout. When I just use a DSN it takes the wrong bit Version.
So I will try this: delete the DSN I have, open odbcad32.exe and create the same DSN again.
If I understand you correct, then Win 7 provides the correct Driver and stores it in the DSN. Calling this DSN by Access would lead to the correct Settings.
Further Problem is, that my SSQL-Server instance is not at port 1434, and the SQL Server Native Client 11 Driver has no more Clientconfiguartion to set the static port. So I found a string solution for that "MyServer\Myinstance, 15999".
I hope that this port Setting will be accepted in the DSN, otherwise I really have to Change to DSN-less which is more complicated due to different Servers for the development and the production.
Thanks yr. reply.

Registering an interop dll on Windows Server 2008 R2

I have searched all over StackOverflow and the internet for help with this. This is a very commonly asked question and I have tried everything that I could find and still no success.
The problem is that my company wrote their own encryption dll several years ago. It is now considered obsolete in the company but we are a small branch of a larger corporation and we use this on our classic ASP intranet web site.
We are in the early stages of migrating our web site to a Windows Server 2008 R2 virtual server.
Most every web site I found said the same thing. Go to C:\Windows\SysWOW64 and run regsvr32.exe in a command box. I have done this with the dll in a separate folder and I have done this after the dll has been copied to the SysWOW64 folder.
Each time I get an error message and the messages are not always the same. The message du jour that I am getting is:
The module "Interop.MyEncryptionTool.dll" was loaded by the entry-point DllRegisterServer was not found.
Make sure that "Interop.MyEncryptionTool.dll" is a valid DLL or OCX and then try again.
I do not have the source code of the dll nor do I think anyone in the company has it. I wrote my own encryption dll in VS 2008 in VB.net and it works fine but we decided that even though the company considers their dll obsolete it is still a standard. The company never created an updated version to replace this dll.
At this point I am wondering not so much how to do this but is it even possible. Did 2008 R2 drop compatibility with older Active-X, COM or COM+ dll's?

Debug ASP Pages in HTTPD

We are developing ASP pages for a Windows CE device. We need to debug the ASP pages for reducing the development effort. The ASP pages uses a COM component for getting data from the device. The web server running on the Windows CE device is Httpd.
How can we debug the ASP pages running in Windows CE device?
You've run into one of the many joys of developing using the ASP server that ships with Windows CE. There is usually no way to do live debugging so you're largely relegated to using alert statements or DEBUGMSG from a COM component.
The one exception, and it's not all that easy either, is if you've created your own OS image and you have a BSP with KITL enabled. In that case you can build an OS with the debug version of the web server in it, deploy the OS from Platform Builder, attach with KITL and set break points down in the server code. You can then use those to step into the parsing of your own ASP page. It's a complete headache.
Shameless plug
Attempting to write anything useful with the built-in ASP server is so bad that we actually wrote a complete replacement. Our Padarn Web Server supports a subset of ASP.NET, was designed for CE (though it runs on the desktop as well) and best of all you can use C#/VB.NET and the Visual Studio debugger for your page code behind. The only downside is that it's not free - though if time is of any value, it certainly costs less than trying to use the built-in server.

Having two ODP.NET (ODAC) versions in the same server

Some months ago, a colleague of mine installed ODAC 11.106.21 in a server using XCOPY and then he developed many applications that use this client without problems (in test and production windows servers).
Past week, I developed an application under ODAC 11.1.07.20. When I asked him to install these new ODAC version using XCOPY in a different folder and then include my application in the test server, he answered me that I should use ODAC 11.106.21 because he could have troubles with his applications.
So I would like to know:
1) If it is really possible to have two different ODAC versions in one server.
2) If the answer is positive, how can I firmly ensure to my colleague that he will not have troubles with his applications?
3) If the answer is positive, is this necessary to do some kind of configuration in the server?
Thanks!!
You can have multiple versions of ODAC on the same machine, but there are several things to be aware of with regards to which version will be used by each application. This actually applies to all assemblies.
in Visual Studio, if you set Specific Version = True on Oracle.DataAccess.dll, then that application will not use any other version and must be able to find the version it was built against.
whether you deploy the DLL with your application or expect it to be in a certain place or in the GAC.
there is a specific search order for finding dependent DLLs, and it's quite involved, so read this MSDN topic.
The short answer is that there are two easy ways to make sure your application uses the exact version of Oracle.DataAccess.dll you want it to (this applies in most cases where everything else is default):
Set Specific Version to True;
Deploy the DLL with your application and have it reside in the application directory, OR ensure that the DLL is in the GAC.
In your specific case, your colleague may have a valid concern: If his applications which are currently installed are getting Oracle.DataAccess.dll from the GAC, and he didn't set Specific Version to True, then when you install the new ODAC, his applications will start using it (I'm assuming the new Oracle.DataAccess.dll will be installed in the GAC too),
The problem here is not .NET dlls but unmanaged dlls.
I trying to make to work two ASP.NET applications on one server. One is older using ODP.NET 9.x and the new one using the latest ODP.NET. I deployed the newest ODP.NET using xcopy and added the paths to PATH environment variable for the new ODP. Now the old application doesn't work (probably tries to use new dlls). When I remove paths from PATH variable then the new app doesn't work. I found the way to make it work on one server unders IIS on Oracle pages but that didn't work. Maybe because I didn't install newest ODP.NET but just xcopied it. I will have to try it.
What Oracle says about:
Link: http://www.oracle.com/technology/tech/windows/odpnet/faq.html
Many Oracle applications run on Microsoft Internet Information Services (IIS). Previously, IIS was a single process application without the ability to assign a different System Path to each running web application using the same IIS instance. With IIS 6 on Windows Server 2003, IIS supports multiple processes for the same instance. Since each application has its own IIS process, each web application can be assigned a different System Path directory with its own Oracle Home.
Microsoft documentation provides information on IIS worker process isolation and application pools.
To set up multiple active Oracle Homes running concurrently on the same IIS server:
1) Run IIS 6 in worker process isolation mode on Windows Server 2003
2) Deploy one version of the Oracle Client to one application pool and the second version to another application pool. For example, you can have Oracle Client 9.2.0.2 and ODP.NET 9.2.0.2 be used by one application pool. And Oracle Client 9.2.0.4 and ODP.NET 9.2.0.4 can be employed by another application pool. You won't be able to use two active Oracle Homes in the same application pool. Each active Oracle Home must be in a different pool.
3) Set the DLL directory for each worker process to use the appropriate Oracle Home client directory. To do this, within each ASP.NET application, call SetDllDirectory(directory_name) early in the application lifecycle before any Oracle DLLs are called. The SetDllDirectory input variable is the Oracle Home bin directory of the ODP.NET version used. Note: SetDllDirectory is an unmanaged call.