>
 Saturday, September 15, 2007

You may have noticed after installing Visual Studio 2008 that if all of your projects in a solution don't compile, you can't debug the one that DOES compile. This causes problems for me when I work with WCF because I may want to update the service code, and later update the client proxy....in the meantime, changes I made such as deleting the existing proxy do not compile anymore...so I can't run the solution.

There are two settings that affect this:

a) All projects are compiled each time you try to run

b) If errors are encountered the environment is set not to run at all

You can address this in one of two ways. You can only compile those projects that you need to, by checking the "Only build startup projects and dependencies on Run" setting as shown here:

VS2008BuiltStartupProjects

Or, you can set the environment so that it runs the old version of any projects that don't compile as shown here:

VS2008BuiltStartupProjects2

 

The latter causes more problems in my opinion, because you may not realize you are running an older version of one or more projects. The former is what I choose to set my environment to, since it allows me to compile only dependencies of the project I'm trying to test at the moment. Thus, I can recreate my service references from scratch, without having to comment out client code that doesn't compile in the interim.

There...annoyance gone.

Technorati Tags: ,
9/15/2007 8:40 PM VS 2008  | Comments [2]  |  View reactions  |  Trackback

As some of you may know, several of us at IDesign (Juval, Brian and myself) are in the midst of a two-week .NET 3.5 Roadshow - six cities in two weeks where we collectively cover WCF, WF, WPF, CardSpace, federated and claims-based security concepts, and some key aspects of .NET 3.5 such as new C# 3.0 language features and ADO.NET 3.5 including LINQ and the Entity Framework.

I'm personally covering WCF security, federated and claims-based security, C# 3.0 and ADO.NET 3.5. For those of you attending (or, not) here are links to the code samples I'm presenting:

VS 2005 samples

Download VS 2008 Samples (UPDATED 10/11/07)

This download includes all samples referenced above, in addition to .NET 3.5 samples for C# 3.0 and LINQ, and IDesign's declarative security model including a recent version of our ServiceModelEx library.  

Other relevant resources discussed:

Any questions? Email me.

-Michele

Technorati Tags: , , ,
9/15/2007 7:15 AM .NET 3.5 | CardSpace | Security | WCF  | Comments [5]  |  View reactions  |  Trackback
 Wednesday, August 22, 2007

I have recently made a series of posts describing changes to VS 2008 templates for WCF as compared to VS 2005 + Orcas extensions. See

Technorati Tags: ,

the post here: http://www.thatindigogirl.com/VS2008Beta2ProjectTemplatesForWCF.aspx

8/22/2007 7:54 PM VS 2008 | WCF  | Comments [3]  |  View reactions  |  Trackback
 Tuesday, August 21, 2007

After my travelling without a cell phone nightmare which I blogged about here, I moved my phone number to a backup phone - the VCast Chocolate. Months ago I had thought that I might want to switch to this phone from time to time when travelling on vacation (a rare occurrence) because it is a nice small form factor, and it can double a a nice MP3 player. In preparation for this, I asked the Verizon store if there was a product that would support moving my copious outlook contacts to the phone, so that I wouldn't have to retype them into the phone. THey pointed me to the Verizon Mobile Office Kit - and I bought it.

As per usual, after buying a new toy my schedule sometimes gets the better of me, and I didn't try it out right away. I needed to yesterday...since I switched to the VCast. Of course, now I'm running Vista on both my machines...and the product says it only supports XP of course.

I call support, to see if they can answer some questions about the product, and I get some guy acting as a liason between me and technical support. Three times he puts me on hold to ask them a question:

Question 1: Is there an updated driver for the USB connector to the phone, and Vista? Answer = No, it was supposed to be August...it is not ready and they have no ETA. Nice.

Question 2: Do they know for a fact it won't run on Vista? Has anyone tried it? Answer = No, they haven't tried it but they don't think so.

Question 3: If I find an XP machine to install it on, can I move my Outlook Contacts? Answer = No, that won't work. It doesn't integrate with Outlook.

