Saturday, November 30, 2013

ASP.NET Web Application crash, faulting module KERNELBASE.dll, exception code 0xe053534f

 

Stressing your ASP.NET application you may bring the whole Website out-of-order. The application pool will stop after numerous crashes: look for system event log entry

Application pool '<your pool name>' is being automatically disabled due to a series of failures in the process(es) serving that application pool.

Referring application log event log entries are:

Faulting application name: w3wp.exe, version: 7.5.7601.17514, time stamp: 0x4ce7afa2
Faulting module name: KERNELBASE.dll, version: 6.1.7601.18229, time stamp: 0x51fb1677
Exception code: 0xe053534f
Fault offset: 0x000000000000940d
Faulting process id: 0x%9
Faulting application start time: 0x%10
Faulting application path: %11
Faulting module path: %12
Report Id: %13

and

Fault bucket , type 0
Event Name: APPCRASH
Response: Not available
Cab Id: 0

Problem signature:
P1: w3wp.exe
P2: 7.5.7601.17514
P3: 4ce7afa2
P4: KERNELBASE.dll
P5: 6.1.7601.18229
P6: 51fb1677
P7: e053534f
P8: 000000000000940d
P9:
P10:

Attached files:

These files may be available here:
C:\ProgramData\Microsoft\Windows\WER\ReportQueue\AppCrash_w3wp.exe_ffdd7dc3338f9bc64b4c591c349d26eadb9c3c_11b74904

Analysis symbol:
Rechecking for solution: 0
Report Id: 922480ec-59e6-11e3-b316-00155d49e7d5
Report Status: 4

There are some useful articles how to debug such crash. One of my favorite is this article from Tess Fernandez:

Debugging a .NET crash with rules in Debug Diag

If you use SQL database for ASP.NET state management, you may try this quick fix:

  • go to ASPState database (for example, using SQL Management Studio)
  • clear ASPStateTempSessions table:

      delete FROM [ASPState].[dbo].[ASPStateTempSessions]

This fix helped us to bring the pool to run again.

Enjoy

Wednesday, June 12, 2013

Search and replace using PowerShell

 

Last week we were faced to a problem: there are numerous files distributed in hierarchy of folders on the disk and we are required to replace a pattern string in each of these files to a specified replacement string. (In fact, we had to add quickly hardwired location parameters to all the AJAX ModalPopupExtender controls in an ASP.NET solution).

The challenge is: the files cannot be copied outside of the target machine, processed and copied back – all the processing MUST occur on the target box using only on-board tools. And there aren’t any built-in software in Windows (Server 2008 R2) providing such functionality like S&R, Visual Studio or other similar tools, enabling recursive search and replace operations.

Some of us started to wipe dust off their DOS command line skills and write some batch files. But the better solution is in use of built-in PowerShell.

Start PowerShell and launch following command:

dir –r {fileseach pattern}| %{ $x = get-content $_ ; $x = $x -replace ({search pattern}, {replacement pattern}) ; set-content $_ $x }

For example:

dir -r *.aspx| %{ $x = get-content $_ ; $x = $x -replace ("ModalPopupExtender ID", "ModalPopupExtender X=""100"" Y=""100"" ID") ; set-content $_ $x }

replaces string

ModalPopupExtender ID

with

ModalPopupExtender X="100" Y="100" ID

in all .aspx files in current folder and below

This makes from

<ajax:ModalPopupExtender ID=”mpe1” …/>

the string

<ajax:ModalPopupExtender X="100" Y="100" ID=”mpe1” …/>

So all the processing occurred on the target box without any need to copy the files to equipped machine, process them and copy back. Also without any need to install/deploy additional software to the target machine specially to perform desired processing.

Next time you need to replace some string with another one in a number of files distributed in recursive subfolders using only built-in software of Windows OS – do not panic: use pattern PowerShell command from above and enjoy!

Monday, June 10, 2013

Microsoft Azure VM billing model changed

Scott Guthrie announced at TechEd 2013 changes in VM billing model: you pay only for running - and not
as mentioned before also for stopped VMs.
So please disregard my previous post and enjoy!

Wednesday, May 01, 2013

Microsoft Windows Azure IaaS: delete not used VM to avoid unnecessary costs

 

Just a short hint, which can protect against unexpected costs.

