Showing posts with label error. Show all posts
Showing posts with label error. Show all posts

Wednesday, May 25, 2016

With BIOS update, Intel RAID gives "Non-Member Disk" error on RAID1+0 set

In prep to play the new DOOM 4 by installing a Windows SSD in my video editing machine, I ran a BIOS update on my Asus P9X79.  After the update, the Intel onboard C600 chipset RAID controller dropped two of the four RAID1+0 members that I had created from RAID members to "Non-Member" disks.  After researching the problem, it seemed that many people have had the issue with the Intel RAID:
 
Apparently, Intel RAID gets upset when the BIOS gets updated.  At a high level, what you do to resolve is 
A. Turn all members into Non-Raid Members
B. Re-create the RAID in the exact same order that it was created
- Don't Delete the RAID set, as that has caused data loss for some people
C. Usually, the partition table gets blown away when you recreate the RAID.  You then have to go find it again by running a program like TestDisk to find and rewrite any missing partitions
------------------
The Path I Took
Of course, when I ran TestDisk, I compounded the problem by choosing the wrong partition.  I basically got confused, as TestDisk allows you to select from a couple of choices:
1) Intel/PC partition
2) EFI GPT partition map
 
Now, my BIOS is UEFI and the drives all had GPT partition maps.  I thought that was the logical choice and I selected it.  It showed me two main drives:
- MS Data partition, size 200MB
- MS Data partition, size 2.7TB, the size of my RAID set
 
First, I wrote the 200MB partition table having the 200MB filesystem.  This was the wrong thing to do.  I got confused because my drives were GPT and because most of the people on the threads I had been reading were Windows.  It was only after spending Saturday and Sunday reading that I found a couple (out of the hundreds) of posts on people with Linux OSs that actually had the correct instructions to fix my issue.  
 
For my Linux Fedora 22 system, I actually needed to select "1) Intel/PC partition".  Before I did this, I decided to:
1) Pull off any data that I could using PhotoRec, a program that reads files block-by-block, written by the same guy who wrote TestDisk, Christophe Grenier.  I wrote that data to my 3GB SATA.  This took about ten hours.
- I ran through this exercise, but of course, the files that PhotoRec outputs are labeled F000001.txt, F000002.sh, F000003.gz and so on.  The names and directory structures are totally lost.  The content of the data files, however, is kept and I was able to find the video editing scripts that I had spent 100s of hours developing.  That was good, but it would be an enormous pain-in-the-A to dig through them and rename them all.
 
2) After pulling off the data, I was going to blow away the 200MB MS Partition, as creating this was a mistake.  I did this with some trepidation, obviously, as I didn't want to do any more harm.
 
Once those two things were done, I went back into TestDisk and selected "Intel/PC partition."  This time, I saw a Linux partition of the correct size, 2.7TB.  TestDisk gives you the option of viewing the directory structure.  When I did this I got a foreboding message:
“Can’t open filesystem. Filesystem seems damaged.”
 
Ugh.  I pressed on and wrote the partition table to disk.  Mounting the filesystem, I got a new error:
mount: wrong fs type, bad option, bad superblock on /dev/md126p1
 
Ugh.  Doing some research, I found this article on fixing bad superblocks, which entails finding a good one from the many that are sprinkled throughout an ext4 filesystem:
 
I found the backup superblocks by using mke2fs:
sudo mke2fs -n /dev/md126p1
 
mke2fs showed me a number of superblocks available.  I prayed they were corrupt.  Using e2fsck, I chose one of the superblocks, 32768, from the output of mke2fs: 
sudo e2fsck -f -b 32768 /dev/md126p1
 
When the program ran, it found a few errors.  In case there were many errors, I CTRL-C'd out of e2fsck and restarted the program by adding the "-y" switch to let it run unattended and accept all fixes with a "yes."  I let it run.  After I came back to the terminal, I found the screen full of the text output of the program, with thousands of sector id codes scrolling by.  I wasn't sure if this was bad or good..but I let it finish.  Afterward, I mounted the drive.  
 
The mount came back without error.  Good.  The moment of truth was when I ran an "ls" and saw my files and directories!  However, I wasn't out of the woods yet.  The proof would be if I was able to access them.  I played some music files, opened a few videos, started up a VM..they all worked!  YAHOO!!  I didn't lose my stuff!!  Even though I have pretty much everything backed up, I did not have my scripts backed up and I've spent 100s of hours on those.  Thank God I got them back!!
 
So..hooray for me!
:)
Now onto playing DOOM, the reason why I got into that mess in the first place!!

Reference

Tuesday, October 06, 2009

win7 rc1 and mac time machine fun

It had been a pretty fun-less summer round the Guy's house, with lots of work, a tough economy and aging parent problems. So, I finally said to myself, "Man, I haven't played a video game in a long time. Maybe I'll pick up Wolfenstein." This simple act led me down a very busy path the last couple weekends..

Aging Box Won't Cut It
My six year old Dell SC400 would not do the game justice, so I needed an alternative. Should I invest in a new core i7 box? Pricing one out on newegg with a ASRock board and an i7 920 chip came to almost $1000. I don't want to spend $1000 right now. But maybe I could install Vista 64-bit on the dual, quad core SC1430? Last time I tried installing a new OS on that box about a year ago, I learned that you can't install on IDE drives. So I needed a SATA drive. Luckily, I've since bought a couple of SATA drives and had a 500 gigger laying around. I also had a Vista 64-bit install disk, so it looks like I had all I needed to get started..

I could bore you with a lot of details about what has transpired over the last two weeks. Instead, I'll just bullet point the high points. Feel free to comment or ask where appropriate. Suffice it to say that the last two weekends have not been all that relaxing! :)

Last weekend
- installed Vista 64-bit and Wolfenstein. The OS ran fast on the dual, quad beast. Also, Wolfenstein's fun..just like the last one with better graphics.
- upgraded to Windows 7 RC1 (7057)
- Win7s performance went in the toilet, something must have been wrong. I blew it away and reinstalled Vista 64-bit
- backed up Vista to 500GB via Acronis (Seagate) Disk Wizard (six hours). Successfully test booted the backup.
- tried the Win 7 compatibility test. Just silly..it only looks at CPU/mem/video card specs. I was hoping it would look at your hardware and actually do a full compatability test that would tell you if the drivers for a specific card were available or not (listen up, Microsoft!). But that makes too much sense. Oh well.
- did Windows 7 RC1 (7147) full install/overwrite. Worked fine, as opposed to the upgrade, which did not.

This past week
- spent days this week trying to get Media Center working my tuner card.
- Analog cable works over NTSC
- ATSC with an antenna doesn't work, though it did in Vista Media Center. Weird.

