All posts by Cerveser

Run Perl under IIS

In earlier versions of ActivePerl you had to configure IIS yourself. The newer version comes with a “ap-iis-config.bat” file to configure IIS automatically.

To install Perl on a Windows 8.1 machine with IIS8.5:

  1. Download latest version on: ActiveState.com.
    I’ve used the Perl 5.20.1.2000 64-bit version for windows
  2. Run the installation and use the default C:\Perl64 folder.
  3. Run Command Prompt (admin) under Windows start (Windows-key + x) and go to: C:\Perl64\bin
  4. run “ap-iis-config.bat” to make IIS8.5 Perl compatible
  5. run “iisreset” to reset IIS and Perl is now active.

To make sure Perl is active you can go to IIS and click on the Handler Mappings feature. There you should find the Perl CGI for .pl handler with these settings:

IIS_and_perl_cgi

Some users get this error message while running the ap-iis-config.bat file:
Use of uninitialized value $path in -f at ap-iis-config line 358.
The installation still seems to work though.

Using the MySQLProfileProvider

The ASP.NET MembershipProvider is also available for the MySQL database.

The Membership Provider doesn’t come with much fields for profile information, like firstname and surname. A shortcut to implement the name would be to use the “Comment” field instead. If you don’t use the comments off course.

An other way to expand the profile of a user is to use the MySQLProfileProvider. You just add the extra columns in the web config.

<profile enabled="true" defaultProvider="MySQLProfileProvider" inherits="UserProfile">
      <providers>
        <clear />
        <add name="MySQLProfileProvider"
             type="MySql.Web.Profile.MySQLProfileProvider, MySql.Web, Version=6.8.3.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d"
             applicationName="MemberApp"
             description="Profiles"
             connectionStringName="MySqlServer"
             writeExceptionsToEventLog="False"
             autogenerateschema="True" />
      </providers>
      <properties>
        <add name="firstname" />
        <add name="surname" />
      </properties>
    </profile>

This solution doesn’t work with an Empty Web Application, only with website projects in Visual Studio.

An example to extend the user profile with an Empty Web Application can be found on Jon Galloway’s blog and here.

Windows 8.1 chkdsk hangs after reboot

Windows 8.1 seems to hang after running chkdsk. The steps I followed:

Run “chkdsk c: /r” in CMD (admin) the program asks for a system restart:

windows8_chkdsk

After the restart Windows hangs with this message:

Scanning and repairing drive (c:): 10% complete

After waiting for 2 hour suddenly it reboots again and gives the message 100% complete and starts normally. See also this forum for more information.

BBC iPlayer is not working

BBC updated the iPlayer a couple of weeks ago and since than it stopped working. I get a black screen or a white screen, but no streaming.

It turns out that HTTPS Everywhere is responsible for this. The solution is to disable it for the BBC website and try to stream it without the secure connection.

Also make sure that the latest MVPS hosts file is not blocking some bbc.co.uk pages. This is turned on by default.

BBC iPlayer

 

Do I have to replace my laptop SSD

My laptop (Asus Zenbook UX31) of 2 years old is now almost as slow as my old PC from 2008. I suspect it’s my SSD (SanDisk SSD U100 128GB).

Apparently Asus ships it’s laptops with different SSD’s and if you are unlucky you end up with a SanDisk. I went to Best Buy with it, but they will not replace it, because it’s still working  but only very slow.

So how bad is it? I try to figure that one out, but it’s difficult to measure. Sometimes I get good results, sometimes bad. The only tools I have found for this is CrystalDiskInfo and CrystalDiskMark.

Here is the CrystalDiskInfo:

Crystaldiskinfo Sandisk SSD U100As you can see I’ve used a lot of Reads (17TB) and Writes (7,61TB), but the health is still good (88%). The scores for the attribute names are all 100.

And this is the CrystalDiskMark run:

Crystaldiskmark Sandisk SSD U100Especially the writing can be very slow. Copying a lot of files can slow things down compared to one big file.

I’ve also used the SanDisk SSD Toolkit, but that gives the same info as the CrystalDiskInfo. I’ve read that you can reset the SSD, but then you loose all your data on the drive. Since I don’t have a copy of Windows, that’s not an option. The only options I have is to wait till the SSD dies or replace the SSD.

Update (2014-02-26):
Today another slow day for my SSD, maybe it’s the weather:

asus_zenbook_sandisk_crystaldiskmarkFor comparison I’ve added a normal hard drive (Hitachi HDS721050CLA362) which is a year older and has been running for 24417 hours (almost 3 years non stop).

hitachi_crystaldiskmarkThe writing is a lot faster on this one.

Update (2014-10-10):
This summer I finally decided to upgrade the SSD. First I bought a SSD (Samsung Electronics 840 EVO-Series), but that didn’t fit in my laptop.  I found out you need a special mSATA connection for my Asus laptop, which isn’t universal.

I than asked Asus if the slow SSD falls under warranty. They said it would, but they didn’t give me any guaranties on replacing the SSD until they see it themselves. So you need to send the laptop to them for $50 and hope they replace it. I didn’t send the laptop, because they would probably say it still works.

So in the end I still have the same SSD. In the process I formatted and reinstalled Windows 7 professional and it looks the performance of the disk improved with it:   CrystalDiskMark SanDisk SSD U100

Update (2015-08-20):
The slow SSD was an indication that the laptop was slowly falling apart, first the keyboard stopped working and than worse: the screen turned blank. In then end I had to buy a new laptop with a lot better Samsung SSD:

CrystalDiskMark Samsung SSD PM851