| Mobile | RSS

SharePoint 2010 Virtual Machine

February 21st, 2011 | 1 Comment | Posted in gnu/linux, software, ubuntu, web

Task: Configure a Windows 2008 R2 server to host 64-bit SharePoint web part calling Oracle database on another machine.

aka, “Overcome the ‘ODP.NET: The provider is not compatible with the version of Oracle client’ error.”

Host: Ubuntu 10.04.1 LTS Desktop Edition

  • VirtualBox 3.2.12 r68302
  • Oracle 10g Express

By default, the web interface for Oracle XE is only accessible from the local host machine. Go to the Administration Settings for the site and then look for the “Manage HTTP Access” link on the right.

If you have any questions about your host supporting 64 bit guests, check this FAQ.

Guest: Windows Server 2008 R2

  • SQL Server 2008
  • Visual Studio 2010
  • Sharepoint 2010 Enterprise Cals Trial
  • Custom web parts containing connections to an oracle database, 11g R2 installed in dev mode

Configuring the server for SharePoint

  1. Do an update.
  2. Change machine identification.
  3. Add 2 roles: Application Server and Web Server (IIS).
  4. Save baseline snapshot.
  5. Deploy the webparts to your server, however you do that. The best way is generally via powershell script. Once you develop a generic template [link] you can use it for your projects.

Getting Oracle To Work

  1. Once you have deployed the web parts, if you immediately try to add them to your page, you will get errors.
  2. Basically, you can use this post to help you extract the needed dlls. I used the latest version of 11G R2 I could find for x64. (11.112.1.0, dated 2010-03-12) The dlls aren’t in the exact jars he describes, but they are in the same package areas, so you will find them.
  3. Copy the 11G R2 dlls to the bin directory of your ASP.NET applications.
  4. Because we are using the web parts in the default SharePoint instance, this path is C:\inetpub\wwwroot\wss\VirtualDirectories\80\bin.

Errors

  1. “Required permissions cannot be acquired.” error In the IIS Manager, navigate to you site, in this case SharePoint – 80, and look for the setting “.NET Trust Levels”. Edit the application’s trust level from minimal to full and bouncing IIS.
  2. Failed to find or load the registered .Net Data Provider error. If that error is gone, then you may now be faced with an error about failing to find the dll. This probably has to do with our machine.config, since we DID NOT INSTALL oracle on this machine, only dropped the dlls on to it. Find the machine.config file for Framework64, located here:
    C:\Windows\Microsoft.NET\Framework64\v2.0.50727\CONFIG
    Now find the following line:

    <section name="system.data.oracleclient" type="System.Data.Common.DbProviderConfigurationHandler, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>

    Replace that line with this line:

    <section name="oracle.dataaccess.client" type="System.Data.Common.DbProviderConfigurationHandler, System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>

    Next, find this line:

    <add name="OracleClient Data Provider" invariant="System.Data.OracleClient" description=".Net Framework Data Provider for Oracle" type="System.Data.OracleClient.OracleClientFactory, System.Data.OracleClient, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"/>

    Replace it with this line:

    <add name="Oracle Data Provider for .NET" invariant="Oracle.DataAccess.Client" description="Oracle Data Provider for .NET" type="Oracle.DataAccess.Client.OracleClientFactory, Oracle.DataAccess, Version=2.112.1.0, Culture=neutral, PublicKeyToken=89b483f429c47342" />

Sharepoint Design - 2
Creative Commons License photo credit: Penningtron

Follow Discussion

One Response to “SharePoint 2010 Virtual Machine”

  1. r.jimi Says:

    Can anyone help me with my code blocks?? I’m usingĀ SyntaxHighlighter Evolved.

Leave a Reply

Time limit is exhausted. Please reload the CAPTCHA.