This weekend
Win 7 work
- I can't install Win7 on my SATA RAID cause I ran out of drive bays in the SC1430
- alternative would be to move the drive to an external DVD, thus freeing up a bay
- Win 7 suddenly stops working and blue screen of death with wimFsf.sys PAGE_FAULT_IN_NONPAGED_AREA error (not sure why)
- did all sorts of things to figure out what was happening (tried rebooting with DVD, removed PCI cards one by one, performed memtest)
- had to remove NVidia card and connect onboard video to get boot DVD to work and repair system
- repair actually worked and Win7 booted again
- not sure why this happened
- backed up Win7 RC1 to my old 120MB notebook drive via Acronis & tested the backup (took 20 hours)
- while removing and replacing cards, I accidentally cut the wire responsible for the intrusion detection switch.
- Thus, I had to head to Home Depot to get a wire stripper, strip the wire ends, thread them back together and wrap with electrical tape. Irritating.

I think I must have opened my SC1430 and rebooted over 50 times these past couple of weekends

Mac Work
- prepped Mac for second profile for girlfriend to use Mac for her iPod syncing
- reused the 500GB to do a Time Machine backup of Macbook
- Time Machine worked well. It completed the initial back up of 170GB in about four hours.
- created a user profile for her on the Mac
- pulled the files off her iPod Nano and network copied them to her new profile
- sync'd her iPod with the Mac
- my profile seems corrupt (permissions errors, can't do SW updates from it), so I used her profile to install the latest SW updates (10.5.8, new iTunes, etc)
- Mac OSX VNC still preventing me from logging out of my profiles. Had to disable sharing
- upgraded her iPod's firmware
- noticed my Macbook was full of crap, so I deleted 50GB worth of shat.
- redid the Time Machine backup
- noticed mcd on the mac was taking up 90% of the CPU (stopping Spotlight and unplugging the TM backup drive seemed to stop this)

Still to do
One last try this week: move box down near windows instead of up in loft.

Looking at the work I've done over the past couple weeks, a number of trends appear:
- got my systems' backed up (Mac/Win7)
- tried a new OS (Win7)
- built a sandbox on the Mac for my girlfriend to start using the Mac
- played a game for about two hours :)

Not bad for two weekends of struggle.
TAG

Wednesday, April 16, 2008

Ubuntu 7.10 install in VMware Server gotcha

Trying to install Ubuntu 7.10 in VMware Server 1.04, I came upon a lot of these messages as Ubuntu was trying to install itself into the virtual machine's hard drive:
sd 2:0:15:6 rejecting I/O to offline device

Background
A caveat to installing most Linux distributions within VMware Server for XP is that you need to set the SCSI driver to Lsilogic in the configuration file for the virtual machine. The config file will be a file with the extension ".vmx" in the VM's directory. For example, the config file for my Ubuntu install was "Other.vmx"

Solution
Here is the line you need to add to your .vmx file:
scsi0.virtualDev = "lsilogic"

My entire .vmx file ended up looking like this:
config.version = "8"
virtualHW.version = "4"
scsi0.present = "TRUE"
scsi0.virtualDev = "lsilogic"
memsize = "1024"
ide0:0.present = "TRUE"
ide0:0.fileName = "Other.vmdk"
ide1:0.present = "TRUE"
ide1:0.fileName = "auto detect"
ide1:0.deviceType = "cdrom-raw"
floppy0.fileName = "A:"
Ethernet0.present = "TRUE"
displayName = "Ubuntu 7.10"
guestOS = "other"
priority.grabbed = "normal"
priority.ungrabbed = "normal"
ide0:0.redo = ""

ethernet0.addressType = "generated"
uuid.location = "56 4d 32 f1 73 c7 b5 15-26 b3 bf 4b eb 77 4f c6"
uuid.bios = "56 4d 32 f1 73 c7 b5 15-26 b3 bf 4b eb 77 4f c6"
ide1:0.autodetect = "TRUE"
ethernet0.generatedAddress = "00:0c:29:77:4f:c6"
ethernet0.generatedAddressOffset = "0"
numvcpus = "2"



Of course, the line you add may differ if you have more than one SCSI device. Once the line is added, you'll need to restart your virtual machine for the change to take effect.

Good luck!
sodo

Sunday, January 06, 2008

Belkin F5U503 firewire mishap

Though it may seem so, not all tasks computing are an easily digestible banquet for Cacasodo. Yes, there are high points of success, but like many the intrepid engineer, there are more failures than success. In this light will I tell you my tale of frustration.

It began with a simple goal: to optimize my video editing by installing a firewire card using the PCIX slot of my Dell SC1430. As my one and only PCI slot was used by my Sil680 RAID card, I wanted to install a firewire card in one of the two PCIX slots in the box. And of course, the card had to work under Fedora. As a precursor to the story, I will say that I have a DLink PCI firewire card and that card works without error in the box. But my purpose was to have the RAID card use the one and only PCI slot and the Belkin in one of the PCIX slots so both could live happily in the same home. Alas, I did not know the hell that awaited me in trying to make this happen.

It started as a hasty, unresearched purchase of a Belkin F5U503 firewire card. After my purchase was made, I was told by a friend to avoid the Belkin cards, as Belkin was a known OEM reseller who used substandard parts. Cold comfort that was after the fact, but I digress.

I brought the card home and installed it in the first PCIX slot of the Dell. The Belkin has three connectors that allow it to fit in either PCIX slot of my box:
http://www.staples.com/sbd/img/cat/std/s0057708_std.jpg

Here's a pic of my server's motherboard:
http://dcse.dell.com/IFR/PowerEdge/PESC1430/images/sysbrd_full.jpg

When I installed the card in the PCIX slot, here's what happened. Dmesg gives me this error:
[cacasodo ogre ~]# dmesg | grep 1394
ohci1394: fw-host0: OHCI-1394 1.1 (PCI): IRQ=[38]
MMIO=[fc5ff800-fc5fffff] Max Packet=[2048] IR/IT contexts=[4/8]
ohci1394: fw-host0: Get PHY Reg timeout [0x000004c0/0x00000000/100]

ohci1394: fw-host0: Get PHY Reg timeout [0x000004c0/0x00000000/100]


I get a couple more errors in dmesg once I turn the cam on:
ieee1394: hpsb_update_config_rom() is deprecated
ieee1394: Failed to generate Configuration ROM image for host 0


lsmod reads:
[cacasodo ogre ~]# lsmod | grep 1394
ohci1394 43273 0 ieee1394 109081 1 ohci1394


lspci reads:
[cacasodo ogre ~]# lspci | grep 1394
06:06.0 FireWire (IEEE 1394): Texas Instruments TSB43AB23 IEEE-1394a-2000 Controller (PHY/Link)


