ALT.NET

FIX: Failed to Generate a User Instance …

I generate my databases on the fly while using Active Record.

Every time I start a new project and fire up the app to auto-gen the SQL Express DB I get this error:

Failed to generate a user instance of SQL Server due to failure in retrieving the user’s local application data path. Please make sure the user has a local user profile on the computer. The connection will be closed.

… and it drives me nuts. I work on a project just long enough to forget what I did to fix that error. I’m going to document it here.

The reason this is happening is because the user instance that I’m running IIS under does not have the proper credentials. You can fix this by creating a new app pool in IIS, and having it run under a user that has the rights to create a db (most likely your own account). What I do is create an AppPool called “PrivilegedAppPool” and have it run under my own account. Then restart IIS and you should be able to create your db on the fly.

Presto. No more errors.

New DimeCast Is Up: Spark Partials Part 1

A new DimeCast is up Working with Partials in Spark: Part 1.

In this episode we are going to take a look at how to use Partials within the Spark View Engine.

We will be taking a first look at partials and learn how we can setup our application to use partials as well as how to use them in your application. We will also be learning how partials will allow us to create clean, compartmentalized and well organized code.

Enjoy!

New DimeCast is Up

I have a new DimeCast up, Learning how to use Named Content Areas with Spark. I cover some basics on the usage of the named content areas as well as how to utilize the named content areas to help organize your content.

Enjoy!

Suspending Resharper 5

For those of you who don’t know, ReSharper is no longer a Visual Studio add-in. Previously if you needed to disable ReSharper for whatever reason you could do so in the Add-In Manager in Visual Studio. You no longer can. Disabling ReSharper is now termed “Suspending” it. You can suspend ReSharper from the Tools > Options > Resharper options window. Press Suspend. ReSharper will now be suspended.

I know, why would I disable ReSharper? Well, at my current client I’m working on a VB.NET ASP.NET Web Forms application which talks to Microsoft CRM through the CRM WebService and LinqToCrm. The web service proxy that gets generated is over 94,000 lines long. Thats 94,000 lines of VB.NET. When ReSharper starts to analyze that file (as well as the other VB.NET files in the app) all hell breaks loose. The IDE locks up and I can’t do a single thing. Therefore I had to suspend ReSharper while working in this project.

Here’s the crux … the only VB.NET project is the Website, all other libraries are C# (thankfully) and I want to use ReSharper. Going through the tools menu each time I need to Suspend/Resume Resharper is a royal PITA. Thankfully ReSharper gave us a key command: Resharper_ToggleSuspend to assist in toggling the suspension of ReSharper. This is not mapped to any key combo by default. What I have done is mapped it to CTRL + ALT + F6. Now when I need to turn ReSharper On/Off when I enter/leave the VB.NET project I hit the key combo and I’m back in action (or out of action in regards to turning it off). Super easy. Booyakasha.

Twin Cities Code Camp 7

This Saturday, Twin Cities Code Camp 7! I’ll be presenting on the awesome ASP.NET MVC and Spark View Engine implementation. Come on down, its free! Don’t forget to register on the Code Camp website. :) See you there.

 

* The text below was shamelessly stolen from Chris G Williams Blog. I couldnt say it any better so I figured I’d copy it :) Thanks Chris:

Just like last year, we’re holding this event at the U of M, so be sure to show up early since parking fills up quickly.

Also, there’s no free lunch this time, but there are LOTS of great places to go eat in the area, and we will be putting together a cash-only Jimmy Johns order for anyone interested. Exact change is appreciated and anything extra will be used as a tip, so break those $20s at Starbucks before you get to Code Camp.

We’ll also have a community table this year, so if you’re interested in the local user group scene, or maybe already a part of it, stop on by and see what’s going on.