May 22, 2009

Finally an Oracle x64 client that works on Vista – AKA Getting Map 2010 x64 running with Oracle…

Filed under: Uncategorized — Tags: , , — Darrin Maidlow @ 4:01 pm

As my legion of dedicated readers know, I’m an 64 Bit zealot.  I would love to see a Windows task manager free of *32.  It keeps me up at night…well not really but, whatever. =) Autodesk recently released – the first native x64 release.  How could I resist installing that?  I had this funny feeling I would regret this decision.  Somehow, somewhere I just knew I would end up in once again.  So I installed Map 2010, started it up and tried to connect to my Oracle server.  You guessed it.  Connection Failed.

The problem is this.   x64 Applications cannot use the x86 driver.  In my previous attempts to get basic Oracle/ODP connectivity on my x64 Vista machine I ended up running the 11g x86 Oracle client.  Today I was back to the Oracle download site – and lookie lookie.  They’ve released an !  2008 is basically Vista so, maybe, just maybe – I thought Oracle will give us some x64 love.  Here are some steps that will help you get running:

First thing is first.  Backup your TNSnames.ora.  Its found in the network\admin folder. 

Next I un-installed the x86 11.1.0.6 client.   Delete the leftovers with windows explorer.

Next download both the 11.1.0.7 client for both x86 and x64 (yes, we need to run with both…)

First I installed the x64 client.  I like to do full runtime installations. 

Next, I copy my backed up tnsnames.ora into the network\admin folder.

Now fire up Map 2010 x64 – connect to Oracle server – Success!  Happy Happy Days.  Unfortunately, fire up (which is still 32 bit) and it fails with an error of “Cannot find OCI.DLL”.  Doh.

So, I go ahead and install the Oracle 11.1.0.7  x86 client.  I install it to the client_2 folder.  Then copy my tnsnames backup into the network\admin folder in the client_2 folder.  Restart Toad, and success!

Now I want to check one last thing.  Last time I was dealing with this fun issue – I had to set my development projects to only run in x86 mode.  So, I fire up my development project and try it out.  Running IIS in x86 mode works.   Running IIS in x64 mode failed..

The ‘MSDAORA’ provider is not registered on the local machine

It seems the Microsoft MSDAORA provider doesn’t exist in x64 – so change your connection to use the Oracle OraOLEDB.Oracle instead and x64 projects run no problem.  It would be perfect to one day get one install that does both x86 and x64 – but for now, I’m content with this setup.

Technorati Tags: ,,

July 11, 2008

ODAC/ODP.NET on Vista x64

Filed under: Oracle — Tags: , , , — Darrin Maidlow @ 7:11 am

Since moving to Vista x64 I’ve had a heck of a time with Oracle clients.  The one thing I could not get working until tonight was ODP with Visual Studio / .NET.  Finally I found a solution.

First, download and install . (Link requires registration)   This should get the 32bit stuff installed.   I’m still using an Oracle 10g R2 server.  You will likely need to grab a copy of the TNSnames.ora for your existing client folder and place it in the appropriate tree of the 11g product home.

This however is not enough to get .NET working with ODP.  Go to the folder where you extracted the zip.  We need to find the Oracle.DataAccess.dll.  This can be found in the file named filegroup4.jar, in the stage\components\oracle.ntoledb.odp_net_2.  Winrar will open .jar files if needed.  Extract the Oracle.DataAscess.dll file.

For now, I’ve put a copy of this file in my projects lib folder.  I then added a reference directly to this file from all projects that need ODP access. 

Keep in mind – before you ship you may want to remove this reference and ensure that the .DLL file doesn’t get included in your build.  This should get your Vista x64 box developing with ODP.

To Oracle – come on guys.  Give us some Vista x64 love!

Technorati Tags: ,,,,

May 1, 2008

Manually configure Mapguide 2009 Web Tier on Vista x64 IIS7

Filed under: Uncategorized — Tags: , — Darrin Maidlow @ 3:37 pm