after probing for raw1394:
[cacasodo ogre ~]# modprobe raw1394
[cacasodo ogre ~]# lsmod | grep 1394
raw1394 37233 0 ohci1394 43273 0 ieee1394 109081 2 raw1394,ohci1394


I am running Fedora 7 and my kernel is the EZPlanet firewire patch kernel. I use this patched kernel because firewire is broken in Fedora 7's standard build:
[cacasodo ogre ~]# uname -r
2.6.22.9-1091.ez.fc7


I do see interrupt activity when I connect and turn on the cam:
[cacasodo ogre ~]# grep 1394 /proc/interrupts
38: 2 0 0 0 1 0
0 0 IO-APIC-fasteoi ohci1394


testlibraw gives me something:
[cacasodo ogre ~]# testlibraw
successfully got handle

current generation number: 1
1 card(s)
found
nodes on bus: 0,
card name: ohci1394

using first card found: 0 nodes on bus, local ID is 0, IRM is 63


But plugreport doesn't give me anything:
[cacasodo ogre ~]# plugreport
Host Adapter 0 ==============


Adding "noacpi", "noapic" and "nolapic" to my grub.conf and rebooting didn't help.

To see if it was kernel related, I tried booting using these other distros/kernels, with the same result..the "Get PHY Reg timeout" error:
Ubuntu 6.10 -> 2.6.17-10 kernel
Knoppix -> 2.6.19 kernel
Fedora 6 -> 2.6.18-1.2798 kernel

OK. I am almost spent for the evening. But does the card even work in the PCI slot? I put the card in the PCI slot and lo and behold, the card DOES work. To reiterate, the card does work in the PCI slot, just not in either of the PCIX slots. At this point I'm thinking that the card is not getting proper power, but I'm too tired to continue on. I sleep uneasily.

The next day, I take fifteen minutes to call Belkin. The gentleman on the line is helpful, but when I tell him I'm running Linux, I get the cold shoulder and he dismisses me with the "we don't support the card under Linux" line. Well, if the card works fine in one slot under Linux, why shouldn't it work in the other slot?! No matter, "we don't support the card under Linux."

Argh. So here is where I dive off into the deep end to set out to prove Belkin wrong that it is a power issue and not an OS issue. I went on Belkin's support site and tried to find the voltage requirements for the card. I could not. I searched on google and not so amazingly, I find a link to the voltage requirements ON BELKIN'S OWN SITE!
http://web.belkin.com/support/kb/kb.asp?a=3742&langid=

Great search engine there, Belkin! NOT! As well, I look on Dell's site for the voltage of the PCIX slots:
  • 2 64-bit/100MHz PCI-X slots 3.3V

The slots handle 3.3volts. Referring back to the Belkin KB article, it states clearly:
The F5U503 PCI requires a 5 volt PCI slot.

I knew it! Now, in order to prove Belkin wrong, I decide to get a Windows OS running on the Dell and show them that it is a POWER issue and NOT an OS related issue!

To do this, I'd install an older IDE drive in the Dell and apply an old Ghost image I had of XP. Well, the Dell doesn't have a floppy drive. So, I power down my web server, take the floppy out, install it in the Dell and reconfigure the BIOS to allow the floppy to be seen. OK. I try one of my Ghost floppies. It doesn't boot. I try a second and a third. They do not boot as well. Argh.

Wouldn't it be great if Ghost worked on a bootable CD? Unfortunately, Norton doesn't provide that option. But an enterprising person has a lovely install doc written up here:
http://nightowl.radified.com/bootcd/bootcdintro.html

Thank you, Nightowl! Though, it did take me a number of hours to setup the Ghost bootable disk, it was well worth the time as I now have reliable boot media for Ghost. The process itself could use a small blog entry. Nightowl did a great job, but he needs better formatting and less verbiage to make the instructions easier to follow.

Next, I used it to boot and apply a Ghost image of my XP system to that older hard drive I mentioned. But when I bootup, Ghost does not recognize the DVD disc. I try another disc that has an earlier Ghost image. Ghost also does not recognize that disc. Finally, I have a third DVD. Luckily, Ghost recognizes that disc. Unfortunately, when I go to apply the image, Ghost cannot find the IDE hard drive. What the hell? I see the drive in the BIOS, though the BIOS doesn't report back the correct size of the drive. It is the master drive on the IDE controller..what gives?

I tried a few couple configuration options:
-hard drive being slave
-hard drive cable select
-disabling the SATA drives
-changing boot sequence
-refreshing the BIOS version to the latest 1.0.4

None of these worked. Then I thought that if Ghost re-imaging didn't work, I should just install the OS itself. So, I had a bootable copy of the XP disc. I started the system with the disc in the drive, but the install process soon gave me a blue screen with a message regarding pci.sys. Looks like a lot of folks had that one:
http://www.google.com/search?q=xp+professional+install+pci.sys+blue+screen

This problem should be resolved with a disc that integrates XP with SP2 . Which of course, I don't have right now. So for expediancy's sake, I take another route: a Windows 2000 Advanced Server install. I was able to put the extra hard drive in a second machine, start the Win2K install process, but for some reason, the hard drive is not recognized properly by the BIOS. I brought the disk over to my Dell SC400 machine that runs XP. I disconnected the existing XP drive, installed the disk and got Win2K Advanced Server working without a problem. The box boots to that drive, so I know that the Master Boot Record is not corrupt. But when I move the drive back to the SC1430, it refuses to boot.

Not sure what to do at this point. I'd sure like to prove those Belkin support engineers wrong, but I can't get the "Belkin certifed" OS (in this case, Windows 2000 Advanced Server) to boot in the Dell. I assume I will have the same problem with XP SP2, but it might be worth a try.

To sum up:
-card doesn't work in PCIX slot, but I believe it is a simple voltage problem
-I'd like to prove this to Belkin, but I can't get a Windows OS to load via Ghost'ing an existing hard drive or installing a hard drive with a Windows OS on it

Update 1/6/08
Ooops..my bad. Looking in the manual for the Dell SC1430, it shows that pre-Win2003 OSs are not supported. Thereby, I am out $52 for the price I paid for the Belkin card. Just goes to show..DO YOUR RESEARCH before making a purchase of this kind.
!
A Frustrated Cacasodo

Saturday, January 05, 2008

WinAmp under Wine on Fedora 7

Happy 2008, everybody!

This was a nice surprise. I wanted some visualizations with my music, rather than just the plain xmms oscilloscope, so I thought I'd try installing WinAmp under Wine, the Windows Emulator (http://www.winehq.com). I hadn't had very good experiences with Wine before and wasn't confident that my sound hardware would be recognized correctly, especially in my quirky Dell SC1430.

