So what’s the deal with the thread blocking in vs2010/.net4?

This was weird. I didn’t say anything in last night’s post because I wanted to make sure I wasn’t insane. I’m pretty sure I’m not.

Anyhoo, I created a stupid little windows form application to host my Wcf Service and to also to create a client.

The PAGE_LOAD calls a StartServer() method, which creates the service host.

The form has a TEST button that creates a WCF client to the same service.

That’s all pretty common stuff; start a server, create a client. But, the client kept reporting a Wcf timeout after 1 minute. I was able to connect to the service from another process, but not from within the windows form. It seemed like maybe a threading issue.

So, I changed the client to run in another thread, and it worked. Why’s that?

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: