Tuesday, May 06, 2008

It was pointed out to me recently that I've gotten a bit lazy with my coding. I completely blame it on implicitly typed local variables. Read more here...

[A New DevLife Post]

Tuesday, May 06, 2008 10:21:49 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Friday, April 18, 2008

Adding to the extensive Training Kit ofr Visual Studio 2008, Microsoft has recently released a set of Hands on Labs that are part of a training kit for the .NET 3.5 Extensions that is still in production. Read more...

[A New DevLife Post]

Friday, April 18, 2008 2:45:47 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Friday, March 07, 2008

Charlie Calvert has created a new CodeGallery project to centralize blog posts and articles about some of the things that the C# and VB teams are working on for the next version(s) of their languages. You can read about and discuss (and influence) the direction of these features. Read more ....

[A New DevLife Post]

Friday, March 07, 2008 8:46:39 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Friday, January 25, 2008

This is completely insane. Someone from Romania emailed me about selecting an icon file for a ClickOnce deployment so that the application icon is used for the installation and for the shortcut.

He had tried my hack that I have blogged about, written about in CoDe Magazine and shown in conference presentations. The hack requires manual editing of the manifest file and I learned it in the forums.

I had never been able to discover any other way to do it.

There is a new version of the MAGEUI tool, the UI for building ClickOnce manifests, so I went in to see if there was anything different with respect to that.

On the file page, things looked the same as always:

So I was staring at it and looking at the file type column and wishing I could use it. But it's always appeared to be disabled. While I was staring and thinking, I was clicking on that and on the second click, a drop down list appeared.

And when I clicked the arrow, there it was!

Understand, that in a normal UI property sheet like this, the arrow would be visible when you first click the cell.

So I went back to the previous version of MAGEUI and after two clicks, no dropdown. But guess what, one more click and there it was!

All this time? All of the blog posts I wrote, the article in CoDe Magazine. Nobody every emailed me to tell me "oh, here's how". You'd think...  Clearly it's not THAT obvious! Oh well.

I haven't ever seen this documented (though I sure wish there was a copy of Brian Noyes ClickOnce book nearby to see if he knew).

Well, there you have it.

Friday, January 25, 2008 10:30:05 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Monday, January 21, 2008

Kathleen Dollard recently wrote about VS2008 letting us easily make our app settings publically accessible to other projects. It inspired me to share my solution for how I did this in VS2005 when it wasn't so easy. Read more...

[A New DevLife Post]

Monday, January 21, 2008 1:54:23 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Friday, January 18, 2008

I was moving some code around and had a nice WCF Service Interface and Service Class created. So I copied them into a new project where I was re-creating my work.

When I tried to debug (self-host) the service, just to test it out with the embedded WCF Test Client.

But I kept getting this error:

"The client was unable to retrieve service metadata. Make sure the service is running and exposing metadata."

This made no sense. My config file was fine. I even created a new WCF service in the solution, confirmed that it worked properly, then compared the config files line by line.

No problems.

After going around in circles for a while (including getting zero google results for that error message), a thought occurred to me. I copied and pasted the entire contents of the Interface and the service class. I hadn't changed the namespace!

That was the problem. I fixed the namespace and the service ran in the Test Client just fine.

Friday, January 18, 2008 4:52:42 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [2]  | 

You can now finally get at the .NET Source code through VS2008! Read more

[A New DevLife Post]

Friday, January 18, 2008 8:42:43 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Sunday, December 30, 2007

While there are lots of awesome new features in VB9 and C#3.0, everything has taken a back seat to LINQ. I am, however, growing more and more fond of extension methods. Read more...

[A new DevLife post]

dotNET | VB
Sunday, December 30, 2007 4:50:10 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Tuesday, November 20, 2007

When opening a dbml file created in a pre-RTM version of Visual Studio 2008, you will probably see this error message:

Cannot load '[filepath].dbml': Error encountered, check Error List window for details.

Looking in the error list window, you might see the following errors:

Build failed due to validation errors in [filepath].dbml.  Open the file and resolve the issues in the Error List, then try rebuilding the project. 

and

There is no Unicode byte order mark. Cannot switch to Unicode.

Opening up the dbml file in the XML editor, the intellisense does not point out any validation errors.

 I couldn't see the problem.

Then I created a new LINQ to SQL file and looked at the xml,noticing that the encoding was:

<?xml version="1.0" encoding="utf-8"?>

while the old file had

<?xml version="1.0" encoding="utf-16"?>

So I modified the old file changing the encoding to utf-8 and voila, my project compiled and the file opened up in the designer.

Tuesday, November 20, 2007 7:29:07 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 
 Saturday, October 27, 2007

A few years ago, I wrote a little utility for one of my clients who uses Crystal Reports XI to design reports inhouse. They wanted other people on the corporate intranet to be able to see and refresh the reports and if necessary, enter new parameters. Since they weren't designing reports, it didn't make sense to buy licenses for everyone and I was able to (very easily) come up with a viewer utility that did the trick. I finally wrote this article about it for ASPAlliance, as they have a great collection of articles (mostly written by Eric Landes).

Writing a Viewer Utility for Crystal Reports

Saturday, October 27, 2007 1:31:39 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Friday, October 26, 2007

From Jeff Beehler on Microsoft's VSTS team:

We recently discovered that the VPCs we distributed as part of the VS2008 Beta2 release will expire on Thursday, November 1, 2007, much earlier than we had originally expected.  Since the timeout is at the OS level, we cannot automatically extend the timeout period.  As such we are currently in the process of reissuing the VPCs and expect to make them available early next week.

In the meantime, for anyone that has stored information in TFS that they need to access moving forward, we recommend that you immediately backup the TFS databases in preparation to move them to the updated VPCs.  For information to complete these steps, please refer to the documentation on Moving Team Foundation Server.

We're still working on additional guidance to respond to this situation.  As more information becomes available, I'll post it here. 

Note this is NOT talking about regular installations but the actual VPCs

Friday, October 26, 2007 3:40:24 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 
 Friday, October 19, 2007

I check the MSDN forums for Entity Framework and Astoria frequently and just noticed something today that made me smile.... read more...

[A New DevLife Post]

Friday, October 19, 2007 5:38:16 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Wednesday, October 03, 2007

Are you sitting? Buckled in?

Yes it's true. It was just announced. Microsoft is releasing source for .NET binaries and letting us debug into it as well!

Read more here!

[A New DevLife Post]

Wednesday, October 03, 2007 11:50:23 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Friday, September 14, 2007

Finally, you can draw a simple line on a windows form, just like in the old VB6 days. The VB2005 Power Pack has lines and other shape controls. It also has a compatilibity tool for leveraging VB6 printer code. Read more here!

[A New DevLife Post]

Friday, September 14, 2007 7:23:56 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Monday, September 10, 2007

There was something about using the build Error List in VS2005 that has irked me for a long time. The behavior continues in VS2008 so I finally took the time to see what the heck it was all about and got a little surprise! Read more here...

[A New DevLife Post]

Monday, September 10, 2007 9:16:48 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Sunday, August 12, 2007

I caught this in the Microsoft Download notifications:

Visual Studio 2008 SDK - August 2007 CTP

This CTP includes tools, documentation, and samples for developers to write, build, test, and deploy extensions for Visual Studio 2008 Beta 2.

Sunday, August 12, 2007 4:30:50 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Thursday, July 26, 2007

VS2008 Beta2 has been released. Read all about it here on Scott Guthrie's blog. Pay special attention to the special installation instructions. And if you could give me another few hours to get it downloaded before you hop on the bandwagon (or bandwidth as that may be), that would be oh so kind of you.

This is the biggest milestone towards the release. COngrats to all who have been working so hard on this.

Thursday, July 26, 2007 5:00:48 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

That's right. The first CTP of the next version of Visual Studio Team System will be released right on the heels of VS2008 Beta2. Read more...

[A New DevLife Post]

Thursday, July 26, 2007 9:44:48 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Friday, July 13, 2007

A few months ago, ClickOnce broke on my Vista machine where I was doing development. I had the same problem on my Vista laptop which I use for travelling and presentations. The short story about the problem is that whenever I tried to install a clickonce app, Vista went into this never-ending loop of insisting that I install .NET Framework and WinFx Runtime Components. The detailed description of the problem is blogged here.