The Dell is a server class machine not made for consumer applications. Though I'm trying my best to convert it into a video editing monster machine. For the most part, I have succeeded in that task. But there has been a lot of bloodletting (read: time spent) in the process.

Currently, I have Fedora 7 running on the Dell. As Wine is part of this Fedora distro, installing Wine was a simple matter of doing:
[cacasodo@ogre ~]# yum install wine

Version wine-0.9.49-1.fc7 got installed from the fedora-updates repository.

After reading a bit on the Wine FAQ, I saw that the installation of Windows programs to the Wine environment should be fairly straightforward. With that in mind, I downloaded the latest WinAmp player. I started the install by using the following command from my home directory, the directory I copied the program to:
[cacasodo@ogre ~]# wine winamp551_basic.exe

I forgot that Wine runs all the Windows applications and dialogs appeared in their own Metacity windows. Wine running WinAmp looks like this:


As I made it through the final dialog box of the installation process, I assumed the program installed correctly. Now, it was time to configure Wine using the Wine configuration program. I typed:
[cacasodo@ogre ~]# winecfg



In winecfg, I made sure that my audio drivers were selected correctly. Upon installation, Wine automatically detected that OSS, ALSA and JACK drivers were installed in my system. They were selected, so I played a test sound. The test sound was garbled and unintelligible. Ooops. I looked at the command output in the terminal window and it showed an ALSA error:
ALSA lib pcm_dmix.c:868:(snd_pcm_dmix_open) unable to open slave

I saw that my other audio applications were similarly broken, so I decided to reboot just for good measure. When the box came back up, I first played a test sound in XMMS. That worked, so I opened winecfg and the test sound played correctly! Happiness.

The real test would be to start 'er up and load an MP3 file. I started WinAmp using the following command:
wine /cacasodo/.wine/drive_c/Program\ Files/Winamp/winamp.exe

WinAmp started up, so I dragged the default Mike Llama wave file from the WinAmp installation folder into the playlist of WinAmp. The drag and drop from Metacity to WinAmp running under Wine worked, which was nice to see. Pressing play, I was happy to hear Mike's dulcid tones..well, not so dulcid..ring out loudly through my speakers. WinAmp was working!!

My original purpose for the WinAmp installation was to have some nice visualizations to go with my music. I was very interested to see if they'd work under Wine. In WinAmp, I went to Preferences by pressing the familiar CTRL-P key combination. Indeed, this opened up a Preferences window. Wine does key combinations..cool! I selected Visualizations -> Advanced Visualization Studio and pressed Start plugin. Lo and behold, another window appeared and even better than that, a visualization started up!

The visualizations were working so well that I could expand the viz window to roughly DVD size resolution (720x480) without it slowing down. Nice! At this point, I knew that Wine must be taking advantage of my NVidia (BFG) 8500GT card. There's no way plain old X could handle those beautiful streaming colors all by itself:


Again, nice going Wine, for taking advantage of the OpenGL in my NVidia chip!

However, I will say there must be some optimization needed in Wine, as a constant flow of error messages comes through in the terminal session:
fixme:ddraw:IDirectDrawImpl_WaitForVerticalBlank (0x1b27ff0)->(1,(nil)): Stub

Aside from that, it is very nice to have an unexpected success like this install of WinAmp and its beautiful visualizations. Tally ho!

For your reference, the WineHQ site has a nice database that shows which Windows applications will work with Wine:
http://appdb.winehq.org/appbrowse.php

In particular, here is the root page describing WinAmp compatibility with Wine:
http://appdb.winehq.org/objectManager.php?sClass=application&iId=5

Very cool.
'sodo

Tuesday, November 27, 2007

"out of memory" messages while opening windows in XP

I'd been plagued with this annoyance for a couple years, but never bothered to research it until today. Here's a nice solution, compliments of Kevin Dente:
http://weblogs.asp.net/kdente/archive/2004/06/04/148145.aspx

Update 2007/11/28
Woops..link now works!


Thanks Kevin!
'sodo

Friday, September 21, 2007

VMware Server: "You do not have permissions to perform this operation"

I was migrating an ESX VM back to VMserver and saw this error on startup:
"You do not have permissions to perform this operation"

The reason was because my .vmx config file for the VM was Read Only. You can change the attribute via Windows Explorer or the command line like so:

To show you the current attributes on the files, type:
attrib

To remove the read only attrib on a file, type:
attrib -r [filename]

Reading another post:
http://www.vmware.com/community/message.jspa?messageID=432486

I saw that other users saw the same message for a different reason. Their solution was to set the following parameters in the .vmx file for the VM:

> Enable "allVMMemoryLimit":
> prefvmx.useRecommendedLockedMemSize = "FALSE"
> Set to TRUE when value selected in UI matches
> prefered value. Set to FALSE otherwise.
>
> Set limit for all VMs to 1701MB:
> prefvmx.allVMMemoryLimit = "1701"
> Value selected in UI if it differs from prefered
> value.
>
> Allow most of memory to be swapped:
> prefvmx.minVmMemPct = "25"
> Set to 25, 50, or 100, depending on how much swapping
> you allow.

No promises on this one, but give those two options a try..
'sodo

Friday, July 13, 2007

Event ID: 36870, Schannel error

This was a very nasty error that I found in the System Event logs of my Windows 2000 webserver while upgrading a Digital ID for Secure Email certificate.

Event Type:
ErrorEvent Source: Schannel
Event Category: None
Event ID: 36870
Date: 7/11/2007
Time: 1:50:10 PM
User: N/A
Computer:
Description: A fatal error occurred when attempting to access the SSL client credential private key. The error code returned from the cryptographic module is 0xffffffff.

Strange thing was that it happened only on a few of the Windows 2000 servers in our web farm.

To explain, we use a browser certificate to encrypt a small subset of transactions on our website. Verisign calls this a "Digital ID for Secure Email." During our yearly update of the certificate, we encountered the Schannel error shown above. Customers on our website would then a failure when they hit a webserver showing evidence of the problem. Again, not all webservers showed the problem, only a subset.

After four hours of troubleshooting and googling, I stumbled upon a post that suggested to look at the permissions on the following directory:
C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys

Somehow, when the certificate got updated earlier that morning, the administrator and Everyone user had lost ALL their privileges to Read, Write or Modify files in that directory. Because this was a Severity One condition for our web application, I decided to take the easy road and give Administrator and Everyone Read/Read&Execute/List/Write permissions on that directory.

This solved the problem and allowed the customers to complete the transaction; however, it didn't tell us the cause of why installing the new certificate changed the permissions on the MachineKeys directory. I am still researching this. If I find out why this happened, I will update this post.

Thursday, July 12, 2007

warning, got bogus tcp line in RHEL AS3

