Posts tagged fail

WMPnetwk.exe started using 50% of my CPU

I’m not even using Windows Media Player on Windows 7 and I certainly haven’t turned on any network sharing features so why is this service using up so much CPU?

Now disabled thanks to advice on the CNet forums here.

Some witty comments there too like “3. Uninstall Windows Media Player 11…I mean if after 11 versions it still doesn’t work right then its probably not gonna is it!”

System.Data.EntitySqlException

System.Data.EntitySqlException: ‘ExceptionRecord’ could not be resolved in the current scope or context.
This seemingly small Exception took a while to figure out.  I was calling the ObjectContext constructor without specifying the default container name.  Adding that solved the problem and now the Entity Framework is happily talking to SQL Server Compact again.
For anyone else looking for a solution to this, here’s the stack trace you might see:

System.Data.EntitySqlException: ‘ExceptionRecord’ could not be resolved in the current scope or context. Make sure that all referenced variables are in scope, that required schemas are loaded, and that namespaces are referenced correctly., near escaped identifier.

at System.Data.Common.EntitySql.CqlErrorHelper.ReportIdentifierError(Expr expr, SemanticResolver sr)

at System.Data.Common.EntitySql.SemanticAnalyzer.ConvertIdentifier(Expr expr, SemanticResolver sr)

at System.Data.Common.EntitySql.SemanticAnalyzer.Convert(Expr astExpr, SemanticResolver sr)

at System.Data.Common.EntitySql.SemanticAnalyzer.ConvertRootExpression(Expr astExpr, SemanticResolver sr)

at System.Data.Common.EntitySql.SemanticAnalyzer.Analyze(Expr astExpr, DbCommandTree commandTree)

at System.Data.Common.EntitySql.CqlQuery.AnalyzeSemantics(DbCommandTree builderTree, Expr astExpr, Perspective perspective, ParserOptions parserOptions, Dictionary`2 parameters, Dictionary`2 variables)

at System.Data.Common.EntitySql.CqlQuery.Compile(DbCommandTree builderTree, String queryText, Perspective perspective, ParserOptions parserOptions, Dictionary`2 parameters, Dictionary`2 variables)

at System.Data.Objects.EntitySqlQueryState.Parse(DbCommandTree parseTree)

at System.Data.Objects.EntitySqlQueryState.GetExecutionPlan(Nullable`1 forMergeOption)

at System.Data.Objects.ObjectQuery`1.GetResults(Nullable`1 forMergeOption)

at System.Data.Objects.ObjectQuery`1.System.Collections.Generic.IEnumerable.GetEnumerator()

AntiVirus Software is the Worst Software!

Whilst checking some log files today I came across some errors where a non-logged in user was accessing pages that only a logged in user would ever see. Googlebot, MSNbot and others never try to index these pages because they can’t reach them so how was this bot getting there and why wasn’t it reporting itself as a bot?

Here’s the details on what I was seeing:

> UserAgent = Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)
> Referrer =
> User Host = 150.70.84.28

A quick search revealed that this address belongs to Trend Micro in Japan. One of our customers had their anti-virus software running and after each request they made we got another one from this IP address. Apparently it takes each request you make, sends it off to Japan and then they reissue the request from there pretending to be a normal user!

Presumably they are looking for viruses on your pages but what a dumb approach!

For starters, if I were a virus author it would be utterly trivial to spoof them with a ‘happy’ page, for another it’s a pretty abusive approach to ‘security’, and lastly do you really want all your browsing history to be in the hands of Trend Micro in Japan?!?!?!

ASP.NET Custom Validation

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.customvalidator.aspx

How annoying, “If the input control is empty, no validation functions are called and validation succeeds. Use a RequiredFieldValidator control to require the user to enter data in the input control. ”

The missing parameter you need to set is ValidateEmptyText=”true”.

Wasted a good half hour finding that little oddity.

Take out the trash!

When I shut my laptop down it takes forever to get from selecting Shutdown on the menu to it actually asking what kind of shutdown I wanted. A quick look at filemon revealed the problem – on shutdown Windows is scanning every file in the recycle bin. And having just deleted a very large source tree with thousands of files that scan was taking forever.

After taking out the trash my laptop now shuts down at a more normal rate.

Giving up on Internet Explorer

Today marks the day I finally gave up on Internet Explorer. I tried IE7, I wanted to like it, but it was bloated and slow, gobbling up 300MB of RAM. I’ve been using Firefox on and off for months but today I’m switching to it as my primary browser on all my PCs. It’s simply a better user experience, has more add-ins that I want, and it’s svelte compared to the monster IE has become.

Yeah, I know the rest of the world switched years ago, why did it take me so long? Guess it was just the result of 10 years at MSFT.