Posts

Missing Operating System error on HP server after installing video card

This has caused me quite a lot of grief before, even to having to format the server indavertently. Looks like if the server has an NVIDIA motherboard and you plug in a ATI video card then for some weird reason the BIOS setting for RAID gets reset. It tries to boot from the individual hard disk instead of the virtual RAID volume and throws this error. Simply, go back into the BIOS settings and enable RAID again, and it will boot properly. Go figure! Btb this video card is weird. In VGA it gives a resolution of 1280 X 1024, but in DVI mode, only 1024X 768. Could be a monitor limitation too, as I had never before seen this monitor give me this resolution.

C# enum gotcha!

If you define an enum with the Flags attribute, you expect that when you do an "&" operation with an enum value, you will get back the enum value you are "&" with, only if it contains within the value. Wrong! If you have a enum value with its numeric value set to "0", and you do: value & zeroValue == zeroValue You will always get zeroValue back, even if the actual enum value never had the zero value specified!!

Essential settings for working over RDP

http://social.technet.microsoft.com/Forums/eu/winserverTS/thread/460c8059-4be4-4147-b0b2-907d017cd0b4 If like me, you use remote desktop extensively, and have multiple monitors, etc - you need to read this. I RDP from a RDP session, and now the quality of my RDP session is noticeably better than what was previous. Like the monitor is directly connected to the DVI on the remote server. However, if you do crank up the settings, you will need a gigabit switch between the servers you RDP into. I have one between my server, laptop and desktop. Substitute Remote Desktop Services under the Windows Components tab if you are using server 2008 r2 Enjoy!

Shocker! - Do not use Environment.MachineName

I first found this article after I got an issue:  http://blogs.msdn.com/b/brada/archive/2005/08/10/449767.aspx Let me go around to clarifying this further, and how I re-verified this issue http://msdn.microsoft.com/en-us/library/system.environment.machinename.aspx MSDN clarifies that this is NETBIOS name. http://en.wikipedia.org/wiki/NetBIOS Wikipedia clarifies that NETBIOS name has 16 characters, but Microsoft uses only 15 characters for the same. http://msdn.microsoft.com/en-us/library/system.net.dns.gethostname.aspx This is what should be used.

Living with Windows Driver woes

One of my colleagues used to work for MS before and his job was to look at the windows crash logs and determine what went wrong. Most of the time, he used to find out that it was a problem with the processor or the drivers for some hardware components. As anyone who has ever tried to host servers by themselves know, it is critical to keep them updated so that the PC works fine. Especially when developers like us install 2008 R2 on a laptop and sometimes not all the drivers get installed properly. Windows Update does not always show missing or out of date drivers. Do the following which might surprise you: 1) Go to http://www.driverdetective.org/  and install their software. Do not install Norton with it. 2) Scan your laptop/ desktop/ server. 3) In most cases you will find some drivers out of date or not even installed. I saw this with a brand new server from Dell which did not have the chipset drivers installed. Once you find what is out of date or missing, it is easy t...

Using Visual Studio Remote Debugger between servers in different domains

Sometimes, you might want to use the visual studio remote debugger between 2 servers - one in the domain, and the other outside it. Usually, if you try to do this, it will error out saying that the machine outside the domain cannot connect to your machine. Even if you try to put the credentials in the control panel - users area it will still not work. Well, you know that the remote debugger itself has an option for debugging without authentication. What I did not know was that Visual Studio 2010 SP1 can also debug without authentication. Just open the top combo box to see another option, if you select it, it will now let you debug, although note that this is not secure, so use this warily. Remember to first go to the server where you want to debug and open the remote debugger > Tools > Options > No Authentication, and Allow any user to debug. Then select transport as Remote (Native only with no authentication) in VS and the qualifier is the remote server name. The ...

Keeping your original WCF config file and making it run in Azure as a worker role

If you get 405 errors while trying to access the WCF service with GET enabled in the config file, note that you will need to modify the config file behaviors area right next to where you enable httpget to the DNS name of the azure deployment: x.cloudapp.net Otherwise, no matter what you do, you will not be able to get the browser to access the WCF URL. This is when you have HTTP end points for the WCF service with internal endpoint of azure. if  (!InAzureCloud && !InAzureEnvironment) {  return ; } RoleInstanceEndpoint externalEndPoint =  RoleEnvironment .CurrentRoleInstance.InstanceEndpoints[ "EndPoint" ]; Configuration  appConfig =  ConfigurationManager .OpenExeConfiguration( ConfigurationUserLevel .None); ServiceModelSectionGroup serviceModel =  ServiceModelSectionGroup .GetSectionGroup(appConfig); ServicesSection servicesSection = serviceModel.Services;       ...