Fix for “BIOS Command Limit Reached” error!

No Comments »

Today I opened a web project from a mapped drive (my working directory is on a server that I access via this mapped drive) and had the following error thrown in my face when I tried to run it:

Failed to start monitoring changes to ‘web.config’ because the network BIOS command limit has been reached. For more information on this error, please refer to Microsoft knowledge base article 810886. Hosting on a UNC share is not supported for the Windows XP Platform.

We still run Windows XP at work, and I’ve ran into this problem before (as many other people have), but this time I found a good fix for this issue.

The first half of that blog entry was of no use to me, but the second half was perfect! I chose to set the registry key HKLM\Software\Microsoft\ASP.NET\FCNMode to a value of 2 which causes the application to create one object to monitor the directory and will reuse this same object to monitor all sub-directories.

The fix originally came from Microsoft Support in 911272.

Friend List

3 Comments »

When I was in Junior High and High School there was a girl in our class that would keep a list (on paper, in her backpack) of who were her friends, and who she didn’t like. Everyone in the class thought she was dumb and made fun of her for it.

Little did we know, she was a visionary. Now, over 300,000,000 people do it worldwide and we call it Facebook. Who would have thought?

My problem with Foo foo;

No Comments »

No, I don’t have a problem with Little Bunny Foo Foo. What I’m referring to is a type of coding style where the developer makes a declaration like the following:

Foo foo = new Foo();

Now, I’m not saying this is always bad, but I think we tend to shut our brains off when we write code like this. We don’t take time to come up with a meaningful name that will make sense to the next guy to see it. It’s kind of the same thing as using i in a for loop. Why not name the variable “customerIndex” or something like that.

I’m guilty of writing code like this too. You can probably find it scattered all throughout my code. But when I slow down and ask myself “is there another name that makes more sense?” I usually end up with a better variable name, which leads to more natual and readable code.
Something to think about.

Who are you comparing yourself to?

No Comments »
I just read Seth Godin’s latest blog entry, and I thought it was very good.

Regardless, it’s better than we have been taught we should deserve. Jerry the general manager explained why in the simple quote that leads this post off. He’s busy comparing the place to other restaurants, not to other airports. Seth Godin

It’s a short post. You should really read it. I’m primarily relating this to the software development world, but really it applies to everyone. Who do you compare yourself too? If you own or manage a business, what other business do you compare yours with?

If you own a 5 star restaurant and start comparing yourself to the corner diner that’s 3 blocks away, you’re not going to be a 5-star restaurant for long. The same applies to software developers. If we’re constantly comparing ourselves to the guy who can tell you what every acronym means, but couldn’t write a functional application to save his life, then we not only won’t become any better, but we will probably start to head in that direction as well.

I think we should all make a conscious effort to compare ourselves to someone at the top of our field. If we all did that, I think we’d have a lot more superstar developers out there.

Finite State Machine Research Paper

No Comments »

I’m putting this here more as a bookmark for myself because I’ve been reading a lot about Finite State Machine implementation lately for a project I’m beginning to start on (a rewrite of an existing application).

This PDF is a pretty good source of information, and it is well written: On The Implementation of Finite State Machines.
Enjoy.

Sandcastle and Visual Studio 2005 SDK

No Comments »

I just ran into an annoying little problem with Sandcastle Help File Builder. I was getting a build error that said the version of Sandcastle that I had is out of date.

After a little research I determined that Visual Studio 2005 SDK was causing the problem. I’ve installed it since the last time I built a help file, so it makes sense. The fix is to set the SandcastlePath property on your Sandcastle project to the correct path: C:\Program Files\Sandcastle.

Apparently the Visual Studio 2005 SDK includes v1.0.0.0 of Sandcastle, and somehow SHFB uses that version instead of the one installed manually.

This is where I found the answer: http://shfb.codeplex.com/Thread/View.aspx?ThreadId=10817&ANCHOR
Hope this helps.

Facebox

No Comments »

Yesterday I was needing to popup a user input form above a web page to collect some information from the user, and as I was deciding how I wanted to do it, I recalled something I had ran across some time ago: Facebox by FamSpam. I’ve only just started using it, but I’m very pleased. It works perfectly in all browsers and integrates nicely into jQuery.

I obviously still have a little styling to do there, but this is just a mockup I made to see it in action.
Thanks to the guys at FamSpam for making the code freely available. I really love to see businesses adding quality code to the open-source world.
You can read the page on FamSpam about the component with code samples and examples here, and you can get the source from GitHub.

VS 2010 Project Upgrade Problem

No Comments »

I’ve been using Visual Studio 2010 Beta 1 for a few weeks now, but only on a new project. I just did my first upgrade from 2008. I hate to say, it didn’t go perfectly smooth. However, it was easy to fix once I found the solution.

There were four projects in the solution file, and three of them upgrading without a problem, but one had an issue every time I tried it. I kept getting a dialog that said “The C# project ‘Kiosk’ is targeting ‘.NETFramework, Version=v4.0, Profile=Full”, which is not installed on this machine. You must download this framework, as well as .NET Framework 3.5, in order to open and build this project.

I could not figure out how to make it work, so I went searching. After trying a few different queries I finally stumbled upon a Microsoft Connect report on this issue. Two minutes later I was up and running.

The problem: the upgrade wizard leaves a node in the project file called TargetFrameworkSubset with a value of full.

This node is no longer supported in 2010 (especially not with a value of Full) so 2010 threw up. I simply opened the project file in notepad++ and removed this node. After saving the change, I reloaded the project in Visual Studio and everything worked perfectly.

This is a Beta product, so I can’t complain. I think Microsoft has done a very good job with 2010, and I’m looking forward to using the RTM.

typeof(MyClass) vs this.GetType()

No Comments »

I just spent about twenty minutes trying to figure out why I wasn’t able to load my embedded javascript file into my web application. I kept getting the following error:

[HttpException]: This is an invalid webresource request.
at System.Web.Handlers.AssemblyResourceLoader.System.Web.IHttpHandler.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

This is the line of code I was using to get the URL for the embedded resource:

string scriptLocation = Page.ClientScript.GetWebResourceUrl(this.GetType(), “Common.Javascript.jQuery.js”);

This line of code worked perfectly in another place, so I was very confused. Then I realized that this code was in a base class in the common library, and GetType() was returning the type of the derived class which is not part of the common library. It was trying to get the resource from another assembly and couldn’t find it.

I changed the line to use typeof(BaseClass) and it works just fine!

It’s the little things that get you.

Path to Machine.Config file

No Comments »

I’m working on a custom action for an installer to modify the machine.config file and quickly ran into the issue of determining the location of said file. This seems to be the best (most fool proof) way to locate the file: RuntimeEnvironment.SystemConfigurationFile.

I just wanted to share that little gem because it might help some other people out. More posts to come about the custom action I’m working on.