Archive for the ‘Software’ Category

Unable to Create Virtual Directory in VS2008 and Windows 7

When developing C# Web applications in Visual Studio 2008 on Windows 7, I usually disable Visual Studio Development Server and setup directly with the Local IIS Web server. However, I run into the following error message.

Unable to create the virtual directory. To access local IIS Web sites, you must install the following IIS components:

IIS 6 Metabase and IIS 6 Configuration Compatibility
ASP.NET
Windows Authentication

In addition, you must run Visual Studio in the context of an administrator account.

For more information, press F1.

Simply following the steps as specified in the error window fixes the issue. This can be accomplished by making the four required changes:

  1. Search for the application ‘Turn Windows features on or off’ by searching for it from the Start Menu or find it in the Control Panel. A window called ‘Windows Features’ will open.
  2. To turn on ‘IIS 6 Metabase and IIS 6 Configuration Compatibility’, navigate to: Internet Information Services > Web Management Tools > IIS 6 Management Compatibility > IIS 6 Metabase and IIS 6 Configuration Compatibility. Check the final checkbox.
  3. To turn on ‘ASP.NET’, navigate to: Internet Information Services > World Wide Web Services > Application Development Features > ASP.NET. Check the final checkbox.
  4. To turn on ‘Windows Authentication’, navigate to: Internet Information Services > World Wide Web Services > Security > Windows Authentication. Check the final checkbox.
  5. Click the OK button on the Windows Features window and wait for the installation to finish. A restart of Windows is not necessary.
  6. To run Visual Studio in the context of an administrator account, close all instances of Visual Studio 2008. Find the Visual Studio 2008 application icon. Right click and select Run as administrator.
  7. When Visual Studio 2008 loads, try setting and apply the Use Local IIS Web server setting.

At this point, the error message will not appear anymore and your application will run on your local IIS Web server.

Visual Studio 2008 – Missing Server Explorer

In the past year, one way or another, my Server Explorer tab in Visual Studio 2008 had disappeared. My main use of the tab was to access Microsoft Sql Server tables. I had tried a variety of things in the past in a quick effort to fix the problem. I was unable to find a suitable solution. Now, with a quick command, the problem is fixed. Try:

  1. Close all instances of Visual Studio.
  2. In All Programs > Microsoft Visual Studio 2008 > Visual Studio Tools folder, open the application Visual Studio 2008 Command Prompt
  3. Next, type in devenv /resetskippkgs at the command prompt.

On the next reload of Visual Studio 2008, the problem is fixed. Visual Studio 2003 and 2010 should both have their version of Command Prompts that can be used to fixed similar problems. Good luck!

Setting up NFS on RHEL

What I’ve recently learned is how to use NFS to share folders between two Red Hat Enterprise Linux 5 machines. They are both on the same network and for simplicity have had firewall disabled (firewall settings were not required in my setup). Below are some tips I used on each of the respective machines in no particular order. Additionally, all steps were performed using the root login.

Machine A (contains file to share)

  1. Make sure NFS service is running. You can do this by typing ps aux | grep nfs in the terminal.
  2. To start the NFS service, type /etc/rc.d/init.d/nfs start or /etc/rc.d/init.d/nfs restart in the terminal.
  3. If you want the NFS service to start automatically at boot up, add /etc/rc.d/init.d/nfs start or /etc/rc.d/init.d/nfs restart to the /etc/rc.d/rc.local file.
  4. Next, we need to specify the share specifics. This involves specifying the folder path, the remote machine (Machine B), and the share permissions. The information goes into /etc/exports. Use the following format: /mnt/shareThisFolder machineBName(ro). After updating the file, make sure to restart the NFS service (#3 above).

Machine B (wants access to remote files)

  1. We need to mount the folder we shared earlier on Machine A. The changes go into /etc/fstab file. We need the remote machine name, remote filepath (should be same as the earlier specified location), local filepath. Use for the following format: machineAName:/mnt/shareThisFolder /mnt/filesFromMachineA nfs rsize=8192, wsize=8192,timeo=14,intr 0 0. After saving the file, type mount -a in the terminal to start the share.

Troubleshooting:

  1. Some issues I kept running into was mount failed XXXXXXXX, reason given by server permission denied. This happened to me because though I had started the NFS service on Machine A, I had failed to specify the folder to share. After adding those details (and restarting the NFS service), I was able to mount from Machine B.
  2. NFS has been working for a few weeks, but has suddenly stopped working. The host computer had been rebooted. The solution is to run the following under the root account in this order:/etc/rc.d/init.d/nfslock restart
    /etc/rc.d/init.d/portmap restart
    /etc/rc.d/init.d/nfs restart

    Make sure none of the operations failed, then try remounting. A more long term solution to this is to insure that nfslock, portmap, and nfs autostart during RHEL bootup. Type /usr/sbin/ntsysv from the terminal and make sure those three are checked!