Skip to main content

Posts

Enable directory browsing for IIS 8 Server Express

Visual Studio Express 2012 for Web Update 3 comes with IIS 8 Server Express. By default, the server is configured not to list directory contents for security reasons. But since I am using it for development purposes, security is not my main concern but speed of development. When trying to browse a directory, you may get this error message: HTTP Error 403.14 - Forbidden The Web server is configured to not list the contents of this directory. To enable browsing do: Open console (cmd.exe) Change directory to C:\Program Files\IIS Express Type appcmd set config /section:system.webServer/directo ryBrowse /enabled:true to enable browsing.

VirtualBox paravirtualized network adapter driver

From VirtualBox manual, paravirtualized network adapter provides the best performance. To get this interface from working within VirtualBox, you need to download the drivers separately/manually. Note that Windows driver online update utility does not have it as well. Since driver is open source it can be found in few locations. A good source is from Red Hat, download it from this location  http://alt.fedoraproject.org/pub/alt/virtio-win/latest/images/ . Download virtio-win*.iso, mount it and install driver for your OS.

VBA: Using FileSystemObject to create a file

Sample code to create a file in VBA using FileSystemObject which is part of Microsoft Scripting Runtime. See this link on how to reference MSR. Option Explicit Sub TestMe() Dim fs As FileSystemObject Dim ts As TextStream Set fs = New FileSystemObject Set ts = fs.CreateTextFile("C:\tmp\file.txt", True) ts.WriteLine "Header1, Header2" ts.WriteLine "1," & CStr(DateTime.Now) ts.Close Set ts = Nothing Set fs = Nothing End Sub

Referencing Microsoft Scripting Runtime for FileSystemObject class in VBA IDE

From Visual Basic for Applications IDE, do Tools | References... then look for Microsoft Scripting Runtime or browse for C:\Windows\System32\scrrun.dll. Microsoft  Scripting Runtime provides the following classes: Dictionary Drive Drives Encoder File Files FileSystemObject Folder Folders TextStream