Oracle Version Error

Filed under: Programming — ej2 at 10:18 am on Tuesday, November 17, 2009

Last night, I struggled with the following error for a few hours:

Could not load file or assembly ‘Oracle.DataAccess, Version=2.111.7.20, Culture=neutral, PublicKeyToken=89b483f429c47342′ or one of its dependencies. The system cannot find the file specified.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.FileNotFoundException: Could not load file or assembly ‘Oracle.DataAccess, Version=2.111.7.20, Culture=neutral, PublicKeyToken=89b483f429c47342′ or one of its dependencies. The system cannot find the file specified.

Development Machine Setup:
Windows 7 64 bit
Oracle 11g Release 1 (11.1.0.7.0)

Target Machine Setup:
Windows XP 32 bit
Originally Oracle 10g, now Oracle 11g (11.1.0.6.0)

After many grueling hours of searching the darkest corners of the internet, I found this post: ODP.NET & LLBLGen Pro. The author suggests using a binding redirect to fix a problem with LLBLGen Pro (but same basic error). While I am not exactly sure what is causing my problem, adding a binding redirect fixed it. The solution seems silly. I install Oracle 11g release 1 (11.1.0.7.0), which is what it is asking for and it still cannot be found.
I install Oracle 11g (11.1.0.6.0) and add the binding redirect and it works.

Here is my config:

<assemblyBinding xmlns=”urn:schemas-microsoft-com:asm.v1″>
<dependentAssembly>
<assemblyIdentity name=”Oracle.DataAccess” publicKeyToken=”89B483F429C47342″/>
<bindingRedirect oldVersion=”2.111.7.20″ newVersion=”2.111.6.0″/>
</dependentAssembly>
</assemblyBinding>

Note: Assembly redirection can work both ways. You can re-direct calls to a new version of the to an older installed version and vice-versa. You can read more about Binding Redirects on MSDN.

I hope this post can save someone a few headaches.

Database Normalization explained

Add Windows Explorer to your Visual Studio tools menu

Filed under: Programming — ej2 at 12:53 pm on Monday, March 17, 2008

Awesome tip from DotNetTipOfTheDay.org:

I often need to open Windows Explorer and browse to the current file, folder, or project that I am working on in Visual Studio. This tip allows you to achieve this by clicking “Windows Explorer” in the Tools menu, and is one of the most simple-yet-useful tips I know of.

To set it up, click Tools, then External Tools…, then click Add. Now enter the following data:
Title: Windows Explorer
Command: explorer.exe
Arguments: /select,”$(ItemPath)”

Leave Initial directoy blank, and click OK. Now when you click Tools, Windows Explorer, Windows Explorer will open with the current file you are editing selected.

Original post.

Disable a button control during postback.

Filed under: Programming — ej2 at 8:13 am on Wednesday, August 29, 2007

Here is very simple (non-AJAX) way to disable a button control during postback:

<asp:Button runat="server" ID="BtnSubmit"
OnClientClick="this.disabled = true; this.value = 'Submitting...';"
UseSubmitBehavior="false"
OnClick="BtnSubmit_Click"
Text="Submit Me!" />

Found here.

Microsoft Case Study on NCSoft

Filed under: Game Development,Guild Wars,Programming — ej2 at 7:29 am on Tuesday, August 28, 2007

ncsoft.jpgMicrosoft Customer Case Study on NCSoft. Not Guild Wars news per say… but still some interesting information. Such as: NCSoft has 400,000 concurrent world wide. See my previous post for more technical details about Guild Wars.

Technical Guild Wars Facts

Filed under: Guild Wars,Programming — ej2 at 8:43 am on Tuesday, June 12, 2007

Some technical facts about Guild Wars from these three articles:

  • Their servers run on blades – originally all IBM, now more varied. Generally these are 2.8 gigahertz dual-processor Xeon IBM blades with 2.5 gigs of RAM.
  • There are a number of different categories of servers. These include: Authorization/log-in, game update download, actual gameplay, database cache, DBMS, several secondary game functions (e.g. guild membership, tournaments), and watchdogs overseeing the rest.
  • Gameplay servers can support 2500-3500 users each, with the main limitation being addressable memory. (They run on 32-bit Microsoft Windows.) 3500 users is a bit uncomfortable.
  • There are 4 ½ million total lines of code.
  • Runs on Microsoft SQL Server, mainly Enterprise Edition.
  • 1500-2500 transactions/second all day, spiking up to 5000 in their busiest periods.
  • They have no full-time DBA (This seems absolutely crazy to me….)

Found via Guild Wars Guru Forums.

Answer to Comment on Custom paging nav

Filed under: Programming — ej2 at 12:06 pm on Thursday, August 31, 2006

While browsing through the plethora of comments I receive on this blog (yeah right… this is my only comment) I found the following question in regards to my Custom paging nav on GridView control Followup post:

Comment by Deepesh

July 19, 2006 @ 6:48 am

hi,
I have tried this but it shows the total no or records shown currently on the page not the total number of records fetched.Can you solve this issue.

Answer: You cannot get the total records from the gridview. You have to get the record count using Selected event of the datasource object that is bound to the GridView.

void objectDataSource_Selected(object sender, ObjectDataSourceStatusEventArgs e)
{
lblCount1.Text = "Total Record count = " + ((DataView)e.ReturnValue).Count.ToString();
}

Convert hex color to .net Color object

Filed under: Programming — ej2 at 10:22 am on Tuesday, June 20, 2006

The syntax for using the ColorTranslator to convert a hex value:

Color black = ColorTranslator.FromHtml("#000000");

Because it took me more than a minute to find, I decided to post it for future reference….

Retrieving an ObjectDataSource Insert Method Return Value

Filed under: Programming — ej2 at 12:26 pm on Friday, May 19, 2006

If you need to retrieve the return value of the invoked insert method on a objectdatasource, use the “Inserted” event like so:

 protected void ObjDS_Inserted(object sender, ObjectDataSourceStatusEventArgs e)
 {
    int retvalue = Convert.ToInt32(e.ReturnValue);
 }

No parameter needed to catch the return value. For the Update method use the “Updated” event. Found here.

Quick Visual Studio 2005 Tips

Filed under: Programming — ej2 at 11:58 am on Monday, March 27, 2006

To column select in VS2005/2003, press “ALT” and hold the left mouse button, then drag. Sweet! You can find more tips here.

Anthem.net

Filed under: Programming — ej2 at 10:14 am on Friday, March 3, 2006

Anthem.net is a super slick AJAX library that supports both .NET 1.1 and .NET 2.0. It contains a number of AJAX-enabled web controls that use an AJAX callback instead the standard postback event.

What sets Anthem apart from other frameworks is that it integrates itself into the server-side control model made popular by ASP.NET. This includes full support for view state, server-side events, and everything else the typical ASP.NET developer has grown accustomed to.

Introduction to Anthem.NET
Anthem.net sourceforge page

Next Page »