Recovering ICH9R RAID to IDE switch after BIOS upgrade

September 11th, 2008

cause two SATA disks in RAID-1 (mirror) configuration using ICH9R on-board controller. after bios upgrade of my Abit IP35 the bios settings got reset and the OS (Windows Server 2008) booted with SATA onboard controller mode IDE instead of RAID.
implications the mirror got broken, but Windows actually booted AND changed the boot record.
errors I changed the mode back to RAID (*BAD IDEA*). Started the Intel Bios and re-joined the mirror (*BAD IDEA^2*). Now Windows didn't start anymore (Boot loader started, but Winload.exe was missing).
why *BAD IDEA*? The Intel controller chose the wrong disc. So my changes since Bios upgrade and rebuilding the mirror were lost.
solution Windows RE (Recovery Environment) helped out. Starting with the Windows Server 2008 installation disc, I was able to load the drivers, but didn't see any operating system.
Start the command prompt and execute diskpart.

Using "list disk" I saw the RAID volume, but this was marked as "foreign" (maybe because the partition/volume was part of a Windows Mirror as well). You need to use "import". Afterwards the disks are visible.

Go back to the dialog were you started the command prompt and close the window. This returns you to the previous dialg (no back button :( !!!). No the "Repair Mode" sees the partition and those it's job.

I'm running Hyper-V on that server and after recovery all the Hyper-V services were running, but no VM started.

Use "bcdedit /set hypervisorlaunchtype auto" from here.

Data Driven Unit Tests fail during TFS 2008 Build…

June 11th, 2008

but not when executed in Visual Studio 2008.

Error Message:
The unit test adapter failed to connect to the data source or to read the data. For more information on troubleshooting this error, see "Troubleshooting Data-Driven Unit Tests" (http://go.microsoft.com/fwlink/?LinkId=62412) in the MSDN Library.
Error details: An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Solution: Don't specify the connection string and the table in the constructor of the DataSource attribute, but follow this (use the configuration section).

Make sure you specify Version 9.0.0 and not 8.0.0 like in the sample!

Shuttle SX38P2 Pro *addons*

June 6th, 2008

Shuttle SX38P2 Pro the ultimate laptop replacement

First of all the carrying bag from shuttle suck for this kind of machine - way too heavy.
So I checked various bag shops - either too big, too expensive or too ugly!
So finally I found something at IKEA! I'll provide pcitures later. It fits perfectly and even has space for my keyboard.

Right now I suffer with installing Windows XP without a floppy. I could not do it. I think I failed because the 2 disks are configured as RAID 0.

For dual boot config menu changes here

I finally installed Windows Server 2008 x86 to get VTune 9.0 update 7 to run.

Upgrading Exchange 2003 Single Server Setup to Exchange 2007

June 4th, 2008

problem: Upgrading an Exchange 2003 Single Server to Exchange 2007

environment:
Physical Machines

  • Server Name: "mail", Athlon 1 GHz, 1GB RAM, Windows Server 2003 x86, AD, Exchange 2003 SP2 or so, HTTP-RPC Support, OWA
  • Server Name: "bubbles", Intel Q9450 2.67 GHz, 8gb DDR2 RAM. Windows Server 2008 x64
  • Server Name: "pinky", ", Intel Q9450 2.67 GHz, 6gb DDR2 RAM (ABit IP35 won't go past "Post Boot Screen" with 8GB = 4x 2GB DDR2. Windows Server 2008 x64

Virtual Machines using Hyper-V RC1 and RC2

  • Server Name: "mail2k7", Windows Server 2008 x64, AD, Exchange 2007 SP1

introduction / background:

Exchange 2007 is only supported on x64 (yes I know about the x86 version), but there is no in-place upgrade available. Therefore one needs to setup a second machine and so on.

solution:

  • Setup "mail2k7" with Windows Server 2008 on bubbles (hyper-v rc1)
  • Installed AD Role on mail2k7
  • Connected to existing AD on "mail"
  • The old AD was still in Windows 2000 support mode. Therefore upgraded to Windows 2003 mode (Active Directory Sites and Service).
  • Setup DNS Role on mail2k7 added AD-supported Domain Entry (or maybe secondary)
  • Installed Exchange 2007 on mail2k7 (Got prompted for multiple pre-requisite roles, don't forget RPC support, needed for Outlook Anyware
  •  For Outlook Anywhere I needed the following (from here)
    Get-OutlookProvider
    
    Name                                 Server                               SSL
    ----                                 ------                               ---
    EXCH
    EXPR
    WEB                                  
    
    Which showed NULL values under server. 
    
    To assign a server to EXCH and WEB, I ran:
    
    set-outlookprovider WEB -server FQDN
    set-outlookprovider EXCH -server FQDN
    
  • Basic Authentication and use the Domain Name at logon
HELO
MAIL FROM:root@eisber.net
RCPT TO:eisber@eisber.net
DATA
Subject: Foo

Body 1
.
QUIT

SSL secured IIS-hosted WCF Application using OpenSSL

April 10th, 2008

enviroment An ASP.NET Application invokes a WCF Application hosted in IIS using a WCF Client over SSL and authenticates itself with a client certificate. PKI must be created too.

problem Just try it without this documentation... took as 2 1/2 days :)

solution

(All commands are in

formatted

and shall be executed on cmd.exe)

Preparations

Download OpenSSL (for Win32)

cd c:\openssl\bin
mkdir demoCA
echo 01 > demoCA\serial

create a new and empty file named demoCA\index.txt

Certificate Authority (CA)

mkdir work
openssl genrsa -out work\CA\CA.key 1024
openssl req -new -key work\CA\CA.key -days 3650 -out work\CA\CA.csr -subj "/CN=choose.some.name"
openssl x509 -req -days 3650 -in work\CA\CA.csr -signkey work\CA\CA.key -out work\CA\CA.crt

Result: CA.key (private key of CA), CA.crt (public key / self-signed certifcate of CA)

Server Certificate for IIS

start IIS-Admin on web server
Properties of WebSites/
Set SSL Port to 443 (e.g.)
-> Directory Security Tab
-> Server Certificate Button
-> Create new certficate
-> Prepare request
IMPORTANT the common name must equal the DNS name used to invoke the WCF service

Result: certreq.txt (Certificate Request)

mkdir work\IIS

Copy certreq.txt to work\IIS

openssl ca -policy policy_anything -cert work\CA\CA.crt -in work\IIS\certreq.txt -keyfile work\CA\CA.key -days 3650 -out work\IIS\iis.cer -outdir work\IIS –batch

Result: IIS.cer (signed server certificate)

start IIS-Admin on web server
Properties of WebSites/
-> Directory Security Tab
-> Server Certificate Button
-> Process pending Request
-> select work\IIS\IIS.cer

Installation of CA on WCF Hosting Server and Client machine (the machine hosting the ASP.NET application)

Start mmc (goto Start\Run: mmc)
Add Snap-In: Certificate\LocalMachine
-> Certficates (LocalMachine) \ Trusted Root Certification Authorities
-> Right click on Certificates \ All Tasks \ Import...
-> Select work\CA\CA.crt

Create client certificates for ASP.NET application

Mkdir work\Client
openssl genrsa -out work\client\Client.key 1024
openssl req -new -key work\client\Client.key -out work\client\Client.csr -subj "/CN=Client"
openssl x509 -req -days 365 -CA work\CA\CA.crt -CAkey work\CA\CA.key -CAcreateserial -in work\client\Client.csr -out work\client\Client.crt
openssl pkcs12 -export -in work\client\Client.crt -inkey work\client\Client.key -out work\client\Client.p12

Start mmc (goto Start\Run: mmc) on ASP.NET hosting machine
Add Snap-In: Certificate\LocalMachine
-> Certficates (LocalMachine) \ Personal
-> Right click on Certificates \ All Tasks \ Import...
-> Select work\client\Client.p12

Configure IIS hosting WCF application to require SSL and Client Certificates

start IIS-Admin on WCF application hosting server
Properties of WebSites/
-> Directory Security Tab
-> Secure Communication / Edit
Select "Require Secure Channel"
Select "Require Client certificates"

Optionally select "Enable certifications trust list" and create a new list holding the CA.crt if you only want to authenticate clients signed by your CA

Configure WCF Client

In your Web.config

<system.serviceModel>
<bindings>
<basicHttpBinding>
<binding name="BasicHttpBinding" >
<security mode="Transport">
<transport clientCredentialType="Certificate"/>
</security>
</binding>
</basicHttpBinding>
</bindings>
<behaviors>
<endpointBehaviors>
<behavior name="behavior">
    	<clientCredentials supportInteractive="false">
      	<clientCertificate findValue="Client"
                           x509FindType="FindBySubjectName"
                           storeLocation="LocalMachine"
                           storeName="My" />
</clientCredentials>
</behavior>
</endpointBehaviors>
</behaviors>

IMPORTANT: Make sure your application does not run under NETWORK SERVICE account. Without tweaking your permissions of the LocalMachine store, you cannot access private keys - which you need when you want to authenticate to the server using client certificates.

Configure WCF Server

In your Web.config

<binding name="basicSec">
<security mode="Transport">
<transport clientCredentialType="Certificate"/>
</security>
</binding>

<serviceBehaviors>
<behavior name="returnFaults">
<serviceMetadata httpGetEnabled="false" httpsGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true" />
</behavior>
</serviceBehaviors>

Some explaination: although the complete SSL handshake and the authentication is done by IIS, the WCF settings still need to match those of IIS. One reason is that the protocol differs (e.g. http vs. https).
You cannot enable httpGetEnabled and httpsGetEnabled at the same time.
You can using BasicHttpBinding - SSL is just the transport layer.

Some debugging tips

Get SSLDiag for validating you IIS SSL setup

To decrypt SSL traffic using Wireshark:

Start mmc (goto Start\Run: mmc) on WCF application hosting machine
Add Snap-In: Certificate\LocalMachine
-> Certficates (LocalMachine) \ Personal
-> Right click on Certificates \ All Tasks \ Export...
-> Select work\IIS\IIS.pfx

openssl pkcs12 -in vde\iis\iis.pfx -out work\iis\iis.pem –nodes

Start Wireshark

Goto Edit\Preferences\Protocols\SSL: RSA Keys: ,443,http,c:\openssl\bin\work\IIS\iis.pem
Goto Capture \ Options \ Filter: "Port 443"

Happy capturing!

WCF Tracing might be helpful too:

  <system.diagnostics>
      <sources>
            <source name="System.ServiceModel"
                    switchValue="All"
                    propagateActivity="true">
            <listeners>
               <add name="traceListener"
                   type="System.Diagnostics.XmlWriterTraceListener"
                   initializeData= "c:\temp\Traces.svclog" />
            </listeners>
         </source>
      </sources>
   </system.diagnostics>

Pioneer DVR 630-H and Homecast 5101 CI HDTV

April 9th, 2008

environment: Pioneer DVR 630-H, Homecast 5101 CI HDTV (receiving Astra 19.2E) and a Sanyo Z3 projector.

problem: Configuration of Pioneer DVR and Homecast

solution:

  • Homecast connected to Sanyo via HDMI
  • Pioneer connected to Sanyo via Component
  • Pioneer and Homecast connected seperately to a small stereo system
  • Homecast (VCR connector) connected to Pioneer (Decoder/Input1) via SCART

Homecast already has the channel list.
The very sick thing about the Pioneer DVR is, that it actually holds 2 (yes t-w-o) channel list.

  1. A channel list for its Antenna-RF tuner
  2. A channel list for the Guide+

You can actually ignore the Antenna-RF tuner list (found in Basic Setup/Tuner) - if you got a satellite dish you probably won't have another antenna.
The important thing is the channel list found in the Guide+ Menu on the very right.
I configured Decoder 1, Selected Homecast from the UNSORTED list somewhere at the end. You need to select "Antenna RF" as the connection, not L1, L2, DV... I still don't know what L1 is.
The Pioneer DVR nicely tries to set the channel on the Homecast - it actually works - just the Homecast crashed the first time...
Then go to the "Editor" tab. You can select the decoder as source and enter the channel numbers.

removing default range (.100-.150) from dnsmasq

March 22nd, 2008
 
start="$(dhcp_calc "${start:-100}")"
limit="$((${limit:-150} + 1))"
eval "$(ipcalc.sh $ipaddr $netmask $start $limit)"
 
# COMMENT NEXT LINE
# append args "--dhcp-range=$name,$START,$END,$NETMASK,$leasetime${options:+ $options}"
 

Nokia 7380 Battery Replacement

March 2nd, 2008

environment Nokia 7380; Needs battery replacement

solution

Nokia Software Updater - Internal error 2738

February 24th, 2008

environment Windows Vista

problem Installation of Nokia Software Updater failed

solution run "regsvr32 vbscript.dll"

Visual Studio 2008: Setup Project Targeting .NET Framework 2.0

December 21st, 2007

environment: Visual Studio 2008, .NET/C# Project Targeting Framework 2.0, Standard Setup Project

problem: Setup always requests framework 3.5

solution

  • All deployed projects must target framework 2.0
  • Prerequistes of setup project must be 2.0 (not 3.5). ATTENTION I couldn't change this separately for Release build and had to this manually using notepad/gvim
  • Launch condition must be changed to 2.0 (I had to clean and rebuild a couple of times until it let me select 2.0)

links

Same problem