Once you decide not to use a virtual machine you created on Microsoft Windows Azure, you should delete it from your account – and not just shut down. Do not be afraid, the virtual disk this VM used will not be destroyed – it is still existing in storage services part of your account. Only not used VM can and must be deleted.

The billing model of Microsoft Windows Azure is constructed to bill for a VM even if the machine isn’t running. That’s similar to car rent: if you rent a car, you have to pay the rent even if the car is just standing on the park place. No gasoline/mileage costs (computing, networking etc. in cloud computing terms) , but the rent.

So to avoid the bills for an unused VM just delete it after shut down. Remember: you can re-create this VM any time as long as the VHD this VM used is kept in the storage of your account (check the storage container(s) ).

This does mean: you pay only for the VHD left after the VM is deleted – this blob is residing in the storage and is calculated regarding your billing model. The bigger is the VHD the more you have to pay. So if you do not plan to re-create the VM (re-use it) later, you’d better delete the VHD too. Anyway, the costs for “parked” and not used VHD in the storage are incomparable lower than the costs of a not used but not deleted VM.

Enjoy!

Wednesday, April 24, 2013

Retrieving the COM class factory for component with CLSID {CF4CC405-E2C5-4DDD-B3CE-5E7582D8C9FA} failed due to the following error: 800703fa

 

Once you use WMI services in your management code, you may suddenly receive following error message:

Retrieving the COM class factory for component with CLSID {CF4CC405-E2C5-4DDD-B3CE-5E7582D8C9FA} failed due to the following error: 800703fa.
   at System.Runtime.Remoting.RemotingServices.AllocateUninitializedObject(RuntimeType objectType)
   at System.Runtime.Remoting.Activation.ActivationServices.CreateInstance(Type serverType)
   at System.Runtime.Remoting.Activation.ActivationServices.IsCurrentContextOK(Type serverType, Object[] props, Boolean bNewObj)
   at System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck)
   at System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache)
   at System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache)
   at System.Activator.CreateInstance(Type type, Boolean nonPublic)
   at System.Management.MTAHelper.CreateInMTA(Type type)
   at System.Management.ManagementPath.CreateWbemPath(String path)
   at System.Management.ManagementPath..ctor(String path)
   at System.Management.ManagementClass..ctor(String path)

The reason is: the WMI performance object you want to access is not more properly registered or the registration is damaged (for example, due to lack of buffer space).

To ensure the cause of the error use the WMI diagnostic tool as mentioned in:

http://support.microsoft.com/kb/926640

The tool contains a VBS script WMIDiag.vbs.
IMPORTANT! Start the script using command line:

>cscript.exe WMIDiag.vbs

to receive proper tool output.
The output consist of (at least) two files: the report file WMIDIag-…-REPORT.TXT and the log file WMIDiag-….LOG. Both files contain date/time stamp and short machine info (OS Version etc.) in their names and located in %TEMP% folder of current user (i.e. C:\USERS\ADMINISTRATOR\APPDATA\LOCAL\TEMP if ran as administrator).

The report file contains mostly relevant information about the error’s cause, for example:

38819 09:29:32 (0) ** - Root/WMI, SystemConfig_CPU, 0x80041002 - (WBEM_E_NOT_FOUND) Object cannot be found.
38820 09:29:32 (0) **   MOF Registration: ''
38821 09:29:32 (0) ** - Root/WMI, SystemConfig_LogDisk, 0x80041002 - (WBEM_E_NOT_FOUND) Object cannot be found.
38822 09:29:32 (0) **   MOF Registration: ''
38823 09:29:32 (0) ** - Root/WMI, SystemConfig_Power, 0x80041002 - (WBEM_E_NOT_FOUND) Object cannot be found.
38824 09:29:32 (0) **   MOF Registration: ''
38825 09:29:32 (0) ** => When a WMI performance class is missing (i.e. 'Win32_PerfRawData_TermService_TerminalServices'), it is generally due to
38826 09:29:32 (0) **    a lack of buffer refresh of the WMI class provider exposing the WMI performance counters.
38827 09:29:32 (0) **    You can refresh the WMI class provider buffer with the following command:
38828 09:29:32 (0) **
38829 09:29:32 (0) **    i.e. 'WINMGMT.EXE /SYNCPERF'

The hint about refreshing the class provider requires following updates:

- the command is

