Microsoft OLEDB 12.0 not registered on local machine - asp.net

I have created an ASP.net web application which reads data from excel sheet and displays it in jquery data table.
After taking a build and deploying it on IIS 8, it works fine on my machine. But once I deploy it on another machine which has 32 bit office installed, there is Microsoft.OLEDB 12.0 driver not registered error.
But even after installing microsoft redistriuable and data connectivity components I am getting the same exception.
Every answer on stackoverflow covers driver installation but it dosen't help in my case.

Related

Development and Production environment have different behaviour with the same setup

I've developed a web application with asp.net/vb.net using Visual Studio 2012. I've this application locally on my computer and on a server where is accessible from the web. Now, i've just a problem with the ODBC.
In my local version i get this error when i try to access a databace with an odbc:
The specified DSN contains an architecture mismatch between the Driver and Application
And it's ok, because visual studio it's a 32bit application and i don't have the 32bit odbc.
But, in my production environment i don't have the 32bit odbc too but i don't get the error and everything works good.
I really don't understand why.
Someone can help me?
Every Windows x64 architecture has both 32 and 64 bit ODBC. You can manage the ODBC for 64 bit in [Unit]:\Windows\System32\odbcad32.exe and for 32 bit in [Unit]:\Windows\SysWOW64\odbcad32.exe.
Try to create the DSN in the correct ODBC depending on your application based platform. You can check it on Visual Studio > Your Application > Properties > Compile tab > Platform

Crystal Reports and Visual Studio 2010 Error: Unsupported Operation

I Googled for this error, and found many links on SAP as well as StackOverflow, but none of these seem to answer my specific problem.
I have developed a web application using VS 2010, ASP.NET 4.0 and Crystal Reports. I have deployed this application on Windows 2003 R2, Enterprise Edition, SP 2, 32-bit, on IIS 6. I have installed Crystal Report Distributable 32-bit, Version - 13.0.8.1216, on the server. The data source is Oracle 11g XE, on a separate server
When I browse the report from the browser (IE, FF), the reports are visible in the viewer for some time. The problem is after some time, I start getting the following error:
Unsupported Operation. A document processed by the JRC engine cannot be opened in the C++ stack
As suggested in many solutions, i have checked the availability of the report files(.rpt) and they are available on \Reports folder. The aspnet_client folder is also available which has a crystalreportviewer13 folder inside aspnet_client\system_web\4_0_30319
I have no clue, why it will work perfectly fine initially, but later it will start giving this error. I thinks it is probably when I try to access the application concurrently from 3-4 different machines. I replicated this behaviour once.
Now if restart the server machine, it again works fine. Restarting just IIS does not help
Would appreciate any help, as I am at my wits end to find a solution. I will readily provide any other information if required.

How to connect to Oracle11g client VS2010 windows8 os 64bit

I am using vs2010 to create a web app that takes data from a database and creates charts using this data. My only problem is I cant connect to the database. I've searched everywhere for the past week. My os is windows8 64bit. I'M trying to connect to an oracle 11g client. Please help. I'm programming in c#. (ODAC not working)
after searching for more than a week, I finally decided to go to the oracle site and there I looked through a few discussions I found out that oracle is supported from 11.2 release upwards on vs2010 windows 8

'Microsoft.ACE.OLEDB.12.0 is not registered in the local machine.'

I have installed Microsoft Access Database Engine 2010 Redistributable http://www.microsoft.com/en-us/download/details.aspx?id=13255 on the Windows 2008 server. However, when I ran my web application to import a spreadsheet table to the database. It complains with the error message - "Microsoft.ACE.OLEDB.12.0 is not registered in the local machine."
I have tested my code and works in my Windows 7 local machine. Any idea?
There is a problem with Microsoft.ACE.OLEDB.12 when AccessDatabaseEngine x86 or x64 2010 is installed.
I have long attempted to use the SSMS (2005-2008-2008R2-2012) Export Wizards to export large tables onto Excel and I needed the AccessDatabaseEngine installed to be able to do that.
However, regardless of the MS Office version (2010, x86 or x64, or whatever it is), the 2010 version of AccessDatabaseEngine will not work towards registering the provider.
The solution is to download and install the previous one which is none other than the 2007 x86 one.
This one will work even if Office or SQL Server or VS are x64.
Download it from here http://www.microsoft.com/en-us/download/confirmation.aspx?id=23734
Now, any other propagated issues revolving around the notorious failure to register "the provider" on the local machine for the Microsoft.ACE.OLEDB.12 should be resolved by the above.
Feel free to paste me your experiences on this matter.

HOWTO: Visual Studio 2010 MVC3 Project on Win7 x64 Using Oracle ODP.NET 11.2

