I was recently trying to ressurect an older project developed in Windows XP, .NET Framework 2.0, Visual Studio 2005, NHibernate, and SQL Server CE 3.1. I’ve sinced moved to Windows 7 (64-bit) and Visual Studio 2008.
I ran into a surprising number of hurdles while trying to get the application up and running again on 64-bit Windows 7. I figure I would document this here, just in case anyone else runs into the same issues.
Step 1) Try to build the solution. Everything builds fine after installing SQL Server Compact Edition.
Step 2) Try to run the application. Get an exception immediately:
“Could not create the driver from NHibernate.Driver.SqlServerCeDriver.”
InnerException:
“The IDbCommand and IDbConnection implementation in the assembly System.Data.SqlServerCe could not be found. Ensure that the assembly System.Data.SqlServerCe 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.”
Turns out the issue here is that the System.Data.SqlServerCe dll has to be in the same folder as the application executable. Pretty easy fix – set Copy Local to ‘True’ on the reference to System.Data.SqlServerCe.
Step 3) Run the application again – now I get a different exception:
“Unable to load DLL ’sqlceme35.dll’: The specified module could not be found. (Exception from HRESULT: 0×8007007E)”
Turns out the issue with this exception is that SQL Server Compact Edition is built for x86 and has to run in WoW mode on x64 systems. My solution platform is set to ‘Any CPU’, which worked fine when I was developing on Windows XP. To fix the issue, go through all of the Visual Studio projects – go to Properties > Build > Platform Target, and set Platform Target to ‘x86′ instead of ‘Any CPU’.
Step 4) Try to run the application again… and I get yet another exception:
“ADOException: cannot open connection” with InnerException of:
“The database file has been created by an earlier version of SQL Server Compact. Please upgrade using SqlCeEngine.Upgrade() method.”
This is kind of annoying – the Visual Studio 2008 Upgrade Wizard changed all my references from SQL Server CE 3.1 to SQL Server 3.5. How thoughtful. Unfortunately, I don’t know what the implications of ‘upgrading’ the database are. Everything worked fine with 3.1 – why introduce any more change to the application? So, I set the references back to SQL Server CE 3.1 instead of 3.5.
Step 5) Run the application… again.
No exceptions! Everything works with SQL Server 3.1! Upgrade complete.
One thing that any web developer worth their salt should know is the basics of search engine optimization (SEO). Much of SEO comes down to basic code-level best practices, and it isn’t terribly difficult to simply bake SEO into your development process when working on public facing web applications. However, keep in mind that SEO will always be an evolving, fuzzy science, changing on the whim of the indexing strategies of major search engines. Immediate results are rare, and a long term process should be in place to truly understand the benefit (or detriment) incurred.
I break the concept of SEO down into a few categories that I’ll explain further below…
These ‘Content / Internal’ best practices are things that a developer or content creator can bake in during the site development process. Only a few of these items will make a difference on their own, but as a whole can make an enormous impact. These basic factors should lay the foundation for any SEO strategy. However, these internal factors absolutely cannot be the only part of your SEO strategy. Here are a few of the most important ones…
Strategic SEO includes all of the factors external to your website that can affect your search engine rankings. The number one external factor is getting ‘backlinks’ to your content, this is what made Google so ridiculously powerful and accurate – and their rankings are still very much based on the number, diversity, and quality of links to to your site.
Backlinking can be explained with this anecdote: Several years ago you could search for ‘Miserable Failure’ on Google and the number one result was the White House biography page for George Bush. This was due to a simple viral campaign to get people to put links on their websites, comments, blog posts, etc. linking to the biography page with the anchor text ‘Miserable Failure’. That’s how backlinks work. The more external, inbound links to your site, the more ‘authoritative’ your site appears to be in the eyes of major search engines.
But how can you get these backlinks? A few examples…
As mentioned previously, part of SEO includes a process testing out your SEO changes and tracking their effectiveness over time. A variety of free and paid tools are available to assist you in analyzing your search rankings, search terms, and keyword effectiveness. Below I’ve listed a few tools that can help.
There is much more to search engine optimization than can be written up in a single blog post (see also: thousands of blogs dedicated purely to the subject). However, I hope this quick guide to the basics will give you the tools necessary to implement numerous high impact SEO quick wins for a client or personal web site. For web developers, the factors listed above should be kept in mind whenever developing customer-facing websites that could benefit from enhanced search results and search rankings. Most of the ‘content / internal’ best practices can be easily baked into the development process of almost any e-commerce or content management system implementation project.
The impact of performance is much more readily apparent in .NET Compact Framework applications. The mobile devices commonly have a CPU that is 10 times slower than your desktop CPU, and possibly up to 100 times less RAM than a desktop or server. In Agile or XP development, the mantra is often to ignore performance considerations until necessary – I don’t think you can apply that to .NET CF development or it will really bite you in the end. You don’t have to go nuts and optimize everything up front, but there are some very important things to keep in mind when developing a Windows Mobile application…
Many of the standard .NET Framework performance best practices can become apparent very quickly including…
However, the .NET Compact Framework is different than the full framework in many ways, leading to a slew of .NET CF specific performance considerations…

Categories
Tag Cloud
Blog RSS
Comments RSS

Void « Default
Life
Earth
Wind
Water
Fire
Light 