I have been plagued with this error while I use netstat on my RedHat Enterprise Linux, Advanced Server 3.0 box for a couple years now and never had the time to track it down. So I finally decided to investigate. It looks to be a bug on some RedHat systems: http://kbase.redhat.com/faq/FAQ_45_6180.shtm

The messages mean that "there are two identical recorded TCP connections. This can happen if a connection is rapidly closing and re-connecting on the same address/port tuple."

This seems to fit the behaviour of my webserver, as it is typically serving hundreds of connections at a time. But RedHat points to two specific parameters in /etc/sysctl.conf that are set to 1 instead of zero:
sysctl net.ipv4.tcp_tw_recycle
sysctl net.ipv4.tcp_tw_reuse


Of course, this was not true in my case. I believe however, that RedHat's general statement above about connections rapidly closing and reconnecting seems to be the cause.

To help you identify you particular problem, here are some other useful discussions of the same problem:
http://www.morgan-systems.com/tools/Dev_Netstat.asp
http://track.sipfoundry.org/browse/XPB-371

Wednesday, June 27, 2007

performance note for VMs: they love fast drives

Because virtual machines are essentially big files, you will benefit if the disks they are stored on are fast. So, if you stripe a couple SATA or SAS drives, this should really help speed things up. Enterprise users will obviously have access to better firepower (RAID 1+0, RAID 5, etc), but I'm framing this in the context of the tech dabbler just getting his feet wet with the technology.

I bring this issue up because I put an old, circa 1999 20GB spare drive in my XP workstation and used that drive as the conversion destination of my local XP Professional Workstation to vm. After the conversion, which was successful, I started the vm and the performance was horrible! It was almost like the vm hung or was frozen. In truth, the vm was just extremely slow because the IDE drive was circa 1999 and had little buffer for the 8GB+ vm. I didn't immediately know what was happening, so I used XP's Performance Monitor to view average disk queue length.


Average disk queue length is a rough measure of disk performance, but it is a useful gauge of i/o problems. For me, I find that values of over 20 indicate performance issues. Your mileage may vary.

One note: if you don't like the default scale of 100:1 on the Performance Monitor chart, you can change that default scale by:
1) right-clicking on the statistic in the legend of the chart
2) select Properties
3) click the Data tab
4) choose another scale under the Default Scale dropdown menu

UPDATE 7/6/2007: I've expanded my discussion of performance monitoring VMware Server here:
/2007/07/measuring-performance-while-using.html

Also, I noticed my performance seems to suffer if you use the "Split Disk Into 2GB files" option. As well, I selected "Allocate all disk space now" for better performance.

In regards to this option, I found a bug in the VMware Converter gui. When I initially went to configure the conversion of the local machine, I was not able to deselect the "Split disk into 2GB files" option for the destination drive (a second local hard disk) that I wanted to use.


The checkbox was greyed out and unselectable. Trying to fix the problem, I returned to the destination dialog box, changed my destination drive to a network share and the option suddenly became available. On a hunch, I then went back to the destination location window, changed the destination drive to the original local drive and the "Split disk into 2GB files" option was now available.

I don't know why the option was made unavailable at first, but I was glad to be able to route around the error.

Wednesday, June 06, 2007

VMware Player: no sound / "bad directsound driver"

After I converted my Windows 2000 Professional machine over to a virtual machine, I was disappointed to find that VMware Server doesn't support sound. Here's non-official confirmation of that:
http://kontrawize.blogs.com/kontrawize/2006/03/vmware_server_v_2.html

UPDATE 7/6/2007: I have gotten sound to work using both a Windows 2000 Advanced Server and an XP guest system in VMware Server. You will need to apply the tweak below to enable sound.

Therefore, I downloaded VMware Player, simply to play sound from my VM. Upon installing Player, I saw this error when I tried to initialize my audio application:
"Bad DirectSound Driver"

Apparently, VMware Player sets its config file for the virtual machine to use Sound Blaster emulation. When in truth, the emulation should be Creative AudioPCI (ES1371,ES1373).

So if you have working sound on your host system, but not on the vm running in VMware Player, here are the configuration lines in your VMs .vmx file you need to have in order to enable sound in the virtual machine running in VMware Player:
sound.present = "TRUE"
sound.virtualDev = "es1371"
sound.filename = "-1"
sound.autodetect = "TRUE"

Just make sure to edit/add the lines while your virtual machine is powered off.

It would be nice if VMware could somehow do a pass-through to the actual hardware device installed on the host so that you could do nice things like get low latency for recording software applications like Cubase or Reason.

I will ask the gurus..
UPDATE: Pass through to the real sound card not possible with Workstation or Player. Sound only works as emulated.

VMware Player is a bit of a kids toy, as there is not much to configure and the CD/Floppy/Network/Sound devices are all toggles at the top of the Player window:


Kinda weak. But hey, its free and it works.

Kontrawize also has their own opinions of the differences between VMware Server and Workstation here:
http://kontrawize.blogs.com/kontrawize/2006/03/vmware_server_v.html

Ah, the silliness continues..

converting a physical server using VMware Converter

This morning, I spent some time converting a physical server to a virtual machine using VMware Converter. Here's a good starter page of info to work from, the VMware Converter FAQ, if you do not know the capabilities of VMware Converter:
http://www.vmware.com/products/converter/faqs.html

One detractor from the Converter is that you cannot convert a physical Linux machine to a VMware VM. Oh well.

In this case, however, the physical server was a Windows 2000 Professional machine and is home to my digital audio workstation. This box has a myriad of applications on it, from Cool Edit to Cakewalk and Cubase to Rebirth and Reason. I was planning on building out a newer, more powerful server using the case that the Win2K Professional is in and I don't want to take time and effort to reinstall those applications on my XP box. Also, I don't want to slow the XP box down with a crapload of new applications gobbing up the registry, so it makes sense that I convert my 2000 box to a virtual machine. Also, once virtualized, I will then be able to use the audio workstation in either of my primary environments, XP or Fedora.

VMware Converter is installed on my XP Professional machine. So here is the plan:
-Start VMware Converter on XP
- Convert a physical computer, my Windows 2000 digital audio workstation, to a virtual machine
- Create a Windows share on my XP machine and use the share as the destination for the conversion

The process was relatively pain-free and quick. Here's what I did.
1) on XP, I started VMware Converter. There is a splash screen and then I was given a choice of source computer for the conversion. I chose "Physical Computer:"


2) Converter asks for the name or IP of the remote machine and my authentication credentials:


3) Once logged in, Converter asks to temporarily install Converter Agent on the source machine. I chose to manually uninstall the files later if anything went wrong during the conversion process:


4) Converter then shows the system or active drives on the OS to convert. My setup of one active system drive is the simplest scenario:


5) Converter asked me for a vm name and a location (ie, a network share) to write the destination vm to:


