my.net

My Photo
Name:
Location: United States

Tuesday, April 24, 2007

svchost.exe 100% CPU usage

XP prof sp2 For past 2 days, my PC starts freezing after logging in. I have noticed svchost.exe corresponding to a larger set of services (AudioSrv, ... winmgmt, wuauserv) using up 100% cpu. After killing svchost.exe, everything comes to normal, but without those services - which is not recommended as you will lose all the features such as network, audio, etc After googling, I came across a suggestion on removing c:\windows\softwaredistribution folder (maybe wuauserv is going crazy). After removing the folder, pc starts up normally.

  • The workaround is to remove the c:\windows\softwaredistribution folder and restart the pc

Powered by Bleezer

Saturday, April 21, 2007

WS Enhancements & WS-*

The Web Services Enhancements (WSE) is a .NET class library that augments the .NET Framework and related technologies to provide an implementation of various WS-* specifications. If you look across the WS-* specifications you see a trend where functionality is being elevated from the transport protocol level (security, reliability, session management) to the message protocol level (WS-Security, WS-ReliableMessaging, WS-SecureConversation) and when combined with agreed specifications for data exchange (XML, XML Schema, SOAP, WSDL) and existing transport protocols (HTTP, TCP, UDP) this enables adaptable and extensible applications that also deliver on the goals on interoperability and integration.

Powered by Bleezer

Thursday, April 19, 2007

Microsoft Message Queuing duplicate message removal mechanism

http://support.microsoft.com/default.aspx?scid=kb;EN-US;255546

Powered by Bleezer

Wednesday, April 18, 2007

Eval Vs Bind

use of two distinct operators for binding: Eval and Bind. Eval is an operator you use in data-binding expressions to access a public property on the bound data item. Functionally speaking, it is nearly equivalent to the DataBinder.Eval method you would have used in ASP.NET 1.x in the same situation. As used in the preceding code, Eval is an ASP.NET 2.0-only feature and will generate a compile error if used in an ASP.NET 1.x application. Furthermore, it will throw an exception if used in an ASP.NET 2.0 page outside of a template. The Bind operator is like Eval, except that it adds the ability to write data back to the original data source field. In the previous code snippet, notice that at display time the Bind operator sets the SelectedValue property of the DropDownList control with the value of the country field from the data source. So, how are values passed back to the control for updating the data source?

Powered by Bleezer

Sunday, April 15, 2007

divider label .NET

Public Class DividerLabel Inherits System.Windows.Forms.Label Dim m_spacing As Integer Dim m_borderStyle As Border3DStyle = Border3DStyle.Etched _ Public Property LineStyle() As Border3DStyle Get Return m_borderStyle End Get Set(ByVal Value As Border3DStyle) If Value m_borderStyle Then m_borderStyle = Value Me.Invalidate() End If End Set End Property _ Public Property Spacing() As Integer Get Return m_spacing End Get Set(ByVal Value As Integer) If Value m_spacing Then m_spacing = Value Me.Invalidate() End If End Set End Property Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs) Dim g As Graphics = e.Graphics Dim f As Font = Me.Font Dim b As Brush = New SolidBrush(Me.ForeColor) Dim sf As StringFormat = StringFormat.GenericTypographic Dim labelBounds As New RectangleF(0, 0, Me.Width, Me.Height) Dim textSize As SizeF = g.MeasureString(Me.Text, f, Me.Width) g.DrawString(Me.Text, f, b, 0, 0, sf) If textSize.Width + Spacing Me.Width Then Dim startingPoint As Point startingPoint.X = textSize.Width + Spacing startingPoint.Y = textSize.Height \ 2 ControlPaint.DrawBorder3D(g, startingPoint.X, _ startingPoint.Y, _ Me.Width - startingPoint.X, _ 5, m_borderStyle, Border3DSide.Top) End If End Sub Public Sub New() Me.SetStyle(ControlStyles.DoubleBuffer, True) Me.SetStyle(ControlStyles.AllPaintingInWmPaint, True) Me.SetStyle(ControlStyles.ResizeRedraw, True) End Sub End Class

Powered by Bleezer