I have a new development machine Windows 7 x64 and am writing an MVC3 application that targets an Oracle database. I have tried everything that I know of to get it running with no success.
Previously, I was developing on a Win7 x32 box and could debug fine locally, but was unable to deploy and run it on a Win2008 x64 Server despite having ODP.Net and 11g Client installed.
"Could not load file or assembly 'Oracle.DataAccess' or one of its
dependencies. An attempt was made to load a program with an incorrect
format"
On my new x64 machine, I can build the project but when i try to run it in via the IDE I get:
"The provider is not compatible with the version of Oracle client"
I am at a complete loss.
Does anyone have a similar setup that could share detailed instructions of what to install where and how to to reference Oracle.DataAccess in such a way that I can debug in the IDE on my x64 box, and also deploy to x64 server?
It should not have to be this difficult.
I do have this running on Windows 7x64 with the Oracle 11g R2 client that comes with the ODAC installation here:
http://www.oracle.com/technetwork/topics/dotnet/index-085163.html
Make sure you have the x64 version installed locally, and you may have to do the uninstall-reboot-reinstall-reboot tango. I also had weird problems getting it to see TNSNAMES entries and had to go with EZCONNECT strings, but that's not your problem.
In fact, I've also gotten it working on x64 using the 32 bit EF beta and it works fine:
http://www.oracle.com/technetwork/topics/dotnet/downloads/oracleefbeta-302521.html
Although I don't think the EF implementatinon is 100% ready for prime time yet (we ended up using the DevArt driver instead because it had more reliable support for computed fields - we never did get Computed or Identity Timestamps working in ODP.NET EF Beta, although oddly Primary Key NUMBER fields populated by triggers did work.)
I didn't have to do anything special, and I didn't have to do anything special on the server side either (with both 10g and 11gR2).
So I finally figured it out. Here is what I did step-by-step:
On my Win7 x64 development machine I removed all Oracle products in an attempt to start from scratch (including manually deleting registry keys and files/folders)
I installed "Oracle Database 11g Release 2 Client (11.2.0.1.0) for Microsoft Windows (x64) " ON BOTH the dev machine and production IIS server
I selected the RUNTIME option for the installation
During my first attempt the installation complained of not enough room in the PATH
environment variable so I had to cancel the install, remove some path values (which a replaced after the install completed
I installed to C:\oracle was my base path and client_x64 was my HOME so it installed to C:\oracle\product\11.2.0\client_x64
I then installed "64-bit ODAC 11.2 Release 3 (11.2.0.2.1) for Windows x64" on BOTH the dev and production mahcines.
install.bat odp.net4 c:\oracle\odac11.2.x64 odac112x64
The above statement creates a new home named odac112x64
At this point I built a simple console app using the following setup
Added reference to Oracle.DataAccess.dll located in C:\oracle\odac11.2.x64\odp.net\bin\4
Set CopyLocal = FALSE for the Oracle.DataAccess reference
Set the application to build for "ANY PROCESSOR"
The app connected to my oracle database and returned records on both machines
I then created a sample MVC website project with the same connection code as the console app.
When I ran it locally in the IDE it threw an error:
"Could not load file or assembly 'Oracle.DataAccess,
Version=4.112.2.0, Culture=neutral, PublicKeyToken=89b483f429c47342'
or one of its dependencies. The system cannot find the file specified."
I believe this is because the IDE is 32bit and could not load a 64bit Oracle.DataAccess
I published that exact code to the production server and it ran successfully
At this point my only problem is getting it to run locally for development purposes
I installed "ODAC 11.2 Release 3 (11.2.0.2.1) with Xcopy Deployment" which is the x32 version of ODP.NET
install.bat odp.net4 c:\oracle\odac11.2.x32 odac112x32
When I re-ran the MVC website project locally it worked as expected!
UPDATED FOLLOW-UP INFORMATION #1:
After getting this to work I attempted to apply the same steps to another server and it failed. The problem was that "Allow 32-bit Applications" was set to TRUE in the application pool. DISABLING 32-bit apps (only allowing 64bit) resolved the problem on the new machine.
UPDATED FOLLOW-UP INFORMATION #2:
The ODAC installation on the new machine failed to place the installation and bin directory in the environment path (I hate Oracle). Once that was added, all was running as desired.
I have not worked with ODP.NET for quite some time, so I am running from memory of issues I had when I last used it.
The ODP.NET bits have to be installed on the server (or at least deployed, although I am not sure how that is accomplished off hand). The actual client in ODP.NET is the same Java libraries used for Oracle access. If installed, then you have some type of configuration error or permissions issue with using the underlying Java libraries.
I am not sure what the IDE message is about, however.

Resources