Upgrading .NET MVC 3.5 to 4.0 returns Page Not Found 404 errors
This morning I upgraded a Visual Studio 2010 MVC solution from .NET 3.5 to .NET 4.0 in order to escape the URL path 256 character limit in Windows Server and IIS 7.  Launching the app locally through the VS development server, I typed in an MVC routed  path and was relived to see the page load successfully. But when I pushed the updated assembly and web.config file to a test IIS 7 server, my upgrade parade abruptly ended. While I could load an ASPX page in the app root, pages  that required MVC routing returned wondrously vague 404 Page Not Found errors. Read more
Postgres Return Query bug
Postgres introduced the Return Query syntax in version 8.3, released in 2008. It looks like most hackers didn’t warm to the new and improved syntax for retrieving table rows in set returning functions. Â As recently as version 8.4, Return Query is seriously handicapped with a painful bug that may appear when you change your function’s return type:
Structure of query does not match function result type
The only known workaround for this bug:  drop and re-create the return type object.  According to the mailing lists, a patch is available to those with root level db server access and an applicable version of Postgres.
If you’re unable to apply the patch, this bug can seem debilitating. Â Many functions that return a set actually return rows from a specific table, so it’s not uncommon to set the return type to a table object. Â Read more
Error when executing EdmGen against Npgsql – Postgres provider
In versions of Npgsql prior to 2.0.6, the following error was frequently returned by the EdmGen tool when generating Entity Framework metadata using the Npgsql data provider (Postgres).
An error occurred while executing the command definition. See the in
ner exception for details.
ERROR: XX000: failed to find conversion function from unknown to text
Upgrading to Npgsql 2.0.6.0 or a higher version should resolve the problem. If not, post a full description of your error on the Npgsql forums.
How to Set Up Entity Framework for Npgsql and Dynamic Data projects – Part 2
The previous post, title How to Set Up Entity Framework for Npgsql and Dynamic Data projects – Part 1, covered the steps to prepare your local environment for Npgsql and for the generation of Entity Framework metadata. In this installment, we create a Dynamic Data web application, generate Entity Framework metadata, and then configure the new project so that it recognizes the generated EF classes.
Create a Dynamic Data Web Application
Let’s start by creating the Dynamic Data solution in Visual Studio 2008 or greater. From the main menu, select File | New Project | Dynamic Data Entities Web Application. Name it, select a directory, and press OK.
Note that you should NOT select the similarly named ‘Dynamic Data Web Application”, which is the SQL LINQ alternative not supported by Npgsql. And if you’re thinking about creating a ‘Dynamic Data Entities Web Site’ (instead of an application), be warned that I tried but failed to create and compile a Dynamic Data Web Site; good luck but you’re on your own.
Read more
How to Set Up Entity Framework for Npgsql and Dynamic Data projects – Part 1
One of the ancillary reasons to build a website based on Entity Framework is Microsoft’s Dynamic Data project type. Â Dynamic Data is the .Net answer to Pyton – Django and other frameworks that let developers quickly generate a set of maintenance forms against database tables, while preserving foreign key relationships. Â In other words, a Dynamic Data site auto-generates data entry forms for all the tables or a subset of tables in your database, complete with lookup table support.
A major shortcoming in the current version of Npgsq (2.06) is lack of design-time support for the Entity Framework. Â Building EF apps that connect to Postgres isn’t as easy as dragging and dropping tables and other db objects into the EF visual interface found in Visual Studio 2008. Â (Note that this limitation will soon vanish, as Josh Cooley and the Npgsql team are currently working on a realease that includes design-time Entity Framework support!)
Fortunately, there are a few command line tools for generating EF model files against Postgres or any other .NET provider. Â In the remainder of this blog post, I’ll step through the prerequisite steps for creating and updating your Entity Framework model against a Postgres db. Â We’ll start with basics installation and sytem configuration.
Read more
Postgres’ dreaded “Error: Relation does not exist”
If there’s one error in Postgres that I’ve learned to dread, it’s the ambiguous missing ‘relation’ mesage, as the database engine curtly reports.
ERROR: Relation does not exist
By providing an object id, Postgres gives you a way to find the object’s name and type- just search the system catalogs.  In some cases, you find that a table has been accidentally dropped or that a SQL typo has offended the compiler.  But more often than not, the object does NOT exist and you’re left without a clear indication of the real problem.
Oddly enough, there are casese when running a perfectly valid function (stored procedure) against valid table names will result in this error. Â One possible culprit: a missing index file. Â That’s right: dropping an index can break a function, as Elein explains. Â Not good, but true. Â Deal with it.
Note: if this error is returned when executing a db function, try dropping and re-creating the function (see the link to Eileen’s post above.)
Fixing Common CGI Errors: WordPress on Windows
A number of problems can araise when running WordPress 6.x on Windows servers. Â Depending on the version of IIS, a couple frequent errors include:
CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers
502 Bad Gateway
Web server received an invalid response while acting as a gateway or proxy server.
In many cases, both of these errors can be resolved by running PHP as an ISAPI extension rather than as a CGI application. Â With some hosting control panels such as Plesk, you can easily update IIS configuration settings yourself. Â In other cases, you may need to contact your web hosting provider and request a manual change to the server.
http://wordpress.org/support/topic/149680
WordPress Upgrade
After a few weeks of blogging frustration on MovableType, I made the switch to WordPress. Â I didn’t have the patience to learn and appreciate all that MovableType has to offer, and my experience was compounded by the frustration of realizing that features i took foregranted in WordPress were out of sight from the MoveableType admin interface.

So it’s time to give MoveableType a dismissive wave goodbye, and go back the future with WordPress!
Npgsql version 2 = Full Support for .NET 3.5 + Entity Framework!
The Npgsql team has released a major update to the .NET providers for Postgresql: Npgsql 2.0. The new version updates Postgres to support the most advanced featrues of ADO.NET 3.5 including the Entity Framework.  In fact, Postgres now has better support for the Microsoft .NET platform than many other databases, including mySQL. (You can find third party drivers for mySQL and other databases on the market, but go down that path at your own peril.) It’s another great reason to choose Postgres.
Speaking of mySQL, where does the Sun acquistion leave support for .NET? Sun clearly has cultural antagonism toward the Microsoft platform, and it’s safe to assume that Sun’s financial problems place some drag on peripheral projects- such as mySQL support for .NET 3.5. Does this explain mySQL’s failure to develop .NET driver updates in the recent past? It’s safe to assume that the answer is a big yes.
In any event, congratulations to Josh Cooley, Francisco Figueiredo, and everyone else who contributed to the release!
An honorable mention from Microsoft:
http://blogs.msdn.com/adonet/archive/2008/10/14/npgsql-s-ado-net-provider-for-postgresql-supports-the-ado-net-entity-framework.aspx
How to Install MovableType on Windows
Why not start this blog by sharing a few tips on installing MovableType on Windows?
After all, many Npgsql users are also committed Windows users- or at least have learned to tolerate Microsoft operating systems. More importantly, the MoveableType software that powers this blog supports Postgres just as well as it supports mySQL.
MoveableType4 is the product’s first open source release and includes a significant update to the administrative UI.
Enough small talk. Let’s get started.
MoveableType offers a complete and detailed set of instructions for installing your blog on Windows Server. Be sure and follow these steps.
http://www.movabletype.org/documentation/installation/windows.html