Review: Programming Entity Framework: Code First (2011)

  • January 5, 2012
  • James Skemp
The following is a review of Programming Entity Framework: Code First, written by Julia Lerman and Rowan Miller. While I had heard of Julie Lerman and her book Programming Entity Framework, after the release of code first I was on the fence on just how much I would get out of the existing book. With the release of Programming Entity Framework: Code First I knew I’d learn something, so I picked up an electronic copy (PDF) and started digging in.

Read More

Visual Studio 2010 complaints about ELMAH on a 64-bit machine - fixed

  • August 23, 2010
  • James Skemp
My laptop has quickly become my development machine for smaller projects, especially after I purchased a low-end desktop to host the Subversion repositories. I recently added ELMAH support to one of my sites, but since I run 64-bit, and have been using the built-in Cassini for quick development, I started getting a message in Visual Studio 2010 saying "ASP.NET runtime error: Could not load file or assembly 'System.Data.SQLite' or one of its dependencies.

Read More

ASP.NET charts example: Odin Sphere: Part 3 - Creating the chart

  • August 15, 2010
  • James Skemp
In part one of this series we covered what we'd be doing, and what data model we'd be using. In part two of this series we used LINQ to XML to query the XML file with the data we want to display. This time we'll be doing the heavy lifting of actually creating the chart and displaying it to the user. For ease, I'll be implementing very basic caching. Preliminary requirement Before you can use the charting functionality you need to have a reference to System.

Read More

ASP.NET charts example: Odin Sphere: Part 2 - Parsing the XML

  • August 14, 2010
  • James Skemp
In part one of this series we covered what we'd be doing, and what model we'd be using for the data. This time we'll parse the XML file that contains the data we need, and populate the objects. Loading the XML file The XML file we'll be loading is located at http://jamesrskemp.com/files/OdinSphere.xml, and to keep it simple, we'll load it in assuming we're on a different server/domain. First we'll need to add the following so we can make use of XDocument.

Read More

ASP.NET charts example: Odin Sphere: Part 1 - Introduction and model

  • August 13, 2010
  • James Skemp
For a while now I've been meaning to work with ASP.NET 4's built-in charting functionality. While I was going to use it alongside my gas tracking, I think I'm instead going to use my Odin Sphere leveling guide, so I don't have to create an XSLT for the output. In this part of the series I'll outline the data model I'll be using, and preliminary setups. Method So that this can easily be deployed anywhere, I'm going to opt not to use the control itself, but rather programmatically create the charts/graphs.

Read More

Tutorial: ASP.NET (C#) WCF WebHttp service with jQuery: Part 3 - Pulling JSON with jQuery

  • June 25, 2010
  • James Skemp
See the table of contents for more information. In this series we’ve started with a new loan class, that contains information about a loan, including the total amount due, how much is to be paid per payment, the interest rate, and etcetera. A method is available that will generate information about the number of payments required to pay off the loan. In the second part we created a WCF WebHttp service, or a WCF REST service, to use the class/assembly from that loan object and return XML data for GET requests.

Read More

Tutorial: ASP.NET (C#) WCF WebHttp service with jQuery: Part 2 - WCF WebHttp service

  • June 24, 2010
  • James Skemp
See the table of contents for more information. In the last part we created a Loan object, that we determined we would later use to power our Web service. Ths object has a handful of properties and a method to update a list of payments to bring the loan to $0. This time we’re going to create a Web service to respond to requests from data. Requirements As this seems to be built for .

Read More

Tutorial: ASP.NET (C#) WCF WebHttp service with jQuery: Part 1 - Loan object

  • June 22, 2010
  • James Skemp
See the table of contents for more information. As already noted in the table of contents, the end goal will to have a service that returns enough information to be able to generate an amortization schedule for a loan. I’m not in financial services, and haven’t been very good in math since some point in high school, but this seems to work fairly well. The first thing we’re going to do is generate an assembly that we’ll then use in the WCF WebHttp service.

Read More

Tutorial: ASP.NET (C#) WCF WebHttp service with jQuery: Table of Contents

  • June 21, 2010
  • James Skemp
A while ago (a year and a quarter) I created an amortization schedule generator in ASP.NET, as an attempt to help me determine when I could expect to have a loan paid off, depending upon how much money I threw at it. For better or worse, some of the practices I put in place aren't the best, and either way I've been meaning to tweak the interface so that I could do various comparisons.

Read More

RESTful WCF Web services, easily

  • June 15, 2010
  • James Skemp
I know I should know them better so I've been looking into WCF Web services, with a heavy lean towards an implementation based on REST principles. After a good deal of research, where it was highly suggested that while ASP.NET MVC may make sense, WCF is still the way to go for Web services, I stumbled upon WCF WebHttp Services, which uses functionality released in .NET 4. After a painless install via Visual Studio 2010's Extension Manager (more information), and troubleshooting a stupid mistake on my end, I was able to quickly create a Web service that uses an assembly I had created to parse one of my iTunes Playlists to Xml files and return a listing of tracks for a particular artist.

Read More

Dynamically generating a list of videos for OSFLV Player with ASP.NET

  • April 13, 2010
  • James Skemp
I've had this code for a while, but here's some simple code to pull a listing of Flash videos (FLV) from a directory, display them in a drop down, and have a video player dynamically generated based on what's picked. This uses OSFLV Player, version 3 specifically, but can be tweaked for the current (as of this post) version 4.0. Default.aspx <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %> <!DOCTYPE html PUBLIC "

Read More

Connection String encryption (connectionString element) in ASP.NET

  • February 1, 2010
  • James Skemp
From what I've been able to determine, setting up an ODBC connection in Windows and using that for ASP.NET generally seems to be frowned upon. Instead, ASP.NET uses a Web.config file to store a number of settings, including all the connection strings you'll be using (whether you're using Windows authentication or user names and passwords). For example: <?xml version="1.0"?> <configuration> <appSettings/> <connectionStrings> <add name="TestDatabase001Reader" connectionString="Data Source=192.168.56.102,1433;Initial Catalog=TestingDatabase001;User Id=DataReader;Password=DataReader" providerName="System.Data.SqlClient"/> </connectionStrings> <system.web> .

Read More

Simple Journal 1.0 Released

  • January 3, 2010
  • James Skemp
Version 1.0 of Simple Journal is now available for download. Simple Journal is meant to be exactly that; a very simple way to keep track of a journal. Simple Journal uses XML files to store entries, which are edited in HTML (uses TinyMCE for the WYSIWYG editor) and which allow supplementation and later updates. Download Simple Journal 1.0. To use Simple Journal extract the contents of the zip file to a directory and start _startCassini.

Read More

BlogEngine.NET running on Cassini Personal Web Server

  • November 12, 2009
  • James Skemp
While Cassini is a built-in Web server part of Microsoft Visual Studio, it's also available as a stand-alone application, thanks to the work of Dmitry Robsman. The current version can be downloaded from this post regarding version 3.5.0.2 but requires that you first build the solution (the code is available under a MS-PL license). Cassini++ is also available from Codeplex, and has GUI improvements, among other changes (but is based on an older 3.

Read More

Using SQLite as a membership, profile, and role provider in ASP.NET MVC

  • October 25, 2009
  • James Skemp
I'd really like to implement membership providers in my Web applications, but just don't have the user-base that requires SQL Server (Express), nor the memory on my production server. Having looked at SQLite before, I figured it would be exactly what I'd need, without going to the alternative of XML. After some research I found Roger Martin's SQLite Membership, Role, and Profile Providers, and finally decided yesterday to implement these on a dummy MVC site.

Read More

Review: Professional ASP.NET MVC 1.0

  • October 18, 2009
  • James Skemp
The following is a review of Professional ASP.NET MVC 1.0, written by Rob Conery, Scott Hanselman, Phil Haack, and Scott Guthrie. I received a free copy of this book for review purposes from Amazon Vine, but was planning on purchasing the book nonetheless (I just had the good fortune to get a copy before they were all taken). A great introduction to ASP.NET MVC Professional ASP.NET MVC 1.0 was my first real look at ASP.

Read More