Workflow Publish as Web Service and Visual Studio 2008 using Vista

A few days ago I blogged about the “Publish as Web Service” feature not working for me with VS2008. It turns out this is another case if Vista and VS2008 not being quite compatible [:(]. I was running VS2008 normally and I have User Account Control (UAC) enabled. Not that I am a big fan of UAC but I believe it is a useful step along the security road and people should leave it turned on. And I do as I preach. But if you start VS2008 with administrator privileges, ie right click and select “Run as administrator”, the “Publish … Continue reading Workflow Publish as Web Service and Visual Studio 2008 using Vista

Workflow Publish as Web Service and Visual Studio 2008

I am unsure if this is a problem with my PC but when I am building a workflow using the WebServiceInputActivity and choose “Publish as Web Service” from the context menu I get a real helpfull error message [:(] No other messages appear so that is less that helpfull. Fortunatly it isn’t all that had to publish the workflow manually. Just add a web service project to the solution and add an ASMX file with the following content:<%@ WebService Class=”WebServiceInput.Workflow1_WebService” %> The workflow class is named “WebServiceInput.Workflow1″ and just add the “_WebService” suffix to it. Next add a reference from … Continue reading Workflow Publish as Web Service and Visual Studio 2008

Project Mole or visual studio visualizers on steroids

Visual Studio visualizers are pretty cool and can help you quite a bit when debugging but you need to develop them and that just ads to the workload. So how about having someone else do it? Well Microsoft added a few visualizers to VS2008 and VS2008 but they are pretty much limited to text, html and XML data.   Luckily some people liked the idea of using visualizers and actually decided to take it to the next level with project Mole. Its a really great viewer to inspect your data and the “Black Ops” feature that allows you to inspect … Continue reading Project Mole or visual studio visualizers on steroids

Type x does not match type x errors

Sometimes you can get these kinds of errors using the new Workflow Foundation ReceiveActivity when property binding the incoming value. So why does this happen Well it appears the validation is comparing the type of the original interface to to the type of the proxy generated. In this case because the actual type passed isn’t shared between the client and the server. But as the generated proxy type actually gets exactly the same name as the original, even though it is a different type defined in a different assembly, it appears as though comparing two the same types says they … Continue reading Type x does not match type x errors

Workflow Persistence Service using SQL Server Compact

As I mentioned previously I was working in a Workflow Persistence Service using SQL Server Compact as the back end store. Now this might not be the best persistence store to use in every application but it has a number of advantages. One of the main advantages is ClickOnce deployment. In the case of the standard SqlWorkflowPersistenceService you need to have SQL Server installed and running and create the database, with a name of your choosing, using two scripts. Not a big problem but something that needs to be done first and is outside of the realm of what you … Continue reading Workflow Persistence Service using SQL Server Compact

LINQ to SQL, SQL Compact and the |DataDirectory| macro

As I previously mentioned having the LINQ DataContext create the database if it doesn’t exist yet is a cool feature but it isn’t perfect. The problem I just ran into was while using the |DataDirectory| macro, something the SqlCeConnection understands and will replace with the directory specified. Well it turns out the LINQ DataContext isn’t that smart when checking if the database exists. Apparently it checks if the database file exists without expanding the |DataDirectory| so it never finds the database. The result is a SqlCeException with the message: “File already exists. Try using a different database name. [ File … Continue reading LINQ to SQL, SQL Compact and the |DataDirectory| macro

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 … Continue reading LINQ to SQL and creating databases

Saving a workflow to a XOML file.

Sometimes you just want to be able to create a workflow in code bus save it as a XOML workflow so the end user has the opportunity to modify it. Well it turns out to be quite easy [:)] as the WorkflowMarkupSerializer class is your friend. The following code does just that. And most of the code is to create the workflow in the first place as the serialization part is just 3 lines!using (XmlWriter writer = XmlWriter.Create(“MyWorkflow.xoml”)) { WorkflowMarkupSerializer serializer = new WorkflowMarkupSerializer(); SequentialWorkflowActivity myWorkflow = new SequentialWorkflowActivity(); ListenActivity listen = new ListenActivity(); myWorkflow.Activities.Add(listen); EventDrivenActivity leftBranch = new EventDrivenActivity(); … Continue reading Saving a workflow to a XOML file.

Run your web apps on Google’s infrastructure

Yep it appears you can with the Google App Engine. The figures are pretty impressive with 500Mb of disk storage and 5 million page views monthly. And the price? Well its free!That sure beats my web provider! Ofcourse they don’t support .NET yet, in fact their development platform is based on Python but they say that is just for starters. What interest me most is if this is going to be one of those moves Microsoft follows? After all they compete with Google on a number of fronts and developer mindshare is certainly one of these areas! We certainly live … Continue reading Run your web apps on Google’s infrastructure