My configuration is this. I have a 32 bit window server running IIS6 and Mapguide server. however for development purposes and local debugging I needed the web tier to be run from my workstation – but working with my network Mapguide enterprise server.

First off, you need to ensure that IIS 7 is installed on the Vista machine, you also need to specify ASP.NET and the ISAPI components be installed. To start off, run the web tier installation and choose a manual installation. I did a custom install, and did not install the php, site admin, or java components. I installed my web tier to C:\inetpub\MapGuideEnterprise2009. It is critical that you do not install it to the default location in program files (x86), or the Vista permissions will break everything. You will know this has occurred because your map will show all question marks in the layer legend, and no map data.  In the server log you will see session timeout errors.  If you do install it to the default location, just move the entire folder structure out of program files (x86).

Finish the installer, this should deploy the needed Mapguide files. I noticed a bit of a delay in the copying new files portion of the installer. Seemed to be hung for several minutes, but it did complete.

Now start up IIS manager (start / run / inetmgr)

This is the ‘hard’ part. It looks nothing like what I was expecting.  IIS Internet Manager has been pretty static for the past, oh ten years…

A default web site should be configured – double click on the computer in the left pane to expand the tree.

 clip_image002

 

First off – we’re going to create a new application pool specifically for Mapguide. This will save us some problems down the road. If you are not familiar with them, application pools are a newer concept introduced in IIS 6. Each application in IIS requires an application pool. Only one version of the .NET framework can be used by a single application pool. We’re going to set this pool to use .NET 2.0 (which also includes 3.0 and 3.5)

 clip_image004

 

The most important reason for a new application pool is to set this pool/worker process to run in 32 bit mode. Select the new application pool and choose Advanced Settings. Change Enable 32-Bit Applications to true.

 clip_image006

 

If you do not set the pool to run as 32 bit, you will get an error message that says:

"The page you are requesting cannot be served because of the Multipurpose Internet Mail Extensions (MIME) map policy that is configured on the Web server. The page you requested has a file name extension that is not recognized, and is not allowed."

A new behavior in IIS7 is a change between virtual directories and applications. In IIS6 and below, we would create a virtual directory, and then add an application to the properties of that virtual directory. With IIS7, we right click and instead of choosing Add Virtual Directory we choose Add Application. So let’s add a new application to the Default Web Site.

For simplicity, I’m re-creating the structure exactly as defined on my Windows 2003 server. Once the application is created, right click on it and choose Add Application. So right click on the default web site and choose add application. Call it Mapguide2009 and choose the newly created mapguide2009 application pool.

Next we need to right click on the Mapguide2009 application and create two new applications. One called mapviewerdwf, and mapviewerajax. Each of these apps must point to the same location – the mapviewernet folder. (by default its location is C:\Program Files (x86)\Autodesk\MapGuideEnterprise2009\WebServerExtensions\www\mapviewernet – but we need to use c:\inetpub\wwwroot\ MapGuideEnterprise2009\WebServerExtensions\www\mapviewernet) The other difference is that for each application, we must set the default document to be dwfviewer.aspx and ajaxviewer.aspx respectively. To set the default document select the new application in the tree and double click Default Document in the central pane. Enter the appropriate default document.

clip_image008

 

Next we need to setup a script mapping for the FCGI. Select the Mapguide2009 application and we are going to create yet another application. Call this application mapagent. This should act like adding an application to an existing folder in IIS6. Next, double click on Handler Mappings. In the top right, select Add Script Map. On the script mapping form, enter MapAgent.fcgi (or *.fcgi) for the request path. Browse to and select the isapi_MapAgent.dll from the www\mapagent folder. Under request restrictions, you can also set the verbs to GET,POST.

clip_image010

 

Click Ok and you will be prompted to enable the ISAPI extension. Click on yes.

At this point – the Mapguide 2009 web tier should be installed and running. Try it out by starting up a browser and hitting http://localhost/mapguide2009/mapagent/index.html. Next you can access maps using http://localhost/mapguide2009/mapviewerdwf or mapviewerajax.

Technorati Tags: ,,

Powered by WordPress

Switch to our mobile site