Welcome to Windows Workflow Foundation (WF)
Top Tasks :

WF Community Bloggers

Browse by Tags

All Tags » LINQ » DevCenter   (RSS)

  • Red Gate to continue development of .NET Reflector

    .NET Reflector, by Lutz Roeder, must be one of the most useful tools I have when developing .NET code. Usually it is the first thing I install right after Visual Studio not even waiting until I need it because I know I will.

    So the big news is that Red Gate, makers of the Ants profiler and lots of other tools, are taking over from Lutz Roeder and will continue developing .NET Reflector. Interesting move and I hope this means a bright future for the .NET Reflector.

    Read more about this here.

     

    Enjoy!

     

    www.TheProblemSolver.nl
    Wiki.WindowsWorkflowFoundation.eu

  • Visual Studio 2008 Service Pack 1 available

    It is available from the subscriptions download at http://msdn.microsoft.com/en-us/subscriptions/default.aspx

     

    Get it while it is hot Smile

     

    Enjoy!

  • SQL Server Compact 3.5 SP1 released

    Steve Lasker just announced that SQL Server Compact 3.5 service pack 1 is released, read his announcement here.

    They added support for the entity framework, great stuff. And another neat feature is native 64 bits support. No longer do you need to target X86 and use WoW [:0]. Great if you are using my SQL Server Compact Workflow Persistence Service.

    Enjoy!

  • CodeCamp 2008

    Afgelopen jaar hebben we het eerste CodeCamp in Nederland georganiseerd en dat was een groot succes. De meeste deelnemers vroegen om meer, sommige zelfs om een CodeCamp per kwartaal of een heel weekend lang. Nou hebben we dat laatste nog niet gedaan maar we zijn wel aan de slag gegaan om een nieuw CodeCamp te organiseren. Als datum hebben we zaterdag 6 september gekozen. Gelukkig waren Microsoft en Class-a behulpzaam en kunnen we, net als vorig jaar, weer in het Microsoft Innovation Center in Barneveld terecht. Een mooie datum en locatie om uitgerust van de vakantie een hoop kennis uit te wisselen.

    Het programma staat nog niet helemaal vast, hou daar de website voor in de gaten, maar je kan er ondermeer de bekende Nederlandse sprekers verwachten. Uiteraard kan je zelf ook nog een sessie voorstellen dus als je een idee hebt voor een leuke sessie laat het dan zo snel mogelijk weten.

     

    Dus zet de datum vast in je agenda en meld je zo snel mogelijk aan op de website www.code-camp.nl.

     

    Het CodeCamp is een gezamenlijk initiatief van de SDN, de stichting DotNed en VB Central.

  • How to Download all of Visual Studio 2008 SP1

     VS2008 SP1 Beta is quite a package. By default the installation downloads the packages as needed and when needed. Now that is just fine if you only need to install a single machine. But when you need to install multiple, possibly virtual, machines like I have to it just wastes a lot of bandwidth and time Sad. Fortunately there is a solution and it can be found here in the blog post by Heath Stewart.

    Enjoy! 

  • LINQ to SQL and creating databases

    LINQ to SQL has a really nice feature when making sample and demos in the ability to create the database if it doesn't exist yet. It also has a function called DatabaseExists() to check if a database exists. Both are defined on the DataContext class.

    string connectionString 
        = @"Data Source=.\sqlexpress;Initial Catalog=MyNewDatabase;Integrated Security=True";
    
    MyNewDatabase context = new MyNewDatabase(connectionString);
    if (!context.DatabaseExists())
        context.CreateDatabase();
    

    And best of all they work both for SQL Server and for SQL Compact so it is real easy to make demo's that work with both the full SQL Server as well as the lightweight SQL Compact. All you need to do is change the connection string.

    connectionString = @"Data Source=MyNewDatabase.sdf";

    Now I specially like the SQL Compact option for samples as there is no installation requirement, just copy the files and you are good to go Smile. In fact I have been using LINQ to SQL to create a SQL Compact Workflow persistence service but because of the very nature of LINQ to SQL I can use it just as well with the full blown SQL Server as SQL Compact.

    So why do I consider the DatabaseExists() function only suitable for demo's? Well in the case of SQL Server it makes a connection to the server and sees if it can use the database. Hardly a very reliable check as it can fail for any number of reasons. And if the database exists it still doesn't mean that the schema is correct. For SQL Compact the check is even worse, it only checks if a file with the same name exists, no matter what it is.

    Enjoy!

    www.TheProblemSolver.nl
    http://wiki.WindowsWorkflowFoundation.eu

  • On the WF ReceiveActivity and WCF bindings

    The new ReceiveActivity and SendActivity that marry Windows Workflow Foundation (WF) and Windows Communication Foundation (WCF) are really cool Smile. Getting started is easy because a new Sequential Workflow Service Library, found under WCF instead of Workflow in VS2008, uses nice defaults for everything. But sooner or later you need to change these defaults and you need to know what can be done and what can't.

    When you want to use the new ReceiveActivity in a workflow you need to use a compatible WCF binding. The reason for this requirement is that the conversation context, see this blog post, is part of the message and needs to be retrieved and returned. The following code returns a list of all WCF binding and how they are composed:

    Sub Main()

    Dim assemblies As New List(Of Assembly)()

    ' .NET 3.0

    assemblies.Add(GetType(ServiceHost).Assembly)

    ' .NET 3.5

    assemblies.Add(GetType(WorkflowServiceHost).Assembly)

    assemblies.Add(GetType(WebServiceHost).Assembly)

     

    Dim query = From assembly In assemblies _

    From type In assembly.GetTypes() _

    Where type.IsSubclassOf(GetType(Binding)) _

    AndAlso Not type.IsAbstract _

    AndAlso type.IsPublic _

    Order By type.Name _

    Select type

     

    PrintBinding(query.ToList)

     

    Console.ReadLine()

    End Sub

     

    Private Sub PrintBinding(ByVal types As List(Of Type))

    For Each type In types

    Console.WriteLine(type.FullName)

    Try

    Dim binding As Binding = _

    CType(Activator.CreateInstance(type), Binding)

    Dim elements = binding.CreateBindingElements

    For Each element In elements

    Console.WriteLine(vbTab + element.GetType().FullName)

    Next

    Catch ex As Exception

    Console.WriteLine(ex.Message)

    End Try

    Console.WriteLine()

    Next

    End Sub

     

    The classes responsible for inserting and removing these conversation tokens are ContextRequestChannel and ContextReplyChannel and they are instantiated by the ContextBindingElement. So seems we are restricted to using BasicHttpContextBinding, NetTcpContextBinding or WSHttpContextBinding.

    So it seems we cannot use NetMsmqBinding which is a shame because one way reliable messaging is the perfect fit for workflow as far as I am concerned. Well not quite so fast because we still have the CustomBinding where we can configure the stack just the way we want right?

    Yeah we do but there is a problem Sad. It turns out the ContextBinding requires a channel with an IReplyChannel interface and the NetMsmqBinding actually implement an IInputChannel or an IOutputChannel. Which one actually depends if you are the client or the service.

    And thinking about how WF/WCF conversations works this restriction makes sense. After all a ReceiveActivity is called without a context in order to create a new workflow, assuming the CanCreateInstance property equals true, and returns the workflow instanceId in the context as part of the response. This design kind of rules out one-way messages and thereby NetMsmqBinding.

    Now this sucks big time if you ask me Sad. I would much rather have seen that you could specify the instanceId of the workflow to be created, just as you can with the WorkflowRuntime.CreateWorkflow() where a number of the overloads let you specify the workflows instanceId. I suppose it is possible to create a different context binding but that would be quite some work and, I assume, duplicate a lot of code already written my Microsoft. So let's hope they see the light and add MSMQ/ReceiveActivity intergration.

     

    Enjoy!

    www.TheProblemSolver.nl
    http://wiki.WindowsWorkflowFoundation.eu

  • Visual Studio 2008 and .NET Framework 3.5 Training Kit

    Looking for more information about VS2008 and .NET 3.5?

    I suspect you might just be as there is a ton of new functionality and with the pace of everything coming out it isn't likely that you know it all Smile

    To help learn the new stuff Microsoft has put a Visual Studio 2008 and .NET Framework 3.5 training kit together with lots of labs and presentations. Just go through the list and check what you would like to know more about.

    You can download the trainings kit from here.

    Enjoy!

     

  • SQL Server 2005 SP3

    If you are expecting a link to the download I am sorry but you are going to be disappointed Sad

    Why? Because it just isn't available yet!

    I can already hear you saying "But it must be coming any day now, right?"

    Wrong Sad

    Yes, I just heard from Hugo that there are no current plans for releasing a new service pack for the very simple reason not enough people are asking for it.

    Come gain, why was that?

    Because not enough people are asking for it!

    So click in this link and vote for another SQL Server service pack!

    Enjoy!

<September 2008>
SuMoTuWeThFrSa
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011

Copyright © 2006 Microsoft Corporation. All Rights Reserved. | Terms of Use | Privacy Statement | Contact Us