Ajax Control Toolkit Not Working?

Hopefully this will save me or someone else hours of frustration in the future.  As I was trying to design a new web page today, I found out I couldn’t drag any of the controls from the Toolbox to the editor in my new project in Visual Studio.  Scratching my head, I scoured the web for answers, and ultimately decided to re-install it according to the instructions found on Microsoft’s AJAX site.  It worked, and then I realized what the problem might have been.  I had performed one of those automatic Visual Studio updates to update the Ajax Control Toolkit or had re-installed a newer version sometime.  It might have been trying to reference the assembly of an older version, or it couldn’t access the .dll which was stored in another project.  But now, you at least have a possible solution to your problem if you are experiencing the same thing!

Installing MongoDB 2.6 and Configuring It as a Windows Service (Windows 8.1)

It took me a few days to figure it out after reading many blog posts that were only helpful in setting up prior versions and appeared to be carbon copies of each other, but I hope my post will prove to be a little more accurate than the others.  Please note these instructions are specific to MongoDB version 2.6 and Windows 8.1, and this is what worked for me.

1. Download the source files from The Official MongoDB website and get the Windows 64-bit zip or msi version.
2. Extract the contents of the zip file or use the msi installer to place the files in C:\MongoDB
3. Create a data directory to store the database data (e.g. C:\MongoDB\data\db).
4. Create a log directory to store the log files (e.g. C:\MongoDB\log).
5. Using Notepad or any text editor, create a configuration file containing the following and save it in C:\MongoDB\mongod.cfg

systemLog:
  destination: file
  path: C:\MongoDB\log\mongo.log
net:
  bindIp: 127.0.0.1
  port: 27017
storage:
  dbPath: C:\MongoDB\data\db
  directoryPerDB: true

If you want to learn more about your configuration options, the official documentation can be found at the MongoDB website.  Note that it is only starting with version 2.6 that you can use YAML markup.  Prior versions use a different syntax.

6. Contrary to what other blog posts tell you and even MongoDB’s official documentation, you cannot install version 2.6 via this syntax:

C:\MongoDB\bin\mongod.exe --config C:\MongoDB\mongod.cfg --install

because of a bug.  I found a work around thanks to this post in the MongoDB User Forum.  You can use Windows’ native sc.exe command to create the Windows service and here’s the exact syntax I used to create it successfully:

sc create MongoDB binPath= "C:\MongoDB\bin\mongod.exe --config=C:\MongoDB\mongod.cfg --service" displayname= "MongoDB 2.6 Standard Server" start= auto

Note that you will need to run this command at the command prompt with a user that has Administrator privileges.  Make sure you right click the command prompt icon and select Run as Administrator if you are launching it from the desktop.  You can remove the service at any time by typing in this command at the command prompt:

sc delete MongoDB

7. To start the service, type this in at the command prompt:

net start MongoDB

To stop the service, type this in at the command prompt:

net stop MongoDB

Or type in services.msc at the command prompt to bring up the Services GUI.

MongoDB Windows Service Screen Shot

You can Start/Stop/Restart the service from here.  If you get an Error 109: The pipe has ended when stopping the service, you can safely ignore it.  It’s just a cosmetic error according to my research on the web, and I noticed that I only get it if I start and stop the service immediately.  I didn’t get the error after the service had been running for a while.  You should also be able to use the same methodology if you’re having problems with other versions of Windows and MongoDB as well.

[Update October 2016] I just wanted to provide an update that these instructions (general guidelines) still work for the latest version, 3.2.10 and Windows 10. Also, if you get the error The service is not responding to the control function, you might want to check the following:

1) The \data\db directory exists and is being pointed to correctly in the configuration file.
2) The \log directory exists and is being pointed to correctly in the configuration file.
3) You do not use sc create to install to a path that has spaces. This is a bug that was brought to my attention on StackOverflow and documented in JIRA. Note: A day later, I discovered this official documentation on MongoDB’s website. I haven’t tested it yet, but you can try escaping the string by adding “\ to encapsulate the spaces in the path if you do want to try to install to a path with spaces (e.g. Program Files).

Welcome to The Troubleshooting Center!

Welcome to my first personal blog site.  I started this site around July of 2013 but didn’t really know how to move forward with it until now.  I’m not a WordPress Expert nor professional blogger (yet), but I hope to make this site a resource to others and learn a lot in the process.  This is my second and “official” attempt at relaunching the site.

Here’s a little bit of my background.  I’ve worked with computers since I was 8 and like it or not, it has become my primary means of making a living.  I’d rather be a writer or musician, but for some reason, it’s what naturally comes to me -> organizing information.  The computing landscape of 1983 is very different from that of 2014.  When I was kid, I was able to write a program in less than 200 lines of code and do everything I needed to on a single personal computer.  I think the advent of the Internet and “The Cloud” changed things dramatically, and I personally find it very difficult to keep up with all the technological changes.

My goal for this site is simple.  I just plan to create user friendly, and I hope, technically accurate How-To articles to share with you.  It helps me out too since I tend to forget things over time.