No comments yet.
No trackbacks yet.
GDI+ Image.FromFile has a problem – here’s how to fix it
about 1 year ago - No comments
In GDI+ you can call Image.FromFile to load an image from a file. BUT there are several issues with this call, the biggest being that GDI+ will keep the file open long after you are done with it. Here is an image loader that gets around this issue. If you are running a high volume More >
The EntityContainer name could not be determined
about 2 years ago - 2 comments
If you encounter this error, make sure your constructor is calling the base constructor for an ObjectContext and passing the EntityContainer name. System.ArgumentException: The EntityContainer name could not be determined. The provided EntitySet name must be qualified by the EntityContainer name, such as’EntityContainerName.EntitySetName’, or the DefaultContainerName property mustbe set for the ObjectContext.
System.Data.EntitySqlException
about 2 years ago - 1 comment
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 More >
Javascript error reporting
about 2 years ago - No comments
It’s all very well to be capturing all the errors that happen server side, logging them to a database and reporting on them like any robust web service ought to, what about the client? So today I added reporting for client-side errors to the project I’m working on. Turned out to be remarkably easy. A More >
AntiVirus Software is the Worst Software!
about 2 years ago - No comments
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 More >
ASP.NET Custom Validation
about 2 years ago - No comments
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!
about 5 years ago - No comments
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 More >
Giving up on Internet Explorer
about 5 years ago - No comments
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 More >
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!”