I tried to fire up my original Windows Home Server (WHS) machine but one of the drives was failing and the system wouldn't boot due to file corruption.
So I built a new box running WHS2011 which I was able to buy for $50 at the local computer parts store. That version is basically a flavor of Windows Server and even has IIS installed so its great for a home development box for whatever projects you have.
Unfortunately, upgrading wasn't simple. The new connector software complained there was already a version of the connector installed. The version installed didn't want to uninstall.
I tried to manually delete the files and some registry entries but the new connector still complained. Additionally, it caused my active window to lose focus because an installer was trying to load up constantly.
After a few hours I figured it all out. I went through every entry in the registry with "Windows Home Server" and deleted it. This made the connector installer work, but it would fail part way through and rollback.
I found a Microsoft KB article about a service needing to be enabled and at least set to manual if not started. The name escapes me but it was Media Center related. As it turned out I deleted some registry entries for WHS related to Media Center thinking the new connector install would replace them.
To fix this issue I went to Programs & Features and uninstalled all the "Media Features" which required a reboot then installed them again. Then the new connector installed no problems and everything works great.
Suggestions that might help you circumvent these issues:
1. Create a restore point on your system and save backups of the registry.
2. Uninstall the old WHS connector while your old server is still running or before upgrading the software. I think part of the uninstall issue might have been the uninstaller trying to remove the user from the WHS machine and couldn't because mine was offline.
3. Try using a different uninstall program like CCleaner.
Sunday, February 2, 2014
Wednesday, January 15, 2014
WCF Service Response Time Slow?
Recently ran into an issue testing a WCF web service deployed on a server. A call to a very light service was taking upwards of 15 seconds to return a response.
The service had logging which revealed the call into the service until a response was returned was a fraction of a second.
I decided to do a Fiddler2 trace against a test program to see what was happening and suddenly the service was returning nearly instantly. I continued to test and everything looked fine. I then closed Fiddler2 and then the slow response time returned!
What I ultimately discovered was Fiddler was un-checking the "Automatically Detect Settings" on the Internet Options. This can be found under Control Panel\Network and Internet\Internet Options\Connections\LAN Settings. That setting was apparently set as part of the configuration of my work machine. So that was what was causing the slowness.
I later recalled you can fix this in your WCF bindings by setting useDefaultWebProxy to "false" which ignores this setting.
The service had logging which revealed the call into the service until a response was returned was a fraction of a second.
I decided to do a Fiddler2 trace against a test program to see what was happening and suddenly the service was returning nearly instantly. I continued to test and everything looked fine. I then closed Fiddler2 and then the slow response time returned!
What I ultimately discovered was Fiddler was un-checking the "Automatically Detect Settings" on the Internet Options. This can be found under Control Panel\Network and Internet\Internet Options\Connections\LAN Settings. That setting was apparently set as part of the configuration of my work machine. So that was what was causing the slowness.
I later recalled you can fix this in your WCF bindings by setting useDefaultWebProxy to "false" which ignores this setting.
Tuesday, December 31, 2013
Raspberry Pi -- First Impressions
Overview
I recently purchased a Raspberry Pi board to play around with its capabilities. I've used the Arduino boards before and I think they serve a purpose but I wanted something with a little more horsepower that could run apps as well.
Setup
When the Pi arrived I had some initial problems but nothing too major. When I plugged in the Pi nothing happened even with the SD card installed. I was confused on this and there was no clear answers online.
It turns out that the installer I downloaded for Fedora Remix was old and I ended up having to download the new installer and newest builder of Fedora Remix. The newly installed image worked great and the Pi started right up.
I was impressed as well that a Gear Head USB keyboard and a USB mouse I had laying around worked instantly without any setup. It launched me into the GUI (Xfce) and walked me thought some basic install steps.
Impressions
Running via the GUI is a little sluggish. I found that browsing the web was a little slower than I would have preferred. I'm not sure if overclocking from 700mhz to 1Ghz will make a big difference in that regard or not.
I wanted to see if the Pi could render video and attempted to launch some type of streaming video. Netflix didn't work through Midori. Amazon wanted to download the Flash player which I started to do but didn't seem to finish. I will investigate these more. I will also attempt to run YouTue.
Next Steps
I want to try and get Spotify to stream from the Pi along with testing the GPIO. I'll see if I can get Netflix or Amazon Instant Video to run and see if it runs well. Eventually as well I want to use this to stream media from other computers in my household.
I recently purchased a Raspberry Pi board to play around with its capabilities. I've used the Arduino boards before and I think they serve a purpose but I wanted something with a little more horsepower that could run apps as well.
Setup
When the Pi arrived I had some initial problems but nothing too major. When I plugged in the Pi nothing happened even with the SD card installed. I was confused on this and there was no clear answers online.
It turns out that the installer I downloaded for Fedora Remix was old and I ended up having to download the new installer and newest builder of Fedora Remix. The newly installed image worked great and the Pi started right up.
I was impressed as well that a Gear Head USB keyboard and a USB mouse I had laying around worked instantly without any setup. It launched me into the GUI (Xfce) and walked me thought some basic install steps.
Impressions
Running via the GUI is a little sluggish. I found that browsing the web was a little slower than I would have preferred. I'm not sure if overclocking from 700mhz to 1Ghz will make a big difference in that regard or not.
I wanted to see if the Pi could render video and attempted to launch some type of streaming video. Netflix didn't work through Midori. Amazon wanted to download the Flash player which I started to do but didn't seem to finish. I will investigate these more. I will also attempt to run YouTue.
Next Steps
I want to try and get Spotify to stream from the Pi along with testing the GPIO. I'll see if I can get Netflix or Amazon Instant Video to run and see if it runs well. Eventually as well I want to use this to stream media from other computers in my household.
Friday, October 25, 2013
Card Shuffling
I was playing around with building a card game engine and ran across something interesting. My solution as I found all over the internet was to use Random() to generate a random number and use that to "order" the list (array) representing the deck.
My "test" game was basically high card where each player had a deck and drew a card. The person with the highest card won the hand. As I ran the test either Player 1 won or the game was a draw. Player 2 never won.
As it turns out Random is not very good at generating random numbers. It uses a fixed algorithm such that the result are very predictable. Also, it is an expensive operation as it is not very efficient.
A sort is actually a better solution and using sometime to generate random unique values works better. I don't take credit for this code but here is an example of the better implementation:
var cards = Enumerable.Range(0, 51);
var shuffledcards = cards.OrderBy(a => Guid.NewGuid());
My "test" game was basically high card where each player had a deck and drew a card. The person with the highest card won the hand. As I ran the test either Player 1 won or the game was a draw. Player 2 never won.
As it turns out Random is not very good at generating random numbers. It uses a fixed algorithm such that the result are very predictable. Also, it is an expensive operation as it is not very efficient.
A sort is actually a better solution and using sometime to generate random unique values works better. I don't take credit for this code but here is an example of the better implementation:
var cards = Enumerable.Range(0, 51);
var shuffledcards = cards.OrderBy(a => Guid.NewGuid());
Monday, September 23, 2013
WebBrowser Control: Password Field Won't Populate
I ran into this issue between version of IE. On IE10 on a password field using the WebBrower's SetAttribute method works to set the "Value" field of a password field. This does not work on IE 8 or 9. Instead, you have to use the "InnerText" attribute. To make sure 10 still works I have to set both the Value in addition to the InnerText value for the older browsers.
Friday, January 18, 2013
Using Silverlight Toolkits
Quick tip: When using the Silverlight Toolkits keep in mind they typically target a specific version of Silverlight.
I recently installed Silverlight 5 and the Silverlight 5 toolkit. I added a reference to a v5 component and it appeared in my designer but my code behind gave an error it couldn't find the reference to the control.
As it turns out someone else on my team using TFS didn't have Silverlight 5 installed (only 4) and checked in to TFS with the project target as v4. Switching it back to v5 fixed the issue.
So be sure to check the target version if you're having trouble with a control from one of the toolkits!
I recently installed Silverlight 5 and the Silverlight 5 toolkit. I added a reference to a v5 component and it appeared in my designer but my code behind gave an error it couldn't find the reference to the control.
As it turns out someone else on my team using TFS didn't have Silverlight 5 installed (only 4) and checked in to TFS with the project target as v4. Switching it back to v5 fixed the issue.
So be sure to check the target version if you're having trouble with a control from one of the toolkits!
Wednesday, December 5, 2012
Silverlight initalization error
So I was copying and pasting some classes into my Silverlight project and when I ran it gave me a pop-up window saying it couldn't initialize the Silverlight app.
A cursory look revealed that I had accidentally deleted the "ClientBin" folder from my Silverlight web project (remember that there is the client piece and the web piece on SL apps). I added the folder back but the XAP file wasn't there!
I did a search and didn't find the solution for this but I figured it out so I wanted to make it available.
You'll need to go into the project properties (right click on the .WEB project and choose properties). Under the Silverlight Applications tab you will need to add the application.
Click "Add" then choose "use an existing Silverlight project in the solution" and add the SL project into the project.
As part of this it will also recreate the ASPX and HTML page(s) if you accidentally deleted those as well.
The exact message from the browser is: "Error: Unhandled Error in Silverlight Application
Code: 2104 Category: InitializeError Message: Could not download the Silverlight application. Check web server settings".
A cursory look revealed that I had accidentally deleted the "ClientBin" folder from my Silverlight web project (remember that there is the client piece and the web piece on SL apps). I added the folder back but the XAP file wasn't there!
I did a search and didn't find the solution for this but I figured it out so I wanted to make it available.
You'll need to go into the project properties (right click on the .WEB project and choose properties). Under the Silverlight Applications tab you will need to add the application.
Click "Add" then choose "use an existing Silverlight project in the solution" and add the SL project into the project.
As part of this it will also recreate the ASPX and HTML page(s) if you accidentally deleted those as well.
The exact message from the browser is: "Error: Unhandled Error in Silverlight Application
Code: 2104 Category: InitializeError Message: Could not download the Silverlight application. Check web server settings".
Subscribe to:
Posts (Atom)