6) Next, I could specify a dynamic virtual disk or a fixed allocation for better performance. In order to save space on my main system, I chose dynamic ("Allow virtual disk files to grow"):


7) Converter asks what type of networking I'd like. Bridged is the default and I accept it:


8) I chose no network or hostname customizations:


9) At this point, Converter displays a summary screen and is ready for me to start the import.


10) One small snag: since I just installed the Converter Agent on the source machine, Converter needs to reboot the source machine to make the Agent active. I click "Yes:"


11) Unfortunately, after the reboot of the source server, the install hangs and does not progress. Figuring that it might be related to the recent Converter Agent install, I stopped the import. I recreated the conversion steps above (steps 1-10). After rebuilding the import project, the conversion started up again successfully and I saw the Progress column "% Done" increment higher:


12) Happily, the conversion works!


Now, after I powered up my new Windows 2000 virtual machine running under VMware Server on my XP box, I see that the underlying motherboard, cdrom and various system devices change. Uh oh!

Be aware of this if you migrate a physical computer to a virtual machine! Virtual machines under VMware are based on the Intel 440BX motherboards and Phoenix BIOS 4.0 Release 6.0:


You'll also see VMware BIOS build 245 if you enable the Boot-Time Diagnostic Screen:


In order to be prepared for automatic system reconfiguration that Windows will do when it sees its new "motherboard", the best idea for you is to have an I386 on your hard drive or a CD with all your system drivers ready to go after the conversion. That way, the process will be pretty painless, outside of reconfiguring your display settings!

Even with the snag, this process took about an hour and a half from start to finish. Now I have my darling digital audio workstation forever enshrined as a virtual machine usable in either of my XP or Fedora environments. Sweet!

UPDATE: VMware server doesn't support sound, but VMware Player does support it. Also, VMware Player sets its config file for the virtual machine to use Sound Blaster emulation. In truth, the emulation should be Creative AudioPCI (ES1371,ES1373). Therefore, if you have working sound on your host system, but not on the vm running in VMware Player, you need to change your virtual machine's .vmx file to enable sound:
sound.present = "TRUE"
sound.virtualDev = "es1371"
sound.filename = "-1"
sound.autodetect = "TRUE"

Just make sure to edit/add the lines while your virtual machine is powered off. It would be nice if VMware could somehow do a pass-through to the actual hardware device installed on the host. Unfortunately, this is currently not possible. So I cannot take advantage of my M-Audio Delta 66 card. BOO HOO! :(

I've detailed this sound driver problem in this post:
/2007/06/vmware-player-no-sound-bad-directsound.html

I hope this is a nice primer for those wishing to undertake the process of converting a physical machine to a virtual one.

Here's a related article on VM performance

Good luck!

Thursday, May 17, 2007

Site Server Posting Acceptor error messages

It is definetly old school, but we still use the Site Server Posting Acceptor utility for a small cadre of developers. Here's a list of the common errors and their resolutions:

Client Side Errors
Error: Object doesn't support this property or method: "IFUp1.CreateTempBinding'

Cause: Registry key disables ActiveX Utility.
Resolution: Delete this registry key and reboot
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\ActiveX Compatibility\{886E7BF0-C867-11CF-B1AE-00AA00A3F2C3}

Server Side Errors
Error: The parameter is incorrect

Cause: The browser has not read the META tag (POSTINFO) information.
Resolution: This is usually done via a META tag of the default document of the website. For example, you can place this META tag in the HEAD element of index.html:
<meta name="postinfo" content="/scripts/postinfo.asp">

Note: if it is not in /scripts, you may need to change the directory reference to where postinfo.asp lives.

Error: The Web server you selected does not indicate support for the service provider you selected

Cause: Your browser does not have a reference to postinfo.asp.
Resolution: This is usually done via a META tag of the default document of the website. For example, you can place this META tag in the HEAD element of index.html:
<meta name="postinfo" content="/scripts/postinfo.asp">

Note: if it is not in /scripts, you may need to change the directory reference to where postinfo.asp lives.


Error: The Web server returned the following error: You do not have write access to destination URL "http://destinationURL"

Cause: The destination virtual directory (ie, the directory on the web server where you want to upload the file to) does not have the appropriate write permissions in IIS.
Resolution: Check the IIS MMC for IIS write permissions.


Error: The Web server either is not responding or returned an unrecognized response.

Cause: The Execute Permissions setting of the Scripts virtual directory in IIS is not set to Scripts and Executables.
Resolution: In the IIS MMC, set the Execute Permissions of the Scripts virtual directory to Scripts and Executables.


Error: The Web server returned the following error: Cannot move file "somefile.extension" to its final destination. Further processing is stopped.

Cause: NT permissions are denying write access to the file.
Resolution: Logon to the server and change the file or directory permissions to allow write access to the file.
Cause: The read-only attribute of the file is set.
Resolution: In Windows Explorer, right-click on the file or directory and deselect the read-only property.
Cause: Allow anonymous is set to NO in \Microsoft Site Server\SiteServer\Publishing\pasetup.inc
Resolution: Set Allow anonymous to YES in \Microsoft Site Server\SiteServer\Publishing\pasetup.inc


Error: The requested header was not found


Cause: A personal firewall, Symantec firewall or other Firewall client interferes with the functioning of the Site Server upload utility.
Resolution: Disable any and all software firewalls.

If all else fails, here is a great doc on Content Replication Service errors:
http://www.ci.loveland.co.us/siteserver/docs/crs_opsguide_cess.htm

Have a good day!
'sodo

Wednesday, May 16, 2007

installing VMware VirtualCenter Management Server on XP Pro

Well, I tried installing an evaluation version of VirtualCenter Management Server on XP today, so I suspect someone else will. Hence, this blog entry. Though not recommended, I tried installing VMware's VirtualCenter 2.0 Management Server on my XP Professional box. Be aware that if you do this install, two caveats apply:

1) if you have IIS running, disable it!
Because VirtualCenter is going to ask you to use standard web ports 80/443, you'll need to disable IIS or direct either IIS or the VirtualCenter MS install to use ports other than 80 and 443.

As a side note, IIS on XP has a port 443 configured; however, you cannot delete this port from being used. I do not know what this port is used for, because it is not bound to anything I can see in the IIS MMC. I suspect it is due to some limitation with IIS on XP, the latest crippled software available on a "Professional" level OS from Microsoft, reminiscent of the sad NT 4.0 Personal Web Server. I also tried to delete the port using MetaEdit, the IIS MetaBase editor, but that just broke the website entirely, forcing me to do a reinstall of IIS. MetaEdit is a very nice little utility and is available here for free from Microsoft:
http://support.microsoft.com/kb/q232068/