Question 4: But, when I bought the package, I was told it would. Will they give me a refund now? Answer = No, it is long past the 30 day window.

Question 5: Can you put me through directly to tech support so I can talk with them about options for exporting Outlook contacts to the program...there is probably a way...but I need to talk to them directly. Answer = Ok, but we don't usually put you direct...since you have so many questions I will do it.

The person on tech support tells me it does import Outlook contacts, and can send contacts to the phone as well as pull contacts from the phone. Relief.

I decide to install the software on Vista...despite what they said. The LGE USB modem driver won't install on Vista, but I install the software which then prompts me to connect the phone to the USB port. I do it, Vista tries to find a driver...after about 10 minutes no luck.

I search the internet for USB modem drivers...and as luck would have it I find a forum with a 32bit and 64bit driver. Unzipped the driver and connected the phone again. After 10 minutes...I have a driver!!!!

Now, to set up the software. Oh, wouldn't you know? Import/From Outlook...bam...I have all my contacts! Send to phone...bam...all my contacts are now on my VCast. Easy.

I guess you have to ignore tech support...though the last guy was nice enough to check after I pressured him...most of them just give a cookie cutter answer, drones. Imagine if I was not technical...and didn't know that there must be a logical way to import contacts...and find drivers...I'd be typing in phone numbers still today...

8/21/2007 6:04 PM  | Comments [12]  |  View reactions  |  Trackback

Well, I have had an interesting couple of days with phones my friends. It all started in New London Connecticut this past Saturday evening. I had just attended Carl Franklin's birthday party, watched a wickedly funny taping of his show Mondays (that I was part of in the early days) and of attempted to learn to like bourbon (it didn't take, I think I'll stick to fine wine) and saw some good friends like Kimberly Tripp and Paul Randall (the newlyweds), Richard Campbell and Stacy Holt, Scott Hanselman and his lovely wife Mo, Patrick Hynds and lovely wife Sabine, Miguel Castro, Mark Miller, Don XML and of course the birthday boy himself, Carl Franklin and his lovely wife Gretchen (the hostess with the mostess).

I returned to the hotel after this...and as I slept peacefully my Motorola Q was supposedly charging happily through the USB connection to my laptop. Something tragic happened this unsuspecting night. I woke to the Q completely dead...the power to the wall no longer servicing the laptop...but the laptop still had charge which meant that I had power for most of the night...for sure (Vista would have sucked it dry of charge in 1.5 hours flat). The phone should have been charging and greedily sucking laptop battery power...so I knew something was amiss.

In haste I plugged the laptop in elsewhere and tried connecting the phone once again. Not one of my USB ports of my Sony Vaio (the old laptop) would give the phone charge. Concerned, I fired up the new Acer Travelmate, trying its USB ports...one of them gave charge. Relief...or so I thought. So I grabbed a coffee and strolled down to the beach for 1 hour, expecting to return to a charged Q...ready to use.

NOT.

The Q was not charged enough to boot at least. Try as I might, nothing would give the Q enough charge to boot.

