April 12, 2010

Visual Studio 2010 and .NET 4.0 Full available on MSDN!

Filed under: Development — Tags: , — Darrin Maidlow @ 10:06 am

MSDN has been updated with the full releases of VS 2010 and .NET 4.0.  Getting some decent download speeds too..

http://msdn.microsoft.com

wooo!

Visual Studio 2010, .NET 4.0, AND ReSharper 5.0 launch today!

Filed under: Development — Tags: , , — Darrin Maidlow @ 8:32 am

I may be weird, but I actually went to bed excited last night.  VS 2010, .NET 4.0, AND are supposed to be released today.   For the first time in probably months I got out of bed at 7am -  It’s now 7:30 Redmond time – but MSDN has not yet been updated!  Apparently we have to wait until 8:30 Redmond time.   Adobe is all over their release of CS5 today, and they didn’t make their users wait until 8:30 Redmond time! =)

In the meantime, The Register has a good write up on some of the coming in an hour or so.  That will learn me for getting up early.  Oh well, time for another !

April 9, 2010

NHibernate 2.1 throws System.InvalidCastException on Oracle 10g R1 client

Filed under: Development — Tags: , — Darrin Maidlow @ 3:52 pm

When deploying an early build of an up and coming product on a customers machine I came across the following error:

System.InvalidCastException: Unable to cast object of type ‘Oracle.DataAccess.Client.OracleConnection’ to type ‘System.Data.Common.DbConnection’

This was one of those awesome “doesn’t happen on any of my machine” errors.  After some mucking around we determined that the client machine was using the Oracle 10g  R1 client.  The machines and VMs here we used for testing were all running either 11g, or 10g R2.  Doh!

The simple resolution to this was to modify the NHhibernate config and add the following property:

   1: <property name="hbm2ddl.keywords">none</property>

Depending on your underlying databases and mappings this could cause problems with your code project.  Hopefully you’re not using reserved words, or bad Oracle syntax =).

Under the hood, the problem seems to be that the Oracle10gDialect does not provide an implementation of IDataBaseSchema for 10gR1.   Fabio Maulo has provided some sample code and the steps on for your database and submit it to the NHibernate project for inclusion.

A concerned resident called police…

Filed under: General — Tags: — Darrin Maidlow @ 9:57 am

Stating there was a man walking around in a .

April 6, 2010

Blending the iPad!

Filed under: General — Tags: — Darrin Maidlow @ 11:13 am

I love .  From the makers of , here is blending the iPad!

April 2, 2010

ReSharper 5.0 is coming!

Filed under: Development — Tags: — Darrin Maidlow @ 5:29 pm

Ok, I’ve in the past – but I had to bring it up again..  Version 5 has some great new functionality and its   I’m especially excited about the huge web development.  I’ve been using the 5 beta and RC for probably a month or two and its great – I’ve been doing a metric butt-ton of refactoring and its great to have my changes go all the way into the .aspx files. 

The NUnit test engine is great.   I didn’t realize this was a ReSharper tool at first.  Now, I can’t live without it.

The localization plugin is going to save me days of effort on an upcoming action item. 

The class/code generating tools are indispensible – especially if you create a lot of classes (e.g NHibernate POCO’s).

The refactorings have been helping me slowly increase the legibility of my code – and also helping me build better coding habits.  Check out the comparison between

If you’ve never tried ReSharper –   only I could make the time to properly learn all the different tools available…

March 26, 2010

Upgrading to NHibernate 2.1 for new Validators!

Filed under: Development — Tags: — Darrin Maidlow @ 5:04 pm

I wanted to implemented the new which meant upgrading to NH 2.1.   Found a great post documenting the new “breaking change” between 2.0 and 2.1 pertaining to the new proxy factory functionality in NH.  “The ProxyFactoryFactory was not configured.” jumped up and bit me in the ass.  

NH used to assume Castle – but now it needs to be configured.  In addition to the Castly proxy, there is a new LinFu proxy available too.   , Davy Brion has it all for you here =). 

I opted to go with the Castly Dynamic Proxy – I’m not in a position to do any performance tests between– Castle has been around a long time and has a pretty big user base.  Good on this subject.  However, LinFu would have won if I was basing my choice on name alone…

After a bit of fiddling, I’m back up and running with NH 2.1 and shiny new validation attributes.   

mmmm validation…

March 5, 2010

Oracle.DataAccess version numbers in a .NET config file

Filed under: Oracle — Darrin Maidlow @ 1:37 pm

For my future reference!

RADE and FullCircle and builds usually have the ODP.NET version in the web.confg set by the installer, but development builds usually come from my machine and are configured for use with the Oracle 11 ODP.NET.   If this is set incorrectly, you will get an error that looks a little something like this:

The IDbCommand and IDbConnection implementation in the assembly Oracle.DataAccess could not be found. Ensure that the assembly Oracle.DataAccess is located in the application directory or in the Global Assembly Cache. If the assembly is in the GAC, use <qualifyAssembly/> element in the application configuration file to specify the full name of the assembly.