If you are ever in doubt about what ports a particular process is using, another Mark Russinovich gem is TCPView:
http://www.microsoft.com/technet/sysinternals/Networking/TcpView.mspx

Here's what TCPView looks like:


My my! Look at all those VMware related processes running on my XP machine!

2) Disable Internet Connection Firewall (ICF)/ Internet Connection Sharing (ICS) Services

So, the second thing you'll need to do if you want the VC installer to run properly is to disable this combined service. According to the description in the Services administrative widget, "Internet Connection Firewall (ICF)/ Internet Connection Sharing (ICS) Services "provides network address translation, addressing, name resolution and/or intrusion prevention services for a home or small office network." That's quite a laundry list of activities for one service, no? Well, during the installation of VirtualCenter, the installation bombed out with the following cryptic message dialog box:
Error 25002. Setup failed to configure the Windows firewall

Following a couple of those dialog boxes appearing, the final error message you will see is:
The VMware License Server installer returned error code 1603.

The errors also had a note about referencing the installation log here:
c:\documents and settings\\localsettings\temp\vminst.log

Digging through this file, I found the last telltale lines:
vmls: 05/16/07 16:15:48 Found "C:\WINDOWS\System32\netsh.exe"
vmls: 05/16/07 16:15:48 Attempting to launch "C:\WINDOWS\System32\netsh.exe firewall set allowedprogram program="C:\Program Files\VMware\VMware License Server\lmgrd.exe" name="VMware License Server Manager" scope=ALL mode=ENABLE"
vmls: 05/16/07 16:15:50 Process returned 1
vmls: 05/16/07 16:15:50 ERROR: Failed to configure Windows firewall for lmgrd.exe.
vmls: 05/16/07 16:15:50 Posting error message 25002


Well now, what the heck is netsh.exe? Here's a clue:
http://support.microsoft.com/kb/242468

In short though, here's a laundry list of things this little utility can do for us:
• Configure interfaces.
• Configure routing protocols.
• Configure filters.
• Configure routes.
• Configure remote access behavior for Windows-based remote access routers that are running the Routing and Remote Access Server (RRAS) Service.
• Display the configuration of a currently running router on any computer.
• Use the scripting feature to run a collection of commands in batch mode against a specified router

Gadzooks! It's another all-in-one utility from Microsoft! They keep coming, don't they? Back to the errors in the VC install log file. Well, I misread the log file message that stated "Failed to configure Windows firewall for lmgrd.exe" thinking that it meant that netsh.exe was the Windows firewall. In point of fact, the Windows firewall was the previously mentioned ICF/ICS Service. But I realized this only after I tried to rename the executable.

My logic was that if the installer didn't find netsh.exe, it would just proceed on its merry way and get me further along to my goal, a successful install. So I renamed netsh.exe to netsh.bak. Well, lo and behold when I renamed netsh.exe to netsh.bak, a new netsh.exe took its place not four seconds later! Microsoft operating systems are acting more like viruses every day! I was then intrigued as to what program was recreating netsh.exe, so I started sifting through the Administrative -> Services widget for a likely culprit.

Looking through the list of services, I quickly stumbled upon ICF/ICS, as it was one of the first in the alphabetically ordered list of services. This made me recall the log entry and I finally put two-and-two together to realize that it was ICF / ICS that was the Windows firewall, not netsh.exe. So, finding that combined service gave me great pleasure and I quickly stopped the service, disabled it and was able to successfully finish the VC install.

Post Mortem
In point of fact, I never did find the service responsible for restarting netsh.exe. Hmmm..maybe a future post.

Blundering his way deductively through the world of computing, the TechAnswerGuy.

Monday, April 02, 2007

VMware Converter experience

As I undersized my Red Hat Enterprise Linux 3 virtual machine, I needed to expand the / (root) partition for an Oracle 10G install. Normally, I would have used VMware vdiskmanager to do the resize, but I thought I'd give VMware Converter a try. 4sysops.com has a great introduction to VMware Converter 3.0 here:
http://4sysops.com/archives/resize-a-virtual-disk-with-vmware-converter/

I installed the software and followed along the same path as the 4Sysops. However, when I got to the point to resizing any of my Linux partitions (two ext3/one swap), I was confronted with the following dialog box that read:
"Warning: Cannot configure the source image"

That first error did not stop my progress and I was able to choose "Select volumes and resize to save or add space". However, when I chose that option, the New Disk Space drop down was grayed out and I was unable to resize any of my Linux partitions. After a bit of Googling, I found a number of articles:
http://www.google.com/search?hl=en&q=vmware+converter+%22cannot+configure+the+source+image%22

A number of the sites pointed out that the VMware converter does have problems with resizing linux partitions. That's fine, but what about a solution? This was found on the mojocode.com site:
http://www.mojocode.com/

They resolved the issue by resizing the virtual machine by using vdiskmanager. I tried their suggestion and expanded the virtual machine to 40GB by using the following command:
C:\Virtual Machines\Red Hat Enterprise Linux 3>"\Program Files\VMware\VMware Server\vmware-vdiskmanager.exe" -x 40gb "Red Hat Enterprise Linux 3.vmdk"

Using log file C:\DOCUME~1\USER\LOCALS~1\Temp\vmware-user-3279696342\vdiskmanager.log Grow: 100% done.
The old geometry C/H/S of the disk is: 1044/255/63
The new geometry C/H/S of the disk is: 5221/255/63
Disk expansion completed successfully.

WARNING: If the virtual disk is partitioned, you must use a third-party utility in the virtual machine to expand the size of the partitions. For more information, see: http://www.vmware.com/support/kb/enduser/std_adp.php?p_faqid=1647

Luckily, this resize worked. After the resizing, I successfully booted the virtual machine and saw via fdisk that indeed, I had about 32GB extra space, so I created a new ext3 partition:
[root@oracletest root]# fdisk /dev/sda
Command (m for help): Command (m for help): p
Disk /dev/sda: 42.9 GB, 42949672960 bytes255 heads, 63 sectors/track, 5221 cylindersUnits = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System/dev/sda1 * 1 13 104391 83 Linux/dev/sda2

14 790 6241252+ 83 Linux/dev/sda3
791 1044 2040255 82 Linux swap/dev/sda4
1045 5221 33551752+ 83 Linux

After the creation, I rebooted. I then formatted the disk properly with the following command:
mkfs.ext3 -b 4096 /dev/sda4

Hot dog! I've got plenty of space for my Oracle 10G install!

vdiskmanager , 4sysops and google save the day!

UPDATE: If you're interested, I've recently done a physical to virtual conversion of a Win2K box here:
2007/06/converting-physical-server-using-vmware.html

Thursday, January 12, 2006

SQLAllocHandle on SQL_HANDLE_ENV failed

