VS 2005 Beta 1 Emulator Setup Issue

Just thought I’d drop the hint: I was installing VS.NET 2005 Beta 1 on a new PC today, and hit an error during the Device Emulator install, which occurs after VS.NET is installed (thankfully).  If you get an error essentially saying ‘…Error 1603…Fatal Error during installation…”, the following blog entry will help immensely:

http://blogs.msdn.com/amit_chopra/archive/2004/07/07/175484.aspx

Their proposed ‘solution’ worked perfectly.

2005 Go Live approaching!

Wow, talk about me falling behind…Microsoft ‘recently’ announced that Beta 2 of VS 2005 will ship around end of March, and at the same time receive Go Live! licensing.  Go Live! was introduced to assure developers that applications being built with a beta version of software would be production-ready.

In addition, the RC will ship around the September timeframe…for those who have been worried by ‘delays’, I would assume Microsoft is doing all it can to deliver this year, and I wouldn’t expect anymore delays.  They haven’t missed a ‘year-branded’ product release yet…

New Windows Mobile Software Released

Just got my official (public) notification today, had to pass it along!  .NET CF SP3 and ActiveSync 3.8 are now available.

The CF.NET SP3 release notes are found on its page.  ActiveSync’s, though, are not listed there.  I’ve heard the only real changes were:

  • Windows XP SP2 security pop up warnings that appear the
    first time a Windows Mobile devices is docked have been eliminated
  • Remote PC Sync (via Wifi or LAN) is turned off by default.
    However, users can turn this functionality back on.

So if that’s all, not that critical of an update unless affected by these issues.  Be sure to check any installed readme files, etc. for more info.

App.Config for CF.NET

Once again, eggheadcafe comes through! They show how to add the capability of App.Config/AppSettings to your Compact Framework application. It’s very simple, really, and I’m surprised Microsoft didn’t include this by default. Apparently the AppSettings property has some other skeletons in it that prevented it being ported…

Welcome to my nightmare!

Hello!!!  Where the heck have I been, you ask?  Well, I’ve been quite the busy little worker bee the past few months on my ‘new’ project.  It’s not left much time for website work, or blog posting, etc. 

But, luckily, work is finally letting up, so I’ve already moved my blog to a new piece of software (DasBlog).  The Tiki was a little too much to handle right now, and I’ll be removing it shortly, after I transfer the entries to this software.

One other thing, I haven’t enabled IP logging yet, so I’ve temporarily disabled commenting on the blog…sorry, it should be up soon!

But check out the new features, as I’m about ready to make my first post!

ASP.NET – Custom validator for list controls

All I have to share right now is a topic we’ve been struggling a little with at work. CheckBoxList and validators. Most validators work only with a subset of the web controls in ASP.NET. For example, you can’t add a RequiredFieldValidator to a CheckBoxList. Why? Dunno why exactly, pry something to do with the multi-select controls vs. others like RadioButtonList that are single-select. Still not a good reason at all…

But I was finally able to find an article explaining how to create a RequiredFieldValidator that works with CheckBoxLists. Unfortunately it doesn’t work on the client-side; the scripts are disabled, as they don’t work with these ‘excluded’ controls. But I’m working on that right now and will post the solution when I have it….

UPDATE: Here’s the answer to the client-side validation problem. It creates a JS function that the validator calls for its evaluationFunction. Pretty sweet!

OO/.NET – Disposing of unmanaged resources

There are two areas of GC to be aware of. First, GC does not happen right away. If you aren’t proactive about removing objects, they stay in memory waiting for GC to pick them up (destroy them). And GC has its own algorithm for figuring out how to do so, so you never know exactly when that will be, or if soon enough to save your app from high load. This is where calling Dispose() on a object comes in.

For today’s subject, I also want to mention releasing unmanaged resources efficiently, in case your caller code forgets to Dispose of them, or can’t wait for GC. These resources (such as window handles, etc.) are not automatically disposed of. In a sense, they get orphaned as their owner (your managed class) has disappeared. The garbage collector doesn’t know how or want to find all such resources and/or how to destroy them as well, nor should it have to; GC is managed, it wouldn’t know unmanaged resources exist. If it had to worry about not only the base object you asked it to collect, but also objects beyond that one, GC would become even more taxed and complex than it already is.

Here’s a very good article on MSDN showing how to properly code classes that use such resources and how to efficiently release or recycle system resources inside the application.

ASP.NET Cache ‘Locking’

Looks like you can count on blogs every 2-3 days, sometimes more when I have the time….my bar time gets in the way…..

Thought I’d pass along another ASP.NET performance-related article. This one discusses how to handle concurrency issues with the Cache object. Not many developers realize this problem, where multiple threads (pages) could be trying to access a Cache object at the same time, causing it to possibly be loaded multiple times. This articles gives a good explanation of the problems, and how to avoid it through techniques such as thread synchronization.

Server Explorer -AND- URL Paths

Don’t have access to SQL Server Enterprise Manager/Query Analyzer at home? One of the little known jewels in VS.NET is the Server Explorer. Until a couple of months ago, when a co-worker had just that problem and discovered how much was really in there, I had only looked at it a little, not realizing how useful it was for data-intensive applications.

To bring up the explorer, goto ‘View’ -> ‘Server Explorer’ (shortcut Ctrl + Alt + S). You’ll see two sections, ‘Data Connections’ and ‘Servers’. The Data Connections section allows you to create OLEDB connections to databases on your network (or locally). The Servers section gives you the opportunity to remotely view Event Logs, Performance Counters, etc. on remote machines.

While the Servers section is useful for remote development or monitoring, I spend most of my time in the Data Connections section. The interface gives you most of the capabilities you need in Enterprise Manager: design tables, retrieve/alter data, run SQL queries and stored procedures, and even the ability to step into and debug a stored procedure running! This all comes in a UI that looks strikingly similar to Enterprise Manager’s windows. In addition, any connections you add will show up in most data wizards in the Designer.

NOTE: Most of the options are accessible via a right-mouse click.

One other quick note. I get so confused when dealing with URLs, as to what methods on HttpRequest, etc. are going to give me what ‘path’…is it virtual, or a physical path, and what does it include. I ran across this article today while looking for a related answer, pretty nice summary of the different methods!

ASP.NET, Threads and Asynchronous Calls

Doing a little refresher on ASP.NET and optimizing performance thru threading/asynchronous calls. It’s a very important topic that not many developers consider (or consider properly) when building applications.

This first article from MSDN serves as an excellent low-level discussion of how threading is done, as well as discussing the alternatives and their pros/cons.

Right now I’m reading through another article I just found on MSDN in a similar vein, talking about using asynchronous calls with web services. I’ve seen similar articles before, hopefully this one will be sufficient, otherwise I’ll have to go hunt down those other sites.