Arun Stephens

Azure 1.3, Rewrite module and a ‘Faulted’ System.ServiceModel.Channels.ServiceChannel

I recently updated to Azure SDK 1.3. Then I tried to debug my solution locally. This is where the trouble began. The problem was that I was using the IIS Rewrite module without having it installed. Rewrite was part of Azure SDK 1.2, but it has to be installed separately for 1.3. I guess I should have read the release notes. Here is what the problem was, and how I found the solution. Read more →

Entity Framework 4 many-to-many

I had another problem with EF4 today. Code that worked fine in .NET 3.5 didn’t work after I regenerated the entity model using Visual Studio 2010. I found an answer, again on Stack Overflow: http://stackoverflow.com/questions/2243618/how-do-you-insert-or-update-many-to-many-tables-in-net-entity-framework It turns out that the generator decided that one of my foreign keys in an associative table should have a StoredGeneratorPattern of Identity, meaning it thought it was an identity column. When it isn’t. But updating the XML as suggested in the answer above fixed it. Read more →

1..0 or 1 relationships in Entity Framework

I came across this problem today when migrating a project from VS 2008/.NET 3.5 to VS 2010 RC1/.NET 4.0. I don’t actually think it’s a VS 2010 thing, though. I have two entities A and B. There is a navigation property on A, and it can have either one or no instances of B. B’s foreign key is to A’s primary key (obviously) but B also has its own primary key. Read more →

AJAX history with ASP.NET AJAX 1.0

If you are still using the original ASP.NET AJAX 1.0 release, you may be looking for a way to use .NET 3.5 SP1′s “history” feature of the ScriptManager control. A while back, Nikhil Kothari wrote a component called UpdateHistory, which looks like what was integrated into 3.5 SP1. It certainly solved my problem. Combine it with HttpUtility.ParseQueryString and you’re onto a winner! Read more →

Entity Framework: Part 2

I have been reading a bit of the documentation about the ADO.NET Entity Framework. There are a few passages that relate to my previous post: Because referenced objects are not automatically loaded, you must call the Load method on the entity reference to load the related object data into the object context. You can also specify a query path that defines which related objects to load with returned objects. For more information, see Querying Data as Objects (Entity Framework). Read more →

LINQ to Entities – my first steps

I have had little bit of experience with LINQ to SQL, but recently read that Microsoft is instead concentrating on LINQ to Entities. I have just started a new project, so thought decided to use LINQ to Entities instead. And I ran into a problem. I haven’t managed to find a solution to it yet, so I figured that I would write about it here and hopefully, once I have figured out what I was doing wrong, it might be able to help someone else out. Read more →

I like LINQ

LINQ stands for Language Integrated Query, a new feature of the .NET Framework 3.5. And it’s cool. I have used LINQ to SQL on the My Flatmates Facebook application, and it made things a lot quicker. LINQ to SQL creates classes out of your database tables. Then you can use LINQ statements to create instances of the classes from your data. I think that Ruby is similar in that you work directly against the database. Read more →