Ah, the ever wonderful:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Microsoft][ODBC Driver Manager]Driver's SQLAllocHandle on SQL_HANDLE_ENV failed

The error happens on a brand new Oracle 9i installation on a Win2K IIS server. The specific context is a web-based database query to Oracle via the Microsoft ODBC driver. There are a few steps that have solved the problem for me:
1) reinstall the Oracle client. Specifically:
- Remove all the Oracle components
- Delete the Oracle9i directory
- If you've made a request to the IIS server that includes a call to Oracle, IIS will be hanging on to oci.dll, the Oracle Call Interface driver, so you'll have to reboot in order to delete the locked file. Reboot!
- After rebooting and removing the Oracle9i directory, reinstall Oracle.

2) Make sure to assign IUSR_servername R&X permissions on the Oracle9i directory

3) Edit the following key: HKEY_LOCAL_MACHINE\ROOT\SOFTWARE\Microsoft\MSDTC\MTxOCI
Change the values of the three keys:
a. OracleOciLib - change from ociw32.dll to oci.dll
b. OracleSqlLib - change from SQLLib18.dll to orasql9.dll
c. OracleXaLib - change from xa73.dll to oraclient9.dll

4) Reboot again!
5) Test to make sure you don't get the evil error.

GOOD LUCK!

Wednesday, January 11, 2006

CS0007: Unexpected common language runtime initialization error -- 'Catastrophic failure '

Update: apparently, the reason why this error occurred was that my system had some security lockdown permission changes which conflicted with the list of patches below..hence the need to make those permissions changes in steps 4 and 5 below. Harumph.

Argh. One of the recent set of MS security hotfixes has broken ASP.net with the following error:
CS0007: Unexpected common language runtime initialization error -- 'Catastrophic failure '

I upgraded my Win2K server with the following patches:
KB905915 IE6 SP1
KB902400 2K
KB908523 2K
KB912919 2K
KB891861 2K SP4 Rollup
KB890830 Dec Malware Removal

I've found a workaround here:
http://www.iis-resources.com/modules/newbb/viewtopic.php?topic_id=4246&forum=4

Here is the text of the workaround:
PROBLEM
========
Running ASP.NET application was giving
Compiler Error Message: CS0007: Unexpected common language runtime initialization error -- 'Catastrophic failure'
RESOLUTION
============
There were some problems with the permission on the aspnet account. Later we found that EVERYONE group was missing READ permission on c:\windows\registration folder. Below given are the steps to check the permissions of aspnet account at various places.
Following are Generic Steps that we can take to fix the various issues related to ASP.NET that you are seeing on different Windows 2000 SP4 boxes which we believe is happening because of the security patches you installed.

Please make sure that the ASPX pages run under SYSTEM account before proceeding further with following steps
Steps 1 and 2 would make sure that you get rid of event id: 1007 and 1084
Follow Step 3 if you are getting if you are getting "Compiler Error Message: BC32400: Class 'CLSID_CorSysWrite_SxS could not be created 'Catastrophic failure'
Steps 4 and 5 are for "Compiler Error Message: CS0007: Unexpected common runtime initialization error -- 'Catastrophic failure'"

1. Running ASPNetRegIIS –ua followed by ASPNetRegIIS –i from the framework folder.

2. Make sure that ASPNET account has got permission as per following matrix
Location Access type Account Comments installroot\ASP.NET Temporary Files Read/write Process or configured impersonation. This is the location for dynamically compiled files. Beneath this location, application code generation takes place in a discrete directory for each application. The root location itself can be configured using the tempDir attribute of the section. systemroot\assembly Read Process or configured impersonation. This is the location of the global assembly cache. systemroot\system32 R Process Contains system DLLs loaded by the .NET Framework. systemroot\temp Read/write/delete Process Used for web services support. userprofile directory Read/write Process Used by the global assembly cache lock files and the common language runtime security configuration caching mechanism. If the user profile directory for the account doesn't exist, ASP.NET will use the default userprofile directory.application directory Read Process or configured impersonation. This is the location for application files. installroot hierarchy Read Process or configured impersonation ASP.NET must be able to access the system assemblies referenced in the Machine.config file in the config subdirectory under installroot. Default Web Site monitoring. Read Process Used for file change notification monitoring
3 Make sure that ASPNET account has got read permission on following keys
HKCR\CLSID\{0AE2DEB0-F901-478B-BB9F-881EE8066788}
HKCR\CLSID\{0A29FF9E-7F9C-4437-8B11-F424491E3931}
HKCR\CLSID\{0C7FF16C-38E3-11d0-97AB-00C04FC2AD98
4. In the %windir%/registration folder, make sure that the Everyone group has READ permissions.
- In the advanced security properties of the .clb files in the %windir%/registration folder, make sure that the Inherit from parent the permission entries that apply to child objects. Include these with entries explicitly defined here option is selected.
- Make sure that the Everyone group has one of the following permissions: Traverse permissions (“List Folder Contents”) on all parent directories (%systemdrive%, %windir%, and %windir%\registration), or The Bypass Traverse Checking permission is selected.
5. Running RegSvr32.EXE mscoree.dll from the C:\winnt\system32

Sunday, October 16, 2005

MS05-051 causes problems with ASP pages

There is a workaround by applying IWAM permissions to a specific folder. The fix given by Microsoft is to add RX permissions for IWAM on c:\winnt\registration folder - it corrects a dcom error on the server. This fix does NOT work for my ASP.net application. So I have removed the patch until an appropriate fix is made.

Saturday, February 12, 2005

"viewstate is invalid for this page and might be corrupted"

I didn't know much about .Net viewstates until yesterday when I needed to configure a .Net application living on multiple servers behind a load balancer. Suffice it to say that you need to generate an encrypted key and configure all servers to use the same key, rather than using machine.config's "AutoGenerate" setting:
machineKey validationKey="AutoGenerate,IsolateApps" decryptionKey="AutoGenerate,IsolateApps" validation="SHA1"

Here is an interesting article that tells you how to do this:
http://www.eggheadcafe.com/articles/20030514.asp

Viewstate isn't really the same as session state. Viewstate is a hidden field that stores page state between calls. The way that viewstate works is:
1. When asp.net returns an http response to a user, it compiles all the data field data into a big encrypted string.
2. The string is passed as a hidden field. When the user responds to the page, the viewstate is passed back to the server.
4. ASP.NET deserializes and decrypts the string to refill the form fields.
5. If the deserialization breaks, then you get the error "viewstate is invalid for this page and might be corrupted."

Viewstate can break if:
1. The servers aren't all using the same encryption/decryption keys.
2. The viewstate field is being truncated.
3. Other scenarios. Ahem.
Feel free to drop me a line or ask me a question.