A few people posted comments saying they had the same problem. Yesterday another person left a similar comment which put me on the trail to try to get it solved again. Patrick Darragh, who was a previous owner of ClickOnce at Microsoft hooked me up with Scott Tucker who is now working with ClickOnce. After I packed up my project and some other files to send to Scott, I emailed some of the people who had left comments to see what their status was.

One of them, John Sinclair, emailed me back saying that he had figured out the problem! (I will refrain from entering about a hundred exclamation points there. :-))

It turned out that by using .NET's command line tool, MAGEUI to manually build manifests was the source of my problem. What I didn't realize, until John pointed it out, is that the first time you select a different program to run, Vista has the checkbox for "always use this" ON BY DEFAULT. That's bad bad bad. I thought defaults were supposed to be false  [Don Kiely has a better end for my sentence:] "safe and sensible".

 Then when trying to install ANY clickonce application, for example, the XAML Pad app in this post by Charles Petzold, would somehow trigger the .NET installer. It doesn't make perfect sense to me why trying to open up MAGEUI from Internet Explorer would fire off all of that nonsense, but that's what it did.

So the fix was to go into Vista's Default Programs settings (available from the start button, then into "Associate a file type or protocol with a program" and change the default app to "Application Deployment Support Library". Here is what it looked like before I fixed the problem

Oddly, while IE7 exhibited this problem, Firefox did not. However Firefox must still be using the default app lists because it doesn't have any information about what to do with .application files in it's settings:

 

Friday, July 13, 2007 8:34:17 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [3]  | 
 Thursday, June 21, 2007

I recently whipped together a small tool for a client and because it was so small (and for only one person to use), I used some simple drag n' drop wizardry for the form. I created a datasource pointing to a table in the SQL Server 2005 database on my develpment machine then dragged that datasource onto a form to create a navigation toolbar and a screenfull of text boxes and checkboxes.

When I finished it up and pointed it to the live SQL Server 2000 database I was having some strange issues with inserts and updates. Specifically, SQL Server was throwing this error: "Error converting data type varchar to bit."

A little digging showed me that the TSQL being sent to the databse was passing "True" and "False" to the bit fields rather than 0 and 1.

SQL Server 2005 didn't seem to mind this, but SS2000 sure did!

I looked at the dataset that was created by the wizard and the bit fields were properly identified as booleans.

But when I looked at the parameters collections of the Insert and Update statements that the wizard had built, I could see that the properties of my boolean values was set to DbType=AnsiString.

So even though I prefered to know why I was seeing a difference between SS2005 and SS2000, I modified the auto-generated Insert & Update statements to make the DbType "Boolean" which passed 0's and 1's up to the database and everyone was happy. Changint the DbType to Boolean automatically changed the ProviderType to "Bit". 

I have seen a few threads where people pointed out this problem but never saw any suggest my solution or provide a reason for SS2000 rejecting it. If this wizard is meant to be used by newbies, I don't know how they would deal with a problem like this.

 

dotNET | VB
Thursday, June 21, 2007 1:07:18 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Monday, May 28, 2007

I found a simple way to highlight information on a master/details form. More here...

[A New DevLife Post]

Monday, May 28, 2007 1:44:03 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Friday, May 25, 2007

XML is a pain to work with but because of it's importance, Microsoft is adding tooling into Orcas to make it easier. So, I was poking around in Orcas looking at what's new in tools for XML and XSLT. I even learned some stuff that was in VS2005 that I never paid attention to. Read more here...

[A New DevLife Post]

Friday, May 25, 2007 9:49:41 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Friday, May 18, 2007

[7/13/07: See this post for the solution!]

I have run into a bizarre problem with ClickOnce that is occuring with IE7 on both of my Vista computers.

Both computers have Visual Studio 2005 SP1 and the special vista version of VS2005 SP1. And on both of these, I can't use clickonce to install apps from  Internet Explorer. The ClickOnce mechanism wants me to install .NET.

Firefox doesn't have this problem. (Check out this earlier post.)

Here is a SIMPLE little nothing Hello World app. The only thing in it is this form which has ZERO .NET 3.0 stuff in it. It is pure .NET 2.0.