I went down to brunch with Richard, Stacy, Kimberly and Paul...for sure one of them would have a suggestion for my problem. They are geeks after all (well, except Stacy...she's cooler than a geek). In fact, Stacy thought I could revive it with the wall charger, thus I had to wait patiently to arrive home before I could be sure.

I felt naked without my phone...and I had to fly home that way.

This was the beginning of the nightmare I call "will I get home tonight?".

If I had had my working cell phone, I would have logged in to the internet to see if my upgrade went through, and discovered the flight was delayed 4 hours leaving Providence. Alas, I find this out at the airport, and they put me on standby for the earlier flight that was supposed to leave at 2pm, now leaving at 5pm, which is when my flight was supposed to leave. So many questions:

  • Will I get on the flight? If not, shouldn't I be having dinner with the gang back at Carl's instead of sitting in the airport that has no Starbucks?
  • If I do get on the standby flight...will I make my connection?
  • If I don't, can I stay with my friend Gillian in Chicago?
  • If I arrive on the late flight should I stay with Gillian anyways, or just head to a cheap local hotel since I have to return to catch the morning flight in?
  • How the hell can I coordinate all this crap without a freaking cell phone!?!?!?

And so Part 1 of the nightmare begins...

There was a line of Verizon pay phones right by the gate so I stared at them for a few minutes first, trying to remember how to use them. Let's see, you can use coins, a calling card (no go here), or credit card. It looks like you can get 4 minutes with 4 quarters, so I went for it, I got change.

  • Call #1: Put in 4 quarters, several drop out, finally 4 stay in. I call Gillian to see where she is at. The call rings, and then stops dead. I hang up, quarters pop out.
  • Call #2: I call the operator, ask for help, put in the 4 quarters again, call goes through, then goes nowhere. I hang up, quarters drop out.
  • Call #3: I call the operator, ask to pay with credit card. No problem, give the numbers, call goes through. Gillian is not answering (probably out running a marathon or something) so I leave a message. Oh, wait, she can't call me back...tell her to leave a message with my machine I'll check my messages and tell her to keep her damn phone on (don't worry, we go way back to university days in Toronto).
  • Call #4: I call the operator, ask to pay with credit card again...once again give all the numbers, call goes through to Gillian. Tell her she could also call Andres just in case. Tell her I'll call back if I don't get on standby.

Now I'm sick of putting in the dang credit card number every call, so I hook up my laptop. Of course no cell phone so I have to get a T-Mobile day pass first...now I'm online. Yes! I have Skype-to-phone all hooked up...so I call my cell and check messages...nothing yet. Where's Gillian?

Wait a bit, IM with Richard and Carl about my delay...wish I was having dinner and drinks over there...standby sucks.

We finally have an ETA to leave Providence on the standby flight...later than we thought, I'm definitely missing my connection. Oh, by the way all of this due to weather in Chicago...they were in chaos over there.

  • Call #5: I Skype to Gillian's cell...ahhhh...much easier than stupid credit card pay phone calls...and faster. New update, I'm missing connection, if I don't call in 1 hour, I got on standby, let's have dinner!!! Yeah! Leave a message on my stupid cell phone and I'll manage to check them somehow via T-Mobile.
  • Call #6: just before flight is to leave, check messages. Easy, Skype to my cell...ahhhh...I love this. And, only .021 cents per minute! I wish I could think of more calls to make ... this is fun...but I should do some work...

I get on standby...awesome...but I'm still going to miss my connection so that's the next mess to deal with in Chicago.

Arrive to Chicago in one piece...OMG the airport is in complete chaos...people laying around all over the place...piles and piles in each gate area...just a mess.

I go to a pay phone again. I'm scared, I can hear the theme from Jaws in my head as I approach the line of pay phones...but I go in to make the call anyways. There was no room to sit and fire up my computer.

  • Call #7: Call the operator to use my trusty credit card again...wouldn't you know you can't charge a local call to a credit card? I wanted to call Gillian, tell her I would be able to make my flight.
  • Call #8: I plop in 2 quarters to make a local call...plunk plunk...they drop through. I go to the next two pay phones, same result. I call the operator again and explain that the phones won't take my quarters, I don't have a calling card...how do you suppose I make a local call? "Sorry, I can't help you" is the response. PAY PHONES SUCK!
  • Call #9: Can I make a long distance call using my credit card please? I call my cell phone, check messages. PROBLEM. When I hit # to go into voice mail to check messages...the call disconnects. CRAP CRAP CRAP CRAP CRAP CRAP CRAP. I try again...in case I'm mistaken. Yet another credit card call. Hit #. CRAP CRAP CRAP CRAP CRAP CRAP CRAP. I can't check freaking voice mail from a pay phone!!!!

At this point I'm really pissed. I go to the United Red Carpet lounge...fire up the computer, fire up Skype.

  • Call #10: I Skype my dead cell phone to check messages. Gillian has left a few messages regarding her plans for the night.
  • Call #11: I Skype Gillian, whazzup? At last she answers!!! Yeah!!! I update her on my flight status.
  • Call #12: I Skype Andres...I'm getting on the flight...check the Internet for landing time!

At last, the phone call hell ends. I can go to my gate, catch my second late flight, and make my way home to sleep. If only I had more battery left in my computer to get more work done.

Now, to deal with the broken phone.

Charging it in the wall charger didn't solve the problem...call Verizon. No, not from a pay phone...from a home phone. We try to reset the phone, no go. Luckily I'm within tye 1 year warranty, they'll ship me a new Q overnight! Yeah! So, we switch the phone number over to my backup phone, the VCast Chocolate. And here another short saga begins...but I'll save that for the next post.

The moral of this story is:

  • Travelling without a cell phone is a nightmare
  • Pay phones are useless
  • Pay phone operators are useless
  • It is a good idea to set up a Skype-to-phone account for emergencies, and carry your headset with you of course
  • Have a backup cell phone handy in case your phone bites it and you need to swap out
8/21/2007 5:38 PM Fun  | Comments [13]  |  View reactions  |  Trackback
 Thursday, August 16, 2007

Today I completed a webcast as part of a 15 part series - today's subject concurrency, throughput and throttling. I received some questions about callback and Windows client applications that I thought I would elaborate on here. In fact, I went a little overboard and created a bunch of samples that would illustrate the behavior of services and clients when you have a Windows client, a service with a callback contract (thus, two-way communication) and various WCF settings at the client and service that relate to concurrency, multithreading, synchronization with the UI thread, and so on.

The following table summarizes various settings at the client, service and callback and the resulting behavior at runtime. Here's the breakdown for each column:

  • Callback Sync Context - refers to the UseSynchronizationContext setting for the CallbackBehaviorAttribute on the client callback object.
  • Callback Concurrency Mode - refers to the ConcurrencyMode setting for the CallbackBehaviorAttribute on the client callback object.
  • Service Operation - Indicates if the service contract operations are one-way or two-way.
  • Callback Operation - Indicates if the callback contract operations are one-way or two-way.
  • Service Concurrency Mode - refers to the ConcurrencyMode setting for the ServiceBehaviorAttribute on the service type.
  • Resulting Behavior - when the corresponding sample is run, what happens?

I have also uploaded sample code for each of these scenarios, numbered in order of table row description below. Get the code here.

Callback Sync

Context

Callback Concurrency Mode

Service Operation

Callback Operation

Service Concurrency Mode

Resulting Behavior

True/

False

Single/

Reentrant/

Multiple

One-way/

Two-way

Two-way

Single

These are defaults. InvalidOperationException at the service. Operation would deadlock calling the client application since the callback is two-way and reentrancy isn’t possible.

True

Single/

Reentrant/

Multiple

Two-way

Two-way

Reentrant/

Multiple

Service able to call client, but client is blocked because of outgoing call.

False

Single/

Reentrant/

Multiple

Two-way

Two-way

Reentrant/

Multiple

Service able to call client, client callback object is not blocked. If client callback object tries to communicate with UI thread (i.e., setting properties of controls) it will block.

False

Single

One-way

Two-way

Reentrant/

Multiple

Service able to call client, client callback object is not blocked. Client callback object can communicate with UI thread using Invoke() from callback thread. Client can issue multiple calls to service but only one callback can be processed at a time.

False

Multiple

One-way

Two-way

Reentrant/

Multiple

Service able to call client, client callback object is not blocked. Client callback object can communicate with UI thread using Invoke() from callback thread. Client can issue multiple calls and multiple callbacks can be processed at a time.

False

Multiple

One-way

One-way

Single/

Reentrant/

Multiple

Service able to call client, client callback object is not blocked. Client callback object can communicate with UI thread using Invoke() from callback thread. Client can issue multiple calls and multiple callbacks can be processed at a time.

False

Multiple

Two-way/

Multi-threaded Client

 

Two-way

Reentrant/

Multiple

Service able to call client, client callback object is not blocked. Client callback object can communicate with UI thread using Invoke() from callback thread. Multiple calls from client can be processed at the service, and multiple callbacks can be processed at the client.

False

Multiple

Two-way/

Multi-threaded Client

Two-way

Reentrant/

Multiple

Service able to call client, client callback object is not blocked. Client callback can communicate with UI thread using Invoke() from callback thread. Multiple calls from client can be processed at the service, and multiple callbacks can be processed at the client.

Here is a summary of considerations.

  • Contract design:
    • Make callback operations one-way. If this isn’t possible, make the service reentrant. Prefer one-way callbacks since most likely the service doesn’t care about responses.
    • If service operations will notify clients with a callback, make them one-way as well.
  • Exception handling:
    • Remember that uncaught exceptions invalidate service, client and callback channels where sessions are involved. Two-way communication can only happen over duplex, thus there is a transport session (TCP, named pipes) or HTTP session (using reliable sessions over WSDualHttpBinding). 
    • Throw faults for known exceptions unless you want the client to be forced to recreate the proxy and start a new session. That includes clients – who should not allow exceptions to flow back to the service during a callback unless they intend to destroy the session.
    • To avoid destroying the session: if callback operations are one-way, swallow the exception after handling it at the client; if callback operations are two-way, report a fault to the service in response.
  • Windows client issues:
    • Always disable synchronization with the UI thread for callback objects, by setting UseSynchronizationContext to false in the CallbackBehaviorAttribute. 
    • Multithreaded clients should invoke services on another thread (can use asynchronous proxies) when callbacks or long running service operations are involved. This prevents UI thread from blocking during call, allows callbacks to communicate freely with UI.
    • Use Invoke() to communicate with UI from the callback thread. 
    • Don’t forget to protect other client state if the callback object supports multiple concurrent callbacks. That means the ConcurrencyMode setting is Multiple in the CallbackBehaviorAttribute.
Technorati Tags: , ,
8/16/2007 1:20 AM .NET 3.0 | WCF  | Comments [5]  |  View reactions  |  Trackback
 Tuesday, August 14, 2007

In preparation for our upcoming .NET 3.5 Roadshow  (http://www.dotnetroadshow.com/) I am posting setup instructions for those who need some tips on setting up an environment to work with the latest technologies. If you can start using Visual Studio 2008 (Beta 2 available now), I highly recommend it - it gives you the latest .NET 3.0 tools for your WCF, WPF and WF projects. But, for those still using Visual Studio 2005, I have provided those links here as well.

Technorati Tags: , ,

8/14/2007 2:59 PM .NET 3.0 | .NET 3.5 | VS 2008  | Comments [14]  |  View reactions  |  Trackback
 Sunday, July 08, 2007

On my newest machine, I have a fresh installation of Windows Vista Ultimate that I installed Office 2007 to. After running Outlook 2007 the first time, Office 2007 goes through a configuration step that requires a reboot, but I received this error:

Error 1719: The Windows Installer service could not be accessed

There is an updated KB entry with recommended steps to fix the problem here: http://support.microsoft.com/kb/315346/en-us

This entry doesn't mention Vista at all, and in fact, I was able to repair the problem on my Vista machine just by running the following command line instructions, in this order:

msiexec /unregister

msiexec /register

So, if you have this problem, give that a go first...then consult with the KB entry if you still have issues.

7/8/2007 10:04 PM  | Comments [0]  |  View reactions  |  Trackback
 Sunday, June 24, 2007

I delivered 15 webcasts on WCF this summer, from July through September. Each webcast is 1 hour in length, touching on the fundamentals and practical approaches for your WCF development efforts. Here are the links to the archived webcasts!

NOTE: On page 3 of the registration process you can print the slides.

· MSDN Webcast: Windows Communication Foundation Top to Bottom (Part 01 of 15): Overview

Monday, July 02, 2007 9:00 AM Pacific Time (US & Canada)

o http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032344312&Culture=en-US

· MSDN Webcast: Windows Communication Foundation Top to Bottom (Part 02 of 15): Contracts

Monday, July 09, 2007 9:00 AM Pacific Time (US & Canada)

o http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032344314&Culture=en-US

· MSDN Webcast: Windows Communication Foundation Top to Bottom (Part 03 of 15): Contract Versioning

Wednesday, July 11, 2007 10:00 AM Pacific Time (US & Canada)

o http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032344318&Culture=en-US

· MSDN Webcast: Windows Communication Foundation Top to Bottom (Part 04 of 15): Exceptions and Faults

Friday, July 13, 2007 9:00 AM Pacific Time (US & Canada)

o http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032344322&Culture=en-US

· MSDN Webcast: Windows Communication Foundation Top to Bottom (Part 05 of 15): Bindings

Monday, July 23, 2007 9:00 AM Pacific Time (US & Canada)

o http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032344330&Culture=en-US

· MSDN Webcast: Windows Communication Foundation Top to Bottom (Part 06 of 15): Hosting

Wednesday, July 25, 2007 10:00 AM Pacific Time (US & Canada)

o http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032344338&Culture=en-US

· MSDN Webcast: Windows Communication Foundation Top to Bottom (Part 07 of 15): Messaging Patterns

Friday, August 10, 2007 9:00 AM Pacific Time (US & Canada)

o http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032344342&Culture=en-US

· MSDN Webcast: Windows Communication Foundation Top to Bottom (Part 08 of 15): Instancing Modes

Monday, August 13, 2007 9:00 AM Pacific Time (US & Canada)

o http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032344344&Culture=en-US

· MSDN Webcast: Windows Communication Foundation Top to Bottom (Part 09 of 15): Concurrency, Throughput, and Throttling

Wednesday, August 15, 2007 10:00 AM Pacific Time (US & Canada)

o http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032344346&Culture=en-US

· MSDN Webcast: Windows Communication Foundation Top to Bottom (Part 10 of 15): Security Fundamentals

Friday, August 24, 2007 9:00 AM Pacific Time (US & Canada)

o http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032344348&Culture=en-US

· MSDN Webcast: Windows Communication Foundation Top to Bottom (Part 11 of 15): Federated Security

Monday, August 27, 2007 9:00 AM Pacific Time (US & Canada)

o http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032344351&Culture=en-US

· MSDN Webcast: Windows Communication Foundation Top to Bottom (Part 12 of 15): Reliable Messaging

Wednesday, August 29, 2007 9:00 AM Pacific Time (US & Canada)

o http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032344353&Culture=en-US

· MSDN Webcast: Windows Communication Foundation Top to Bottom (Part 13 of 15): Transactions

Monday, September 03, 2007 9:00 AM Pacific Time (US & Canada)

o http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032344355&Culture=en-US

· MSDN Webcast: Windows Communication Foundation Top to Bottom (Part 14 of 15): Message Queuing

Wednesday, September 05, 2007 9:00 AM Pacific Time (US & Canada)

o http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032344357&Culture=en-US

· MSDN Webcast: Windows Communication Foundation Top to Bottom (Part 15 of 15): Extensibility

Friday, September 07, 2007 9:00 AM Pacific Time (US & Canada)

http://msevents.microsoft.com/CUI/EventDetail.aspx?EventID=1032344359&Culture=en-US

6/24/2007 7:11 PM  | Comments [44]  |  View reactions  |  Trackback
 Thursday, June 14, 2007

A big thanks to everyone who attended my two sessions at Tech Ed Orlando on CardSpace. I also really enjoyed all of the great questions during and after each session, I can see a lot of momentum building around CardSpace, other identity selectors and providers, and approaches to federated identity models. Very exciting stuff indeed.

As for my code, as I said I had already posted the code beforehand, but I have updated the ASP.NET sample slightly to reflect how I associated the username and password with a unique identifier for a personal card. You can download the latest version of my CardSpace samples here.

Enjoy!

6/14/2007 4:45 PM  | Comments [21]  |  View reactions  |  Trackback
    ON THIS PAGE
    SEARCH
    CATEGORIES