WINMGMT.EXE /RESYNCPERF

- you have to restart your process accessing the WMI provider (i. e. if your ASP.NET application uses WMI provider, you have to restart the worker process or just launch iisreset).

Enjoy!

Sunday, February 10, 2013

Enable time synchronization for Hyper-V guest VM

It’s a very good idea to enable time synchronization between Hyper-V host and guest VM. Otherwise, you may run into risk, that neither RDP session not file sharing can be used for communication with the VM. The error message may look like:

 

"Remote Desktop cannot verify the identity of the remote computer because there is a time or date difference between your computer and the remote computer.  Make sure your computer's clock is set to the correct time and then try connecting again.  If the problem occurs again, contact your network administrator or the owner of the remote computer."

 

Yes, you should connect then the console on the VM and check and setup the date/time manually. But you can let the system do it automatically for you.

Open Hyper-V settings for the VM and check the “Integration services” settings: which services are enabled

image

Ensure “Time synchronization” service is enabled:

image

Enjoy!

Sunday, February 03, 2013

Windows Phone 8: external USB disk is back!

Just a few days using my new Windows Phone 8 device: the first and breaking change – the phone as external disk is back.

image

No need to exercise with Zune to download photos and videos from the device – as required by Windows Phone 7.x.

I really enjoy revival of this feature – do you?

Thursday, January 24, 2013

"Unable to create offline join information" on joining domain from Windows 7, Windows 8 or Windows Server 2008 R2 machine

Joining domain you may enter correct domain and administrator account data, but finally get an error:

"Unable to create offline join information"

View into ADSI users and computers applet on the domain controller shows, that computer account was created and is already listed, but the victim machine still isn’t joined to domain.

(Possible) resolution: check for any anti virus software running on the machine to be joined. In our case it was McAfee – once we’ve disabled it, the join succeeded immediately, and we enjoy Smile

"No mapping between account names and security IDs was done" error message while SQL Server 2008 Setup on a Hyper-V VM

While installing SQL Server 2008 on a Hyper-V VM you may encounter following problem: setting accounts for SQL Server services you’ll get an error box with message

"No mapping between account names and security IDs was done"

The account data: domain, login, password are correct, but the message comes over and over again and doesn’t let continue the setup.

In this situation there’s a good time to check if the VM to install SQL Server is using a copied VHD. Once the VHD is just copied (for example, you are installing a domain, setup a blank VHD and copy it to deploy different domain member machines) you have to change the machine ID for each (!) VM to deploy.

To change the ID before installing SQL Server 2008 in the VM with copied VHD use the built-in Windows tool SysPrep.

image

Using SysPrep on the VM do not forget to check the box “Generalize”. You will need to enter keyboard, location and probably some additional settings on the next VM start.

Enjoy!

PS: BTW, the best way is still to setup the machine fro SQL Server from scratch, I guess.

UPD: Good article here: http://macraem.wordpress.com/2010/02/25/no-mapping-between-account-names-and-security-ids-sql-server-install-and-sysprep-generalize/

Sunday, January 20, 2013

Using CoreConfig on Windows Hyper-V Server 2012

 

Microsoft Hyper-V Server 2012 is a great opportunity to virtualize the whole IT environment for low cost (free download, free-of-charge activation – as for today).

As for core server there aren’t any window based management tools, the administrator may want to learn and exercise console and powershell commands. Alternatively, there’s an administration package named CoreConfig at codeplex: http://coreconfig.codeplex.com/

After copy to the target box one may encounter problems starting the configuration tools. The reason is based on changed command set for Windows Server 2012 and described here:

http://coreconfig.codeplex.com/discussions/397446

So, once you downloaded the content of the package to your fresh installed Hyper-V Server 2012 box, the next step is: find “oclist” string and replace it by “dism” in following files:

  • Start_CoreConfig.wsf
  • CoreConfig.ps1
  • Networking.ps1
  • Roles.ps1

After the files are changed you can start the Start_CoreConfig.wsf as usual (as on Hyper-V Server 2008 R2) – or launch powershell and start single modules.

If you get an error message

"File cannot be loaded because the execution of scripts is disabled on this system"

you’ll need to set execution policy to unrestricted with following powershell command:

Set-ExecutionPolicy Unrestricted

After the steps are done you should be able to start the configuration modules as expected:

image

Enjoy!