How to get a list of the pages Google has indexed on your site
The Problem For whatever reason you decide you need to get a list of all of the urls you have on your website. In my case, I am looking to move a major site to a new platform and the urls will change. I need a list of all of the pages on the site […]
How to fix problems with asp.net mvc 3 and jQuery UI AutoComplete
The Problem: You’re tooling along, using the jQuery library to write some great search feature, and you write some great Linq to Sql code. Being an awesome coder your use the extension method syntax. Your action result (in the appropriate controller) looks like this public ActionResult QuickSearch(string term) { var lst = context.Contacts.Select(xx => new […]
How to fix the “Could not read metadata, possibly due to insufficient access rights” error in Sql Server 2008
The Problem You are doing the responsible thing and make a backup before you make any crazy changes to your Sql Server 2008 database. You choose the option that gives you the most flexibility and decide to script your backup. Who knows where this backup will eventually go? You go through the Tasks>Script Database, and […]
How to fix yet another You must set this property to a non-null value of type ‘Double’ problem with Entity Framework
The Problem You are coding happily away in Visual Studio 2010, working on your asp.net project, using the entity framework and sql server and you get and you get the following error The ‘Amount’ property on ‘SomeTable’ could not be set to a ‘Decimal’ value. You must set this property to a non-null value of […]
How to fix the Entity Framework Code First problem – Model compatibility cannot be checked because the database does not contain model metadata problem
The Problem So, you are tooling around in asp.net mvc 3 Entity Framework Code First, and you make a change to your underlying model. you then get the following error when Entity Framework tries to recreate the database in Sql Server or Sql Server Express Model compatibility cannot be checked because the database does not […]
How to fix the Entity Framework error “could not be set to a ‘Int16’ value. You must set this property to a non-null value of type ‘Boolean’.”
The Problem You are writing a lovely Entity Framework web application and all of a sudden you get the following error: The ‘Status’ property on ‘SomeTable’ could not be set to a ‘Int16’ value. You must set this property to a non-null value of type ‘Boolean’. You go ahead and set the Status Property type […]
How to fix problems with Visual Studio 2010 Click Once publishing
The Problem So, you’re trying to publish a desktop app via the Visual Studio 2010 Click Once publishing, and you’re having problems with Visual Studio 2010 Click Once publishing? Are you getting errors like the part below Following errors were detected during this operation. * [2/22/2012 1:45:21 PM] System.Deployment.Application.DeploymentDownloadException (Unknown subtype) – Downloading https://www.Domain.com/PublishFiles/SomeApp/Application Files/ReportingApp_1_0_0_8/App_Data/Reporting.sdf.deploy […]
How to fix problems the Mailbox unavailable. The server response was: 5.7.1 Message rejected as spam by Content Filtering error
The Problem: You are trying to send an email in C# from your website (using Exchange as the email server), but you get the error message Mailbox unavailable. The server response was: 5.7.1 Message rejected as spam by Content Filtering. whenever you send the email. It is clearly not spam. The Cause: You are triggering […]
How to Fix Missing records in Linq to Entities
The Problem You are attempting to use Linq to Entities in the standard way, your linq model does not seem to have any records attached. You have missing records in Linq to Entities. You look in the database, and the proper record is there. You do a context.MyEntry.Count().ToString() and it tells you there is one […]
How to fix more problems with ASP.net MVC 3 RouteValues
The Problem You want to create urls that look something like https://SomeSite.com/Categories/Industrial/Fasteners/3.8-MM-Titanium-Wrench-Bolts/ so your site can rank extra high when people search for those profitable 3.8 MM Titanium Wrench Bolts. And in natural, RESTful fashion, your site and database is structured so that the Wrench Bolts are in a subcategory of Fasteners, which are part […]