Deseret Tech

September 14, 2010

Hosting shared folder from IIS 7 and VirtualBox

Filed under: howto,programming — jeffc @ 10:34 pm

I have a Win7 guest running in VirtualBox. I’m working on a .NET project and got really sick of rebooting for Windows, so after some failed attempts to forward the ports for MSSQL and connect remotely, I have configured the guest to host my whole application while I develop and build in MonoDevelop.

I didn’t want to have to make a commit and push/pull every time I wanted to test, so I configured IIS 7 to use a shared folder from my host. However, conventional \\vboxsvr and VirtualBox shared folders do NOT work; IIS refuses to read the files, even after trying everything in the relevant Microsoft KB articles.

There is probably something wrong or incomplete in the VirtualBox implementation, because if you share the folder via Samba everything works swimmingly. I am using VirtualBox 3.2.8; if you are trying to use VBox’s shared folders to host a folder for IIS, stop now and set it up via Samba. This should solve any lingering difficulty unresolved by the Microsoft articles.

Once you have your share configured via Samba, just make sure that you configure IIS to “Connect as…” the user you’ve configured for Samba with smbpasswd and that you are using a UNC compatible path name (\\server\folder (in case of VirtualBox, this will usually be \\10.0.2.2\folder)), not mapped drive letters like X: because mapped drive letters only exist for the users that mount them (i.e. your main user, not your IIS user).

You may get another security related error, which can be resolved by entering the .NET Framework Configuration Manager and enabling FullTrust for the correct Code Group (I just enabled it for LocalIntranet due to the inherently local nature of the VirtualBox setup on my development box).

This article may help if you are receiving the following errors:

  • “The requested page cannot be accessed because the related configuration data for the page is invalid”: 0×80070003, 0×80070005, etc.
  • Exception Details: System.Security.SecurityException: Security error. PublicKeyToken=b77a5c561934e089

July 17, 2010

Windows 7 font fix

Filed under: howto,software — admin @ 9:03 am

While using Windows 7 one day, I uninstalled a Google program (Google Earth, I think), and then all of my fonts were permanently italic, everywhere. I worked around this by following a tip from another user on a Google help site and installing arial32.exe every time I booted into Windows, which apparently reset something that got removed, but it would only last until the next reboot. That got tiring and didn’t work on everything, so I tried to make the fonts normal again.

I found a font fix for Windows Vista that looked plausible and applied it. Well, that didn’t go over well. All of my fonts were now broken, and I just got little squares and weird things. After trying to trawl through the registry and undo the fix I’d applied, I settled that I would need to do a repair installation.

So I put in the install disc, rebooted, and found out that at least on my disc, you can’t really do a repair installation. That was a waste of time and really lame. Do other Win 7 discs lack a repair install?

I tried to install PowerPoint Viewer because someone said that it contained all default Windows fonts. I’d hoped it would restore the registry keys. It didn’t. If you have deleted your actual fonts, this still might help, but it won’t fix registry problems.

Then the idea came to me that I had a Win 7 install in a virtual machine, and that I could grab the font keys from there and hopefully that would undo the big evil Vista fix as well as the italics problem. I exported the keys from the VM and applied on the native install, and it worked! :D

I’m attaching the registry fixes to this. If any of you have these problems with a Windows 7 install, remove:

  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontMapper\FamilyDefaults
  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Fonts
  • HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontSubstitutes

and then apply win7_font_fix, which will restore Windows’s default font settings and fix things like permanent italics.

Of course, you should make always make a backup before you change the registry and I claim no responsibility for damage this fix may cause. This fix is not supported. Use it at your own risk. I hope it helps some people.

Once again, the link for that is win7_font_fix.

March 21, 2010

Add player stats to scoreboard in sauerbraten/cube2

Filed under: howto,software — jeffc @ 12:51 am

We all like sauerbraten, but I wanted a persistent look at my stats as I played. As such, I have written the following patch to display relevant info. Thanks to #sauerbraten for help.

This works against stable, “Trooper Edition”. There is a patch for SVN floating around out there somewhere, which includes flags captured as SVN has that variable implemented and I didn’t feel like backporting it. Hopefully there will be a release soon and it will be moot.

So, just apply this from sauerbraten/, not sauerbraten/src.

Patch redacted Sept. 2010; please see http://github.com/sjuxax/cube2-stable

February 3, 2010

python-ldap “expected a string in the list”

Filed under: howto,programming — jeffc @ 6:14 pm

This error is given by python-ldap on Python 2.x on certain operations when it receives unicode objects where it expects a str object. Make sure any strings you pass into python-ldap are string type, not unicode type, and this problem will go away.  :)

September 28, 2009

Removing Adobe Drive CS4 in Windows

Filed under: howto,whining — jeffc @ 8:53 pm

So, after sitting around for more than an hour waiting for Adobe’s indecently bloated CS4 installer to finish installing Photoshop and Flash, I right-click on a file, and am rewarded with a lovely little “Adobe Drive CS4″ context option. I definitely didn’t want this, and I’m upset that when all I asked for was Flash and Photoshop two new Adobe submenus appear on my Start list, one containing only “Adobe Media Player” and another containing nine items, only two of which I asked for, plus another top-level icon for “Acrobat.com”, so Adobe sucks.

Anyway, it seems that the recommended method to remove Adobe Drive CS4 from the context menu is to open the installer and uninstall it (funny that I wasn’t asked about this the first time), but if you’re running Windows in a virtualized guest like me and don’t want to wait the ten minutes it takes Adobe to “[check your system profile]” and “[Load] Setup”, remove these two registry keys:

HKEY_CLASSES_ROOT\AllFilesystemObjects\shellex\ContextMenuHandlers\{C95FFEAE-A32E-4122-A5C4-49B5BFB69795}
HKEY_CLASSES_ROOT\Directory\Background\shellex\ContextMenuHandlers\{C95FFEAE-A32E-4122-A5C4-49B5BFB69795}

and you should be freed from offending entry.

Alas, Adobe Drive CS4 is still sitting around somewhere sucking up space uselessly, but we’ll leave well enough alone for now.

Powered by WordPress