When I set the publish properties with NO prerequisites at all:

it still wants me to install .NET (on a Vista machine with .NET 2 and .Net 3 already there by default!)

I get the same effect if I run the publisher saying "yes, build a setup exe" with NO prerequisites installed.

If I give in and Install anyway, it gets stranger. It is installing WinFX Beta 2! I have actually let it go all the way through prior to this, which is why in this case it is saying "repair,etc...".

Even if I follow through the installation, ClickOnce continues to insist that I install it (again and again) so I can never launch /install my application.

This partciular computer has a new hard drive that I bought a few months ago on which I installed Vista Ultimate RTM, VS2005 and the service packs. No beta software has ever touched this metal.

I have done the same tests on my 2 month old laptop which also has Vista. I get the exact same results.

I have been at DevTeach for most of this week. A number of very (very) smart people who were at the conference looked at this and were equally mystified.

Brian Noyes created a hello world app in front of me and ran it with no problems.

John Bristowe pointed out the fact that it says "The following preqrequisites are required:" with nothing listed below. WIth no pre-reqs, that statement shouldn't exist. He checked the manifest and researched the schema of the manifest and still remained mystified.

Derek Hatchard spent some time looking at the page headers to see why IE and FF behaved differently.

Prior to DevTeach, I spent many hours trying to figure this out because it was having a pretty bad effect on the demos for one of my talks at DevTeach. At DevTeach, I spent every free minute trying to solve this problem (oh and another annoyance that has to do with IIS7 being super-secure...).

I left a post in the ClickOnce forum on Monday and it has qquickly gotten buried under two pages of questions that have been asked since then, and gone unanswered. It's a little scary how many questions people are asking on that forum.

So, I am putting it here in case anyone recognizes this problem and knows what to do about it. It sure made doing my ClickOnce session at DevTeach challenging, to say the least!

Update: at this point, I can tell the problem is not about IIS7, but it must be my computers. Once the problem began on these boxes, it now happens when, from either of these computers, I try to hit a ClickONce deployment site that is on an IIS6 server.

Friday, May 18, 2007 4:37:01 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [5]  | 
 Tuesday, May 08, 2007

IronPython, IronRuby, VBx.. what? "I-can't-get-no-respect"-VB is one of the cool new languages? Read more

[A New DevLife Post]

Tuesday, May 08, 2007 8:38:08 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Monday, April 30, 2007

Next announcement from Scott Guthrie in the MIX keynote is that Microsoft has created a Ruby implementation for .NET called IronRuby.

I'm looking at another SilverLight demo wiht xaml file that has a IronRuby code file as it's app source.

Monday, April 30, 2007 1:24:16 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

Scott Guthrie just mentioned (in the MIX keynote) that LINQ will be in Silverlight which means that browser based apps can grab data from the server and do LINQ queries on the client side.

Silverlight is definitely the darling of MIX so far!

Monday, April 30, 2007 12:51:35 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

ScottGu describes SilverLight as three parts.

We've seen the media capabilities of silverlight. That's the first chunk of it.

The second is the .NET capabilites of the run time ... from ScottGu's lips "a cross platform runtime of the .NEt Framework".

(IT IS ON THE WEB RIGHT NOW as Silverlight 1.1 Alpha!!!! Note that the Silverlight 1.0 Beta is also released today. 1.0 does not have the .NET run time but it does have a goLive license.)

The third is a new service called silverlight Streaming. You can push your silverlight assets (media etc. up to 4GB) onto a Microsoft server and it will push it out to your websites for you so you don't have to worry about server capabilities or getting slash-dotted. ;-) (This of course will scare people... about putting their code on Microsoft's servers... but that's another story..)

Monday, April 30, 2007 12:03:14 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

Rray Ozzie just announced that Expression Studio is shipping today. All MIX attendees will be getting "a special commorative edition".

Monday, April 30, 2007 11:55:54 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 

Right now Silverlight (wpf/e) is not for the feint of heart - lots of javascript coding involved.

