Tuesday, March 8, 2011

In ASP.NET URL rewriting, should use 301 Moved Permanently redirect instead of 302 for SEO

For 301, Search engines will accept this and page ranking is divided between old and new version of the page.

Permanent (301) redirection in ASP.NET
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location", "/New-Page/");

Permanent redirection in ASP.NET 4.0
Response.RedirectPermanent("New-URL.aspx", true);

Entity Framework Database support list, MySQL, Oracle, Firebird, DB2

Full detail:

How to solve "There is already an open DataReader associated with this Command which must be closed first"

Add following section into database connection string in config file