To use an different version of the Oracle client, the web.config must be edited and the QualifyAssembly section must have its version property set appropriately.  This will also apply for an app.config too.

   1: <runtime>
   2:     <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
   3:         <qualifyAssembly partialName="Oracle.DataAccess" fullName="Oracle.DataAccess, Version=2.102.2.20, Culture=neutral, PublicKeyToken=89b483f429c47342"/>
   4:     </assemblyBinding>
   5: </runtime>

Possible values for this are:

  • 11g: Version=2.102.2.20
  • 10g R2: Version=1.102.3.0
  • 10g: Version=10.2.0.100

Set your config appropriately and you’re good to go.

February 27, 2010

Google Mail Prevents Embarrassing “Oops here is the file i meant to send”

Filed under: General — Darrin Maidlow @ 3:42 pm

We’ve ALL done it.  Having to send out that follow up “Oh yah, here is the file I meant to attach.  I’m dumb” e-mails.  I just about sent one today – but Google mail saved the day with a new feature!

image

Thank you Google…

August 6, 2009

Configuring Mapguide Enterprise 2009 and 2010 on the same machine

Filed under: Mapguide — Tags: — Darrin Maidlow @ 1:57 pm

So I’m a little behind on the times.  Yes I’ve finally started making the switch from Mapguide Enterprise 2009 to MGE 2010.   However, I need to keep 2009 around a little bit longer.  This resulted in wanting to configure both 2009 and 2010 on the same server.  Configuring Mapguide enterprise 2009 and 2010 on the same machine is possible, and even beneficial in a development environment.  Less VMs or servers can be a good thing in these days of crazy .  Autodesk however, recommends against doing this in a production environment.   You should probably heed this advice if this Mapguide installation is important – even from a workgroup development point of view.   Note, these steps should be relevant for the Mapguide Open Source equivalents – though I have not tried it.

After installing Mapguide 2010 (both server and web tier) on a server running 2009 and updating the license manager appropriately, you’ll notice that the service is not running.  Attempts to start the service will result in an error message logged in the Windows Application Log that looks a little bit like this:

The description for Event ID ( 0 ) in Source ( MapGuide Enterprise 2010 Server ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: Port 2801 is not available, please try using a different port.

So we need to setup one of the Mapguide installations to use a different set of ports.  I’ve chosen to modify the behavior of Mapguide 2010, though these changes could be made for Mapguide 2009 instead.   For this process we’ll need three free ports.  For simplicity its nice to keep these ports sequential.  You will need to ensure that the ports you choose are available on your system.

First we need to edit the serverconfig.ini in the C:\Program Files\Autodesk\MapGuideEnterprise2010\Server\Bin folder.   First lets change the Port in the AdministrativeConnectionProperties section from 2800 to lets say 3800.   Next in the ClientConnectionProperties section change the port to 3801.  Finally change the port in SiteConnectionProperties to 3802.

Next we need to edit the webconfig.ini in the C:\Program Files\Autodesk\MapGuideEnterprise2010\WebServerExtensions folder.  We need to update the port numbers in this config to match the numbers in the server config.  Remember the web config is the client that will usually be consuming the server service.  Finally, as the configuration settings for the web tier may be cached you should restart IIS using iisreset.exe.  This will clear the cached port configurations and Mapguide Studio / Mapguide Administration will now work properly.

Once that is done, the 2009 repository can be migrated to 2010 by following the steps included in the Help/MGE2010UpgradingWindows.htm file on your installation disc/folder.

PHP Problems

Once MGE 2010 has been installed I had a problem with PHP.  Multiple PHPs can be bad news.  I’ve found that running both MGE 2009 and 2010 using the PHP provided with 2010 seems to do the trick.  First you will need to edit the Windows system path.  Update the path variable there to point to the 2010 PHP installation.  If a 2010 path variable exists already – remove the 2009 path.  Next open the IIS manager and ensure that both the MGE 2009 and MGE 2010 virtual directory trees are pointing to the MGE 2010 php extension in the Application Extension Mappings.

Once these changes have been made, do a quick IISreset and you should now be able to login to both the Mapguide admins, as well as have Mapguide Studio connect to the appropriate servers.  Again – this setup could have issues – so consider your environment and needs before configuring a server with both releases of Mapguide.

Remote Web Tiers

If you need to run a shared Mapguide server with web tiers installed on individual development machines don’t forget to set the ports on each development machine.   The Mapguide installer will prompt for the Mapguide server IP address – but the webconfig.ini will need to be updated with the appropriate ports manually.  Not doing do will result in your web tier talking to the 2009 server – and much confusion =)

Finally one note on IP addressees and remote web tiers.  If you plan to use a remote web tier – make sure your Mapguide server is setup using the actual IP address of the server and not 127.0.0.1.  If your Mapguide server is configured with 127.0.0.1, you will get a “Cannot establish connection.” error on the remote web tiers when attempting to create and use a session.  Using real IP addresses (either internal or external) will prevent this error from occurring.

Technorati Tags:

« Newer PostsOlder Posts »

Powered by WordPress