William さんのプロフィール.Net Zoneブログリスト ツール ヘルプ
8月23日

Transaction is not allowed error using ADO.Net Entities.

Doing some ADO.Net Entity queries and updates the other day, I kept getting this exception:

"New transaction is not allowed because there are other threads running in the session."

foreach (Users u in db.Users.Include("Queries"))
{

      // A db.SaveChanges() here will throw the error.
}

 

The reason is we have an open Reader in our foreach and we can't nest trasactions like that.  The solution is to read everything we need first so we close the reader.  The simple solution here is to append .ToArray() like:

foreach (Users u in db.Users.Include("Queries").ToArray())
{

      // A db.SaveChanges() here should work.
}

8月20日

ADO.Net Data Services after Silverlight Tools sp1

After installing Silverlight VS Tools SP1 beta, not only did SL designer not work, but it somehow messed up my ADO.Net REST services.  Was getting strange exceptions.  I uninstalled SL Tools and reinstalled VS SP1 (not sure if that was needed) and ADO.Net data services seem to be back working again.  Short story, don't install SL tools yet.  I should say, don't install beta software - but I could not follow my own advice.

8月15日

Turn off feed reading view to debug your ADO.Net

If your trying to expose a new ADO.Net dataservice and work some samples, you may get some strange output in your IE that looks like a feed page and wonder why you can't see the XML as the samples show.  Just turn off the feed reading view in IE.

 

image

image

Silverlight Streaming Service

If you have not looked at in a while, the new SL service allows you to directly upload you .wmv files.  So you don't need to use Encoder anymore to encode a SL video into a SL application.  This makes it really simple to public videos for your blogs, etc.  After uploading your video, the service gives you chance to do a quick preview and gives you the html you need to embed the video in your blog.  Simple and elegant - nice.

http://silverlight.live.com

8月14日

Microsoft Response Point PBX

Man, I am really excited about the new small business PBX system MS released - Response Point.

It seems like one of those no brainers - Create a platform that can be extended and programmed against easily using .Net, have a blue button and voice commands, connect the phone via Ethernet and IP, and make it super easy to hookup,manage, and buy.  That is a formula for success IMO.  I am looking forward to seeing the SDK.  I can already envision a wave of social apps for this thing.  Now I just need to figure out how to get one to experiment with...

http://www.microsoft.com/responsepoint/