But Ray Ozzie just announced (as I'm sitting here in the keynote) at MIX that Silverlight will support .NET as a first class .NET development environment. So you can develop silverlight apps in .NEt. This means that the silverlight  runtime will include .NEt. And since sliverlight is targetted at macs also this means that .NET will run on Macs. I'm assuming that this will be a subset of .NET, but ..... pretty cool.

Monday, April 30, 2007 11:53:24 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Thursday, April 26, 2007

I have been futzing with WPF/E today trying to get the concepts down and when I looked up, I saw a post from Mike Taulty that said telerik has Silverlight radControls!

The "blimey" comes from MIke, because the relative American exlamation is R-rated! :-)

www.telerik.com/silverlight

Very cool demos.

 

Thursday, April 26, 2007 2:18:33 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 

It took me a while to figure out how to get the WPF/E project template into Visual Studio 2005. Read more...

[A New DevLife Post]

Thursday, April 26, 2007 8:30:04 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Saturday, April 21, 2007

Somasegar announced (with great pride) the availability of the first Beta of Visual Studio Orcas a few days ago. There is a huge VPC available for download, but also express versions. Some other varieties (perhaps an MSI installer) are coming on MSDN Subscriber downloads as well. READ MORE

[A New DevLife Post]
 

Saturday, April 21, 2007 8:23:10 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Wednesday, April 18, 2007
Tuesday, April 17, 2007 11:06:08 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 
 Sunday, April 08, 2007

I finally noticed that Service Pack 1 for Visual Studio 2005 corrected two of the problems that I've mentioned in previous articles and blog posts about ClickOnce. read more...

[A new DevLife post]

Sunday, April 08, 2007 7:03:44 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Tuesday, January 23, 2007

I wrote an article for .NET newbies for DevSource called Getting Started with .NET Programming. It goes over the basic "what is .NET" question, then how to get your hands on the dev tools and then lists gobs of resources. It's short and sweet.

If you know anyone who is asking these questions, feel free to send them over that-a-way.

Tuesday, January 23, 2007 12:57:57 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Saturday, January 06, 2007

I had a wierd problem with tabbed data in a TextBox and need to get around it. WPF offered a solution, but I had to opt for straight .NET 2.0 anyway. Read more...

[A DevLife post]

Saturday, January 06, 2007 3:03:06 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Tuesday, January 02, 2007

I needed to use a monospace font in a report but did not want Courier as it looked too different than the rest of the text on the report. I did end up going with Lucida Console, but on the way to that decision, found a nice resource from someone who made a list of 22 monotype fonts along with some details about each and where to get them from.

Tuesday, January 02, 2007 10:29:06 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Sunday, December 10, 2006

We got nearly 3 hours with Anders Hejlsberg at the ASPInsiders Summit last week. He went over language innovations in C#3 and how they feed into Linq. I can't do a full brain dump in a single post, but here is some of what he talked about (with some added VB examples too for fairness, since the new goo in  C#3 and VB9 are usually discussed mutually exclusive of one another, though they do have a lot of innovations in common).

[A DevLife post]

Sunday, December 10, 2006 9:38:35 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Wednesday, December 06, 2006

I'm at Microsoft in Redmond for the ASPInsiders Summit, three days of training by various members of the ASP.NET Team as well as experts in other relavant fields. Most of what we're looking at is what's coming down the pipes in the near future and in the longer term. Yesterday was the first day and it was an amazing amount of content. I've written about some of the things I learned that I hadn't known before over here....

 

 

 



Posted from BLInk!
Wednesday, December 06, 2006 2:00:00 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Sunday, December 03, 2006

I'm writing a WinForms app that is only for me to use, so I decided to see what it's like to use the drag 'n drop databinding wizards for the first time ever. Read more...

[A DevLife post]

Sunday, December 03, 2006 10:15:15 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Tuesday, October 24, 2006

I don't pay much attention to Facebook (could it be that I'm about twice the age of the average user? ;-)), but thought it was intersesting that they expose web services for devs to tap into. Here's an article on DevSource by Tim Stevens called Using the Facebook API: Social Networking in .NET
.

Tuesday, October 24, 2006 11:04:47 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Tuesday, October 17, 2006

The new post cache subsititution functionality of ASP.NET 2.0 is one of the features of ASP.NET 2 that doesn't get a lot of attention, but I am quite fond of it. So I wrote an article about it for DevSource and it is now online. You can read it here.

Tuesday, October 17, 2006 4:25:58 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Monday, October 02, 2006

I was so I spent some time trying to get everything sorted back out again. Here's my take on it...

[A DevLife post]

Monday, October 02, 2006 9:18:52 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [2]  | 
 Sunday, September 24, 2006

Sometimes I feel like I learn .NET one little method at a time. Today I had to do something I'd never done before and the solution was not obvious at first. [Read more ....]

[A DevLife post]

Sunday, September 24, 2006 12:31:48 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Friday, September 08, 2006

I had to translate some VB code to C# and it took me a while to see the light! Here's the shortcut.

[A DevLife post]

Friday, September 08, 2006 12:42:31 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Tuesday, September 05, 2006

This is nothing new, but it was new to me and it was messing up my dynamically rendered ASP.NET pages. My lesson in VarybyCustom.

[A DevLife post]

Tuesday, September 05, 2006 8:50:00 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Sunday, September 03, 2006

One of the points of confusion I've seen wrt these new asp.net features is people trying to use them (and getting no farther than head banging) with random functions.

.NET 2.0 makes a lot of asynchronous stuff much easier with the Event Driven Asynchronous Pattern.

The BackgroundWorker sets up the entire package for  you and is a great solution for Windows Forms.

But with the ASP.NET 2.0 methods, you must call out to methods that already have BeginInvoke/EndInvoke and that return IAsyncResult. It's easy to do with classes that already do this - like the new SQLCommand Async functions (eg. BeginExecuteReader/EndExecuteReader) or calls using HTTPRequest to pull down data from another website (eg an RSS Feed). But what about doing long running processes that don't have .NET (or 3rd party) calls that implement the async pattern? What if you have a website that does the ever popular Fibonacci calculation? (Not really "ever-popular", though it is the common example of long running method used in MSDN docs ;-)).

The grown-up way is to create a delegate for your synchronous method and then call BeginInvoke and EndInvoke. Here's some help with that.

An easy way that doesn't require mucking with delegates is to stuff the function into a web service then use the web services async functionality (which come for free when you build a web service proxy through Visual Studio). Prior to VS2005, we had only the Begin/End methods availalbe. VS2005 has those plus a new pair that ift into the Event Driven Async Pattern: myMethodAsync & myMethodCompleted. You can see both of these in the above link.

Sunday, September 03, 2006 1:46:23 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Friday, August 18, 2006

I've long been confused by the fact that static variables in VB are not the same as static variables in C#, but shared variables/methods/classes in VB *are* like static variables/methods/classes in C#. It made for some cumbersome VB code that didn't have to be. I think I finally got it cleared up and here is a blog post I wrote trying to explain it (to myself for future reference). [Read more...]

[A DevLife post]

Friday, August 18, 2006 8:43:56 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Thursday, August 10, 2006

If you are getting either of these errors when using the Publish Wizard for ClickOnce:

  • Cannot publish because a project failed to build.
  • SignTool reported an error 'XmlResolver can be set only by fully trusted code.'
...there is a HotFix available from the Microsoft download. More info here.
Thursday, August 10, 2006 8:22:46 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [1]  | 
 Monday, August 07, 2006

Frustrated with the experience of trying to explain the complicated ASP.NET 2.0 Client Side callbacks at user group sessions, I decided to see how this compared to using AJAX.NET and ATLAS. So I rewrote the demo with each of these tools. Here is what I found... [read more...]

[A DevLife post]

Monday, August 07, 2006 2:07:04 PM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  | 
 Saturday, July 29, 2006

Seriously.... 15! That's a lot of remembering for my poor brain. [Read more here...]

[A DevLife post]

Saturday, July 29, 2006 7:40:19 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [2]  | 
 Friday, July 28, 2006

EATING CROW! I wrote in May about getting a desktop shortcut with ClickOnce. I have finally discovered a big flaw (well, two actually) in that method. This post explains the flaw and offers up a much better solution! [read more ...]

[A DevLife post]

Friday, July 28, 2006 10:58:31 AM (Eastern Standard Time, UTC-05:00)  #     |  Comments [0]  |