Feb
03
2013

Generating XML with Linq To XML

I will be using the infamous Northwind database to grab a list of customers and create an XML file using Linq to XML. First, we need our database context for the Northwind database. NorthwindEntities _db = new NorthwindEntities(); Next,... Read more
Jan
20
2013

Implementing CKEditor on ASP.NET MVC 4

I needed to implement CKEditor for one of the website that we’re working on. Below are the steps that I’ve taken. (CKeditor can be added to your project through NuGet) -Layout.cshtml @Scripts.Render("~/Scripts/ckeditor/ckeditor.js") I placed the javascript code at the... Read more
Jan
20
2013

Error 403 after publishing ASP.NET MVC 4 application on arvixe server.

I recently had arvixe upgrade the server where my domain lives to .NET 4.5. After publishing my website I kept getting a 403 error. After changing my web.config file to remove UrlRoutingHandler, it worked perfectly. <system.webServer> <modules runAllManagedModulesForAllRequests="true"></modules> <validation... Read more
Jan
20
2013

SimpleMembershipAdministration for ASP.NET4

ASP.NET now uses a SimpleMembership Provider for use with ASP.NET MVC4 sites. I had a hard time at first trying to wrap my head around the new changes. You can longer use the built in website administration tool in... Read more
Jan
19
2013

SimpleMembership ASP.NET MVC 4

My development playground is hosted with Arvixe. With Arvixe, you cannot use a connection string like the one below: <add name="DefaultConnection" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-qkgp-20130117172441;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnet-20130117172441.mdf" providerName="System.Data.SqlClient" /> You need to create a backup of the MDF file and restore it... Read more
Jan
18
2013

ASP.NET MVC C# – Truncate a string.

On one of the website I’m working on, I needed to implement a function that would truncate articles and display a ‘continue reading’ link. Much like you see on thousands of blogs. I wrote this function and added it... Read more
Jan
13
2013

The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid

If you receive this error, “The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid” It’s most likely because you have multiple solutions within your project.... Read more
Jan
12
2013

Could not find stored procedure ‘dbo.aspnet_CheckSchemaVersion’

This is mainly a personal reminder for me… Whenever you receive this error message, make sure you run aspnet_regsql.exe Enter the name of the server, database, username and password. Then modify your connection string in web.config to look like... Read more
Jan
10
2013

Reading excel data with C# and creating XML

*note* I still need to do the write up. Below our the screen shots and code.   Below is our demo excel sheet… Read more
Jan
09
2013

Dependency Injection with Ninject

Pleas read the following reference if you do not know what the Dependency Injection pattern is. http://msdn.microsoft.com/en-us/gg618491 Here are the basics of how I know to setup dependency injection for an ASP.NET MVC 3 application. Read more