Using the System.Web.Cache in a WinForms application

Some time ago I wrote an article about using the ASP.NET security providers in a WinForm application. Off course there are more usefull goodies in the System.Web namespaces to “borrow” like the Cache. In fact this is so easy that there is little point in writing an article about it. All you need to do is add a reference to System.Web and you are ready to use it.   Using it is real simple. Adding something to the Cache is done with “HttpRuntime.Cache.Insert(key, value)” or one of the overloads with dependencies or expiration values. Retrieving it is just as easy, … Continue reading Using the System.Web.Cache in a WinForms application

Exception when updating a Windows Communication Foundation service reference

While working with WCF and updating a service reference you may see the very informative error: Exception from HRESULT: 0×80041001Now I don’t know every possible cause but in my case it occurred because I had the generated service file open and it was marked as modified. Closing the file was all that was needed to fix the problem once I realized what was causing it.   Good luck with WCF!     Maurice de Beijer www.TheProblemSolver.nl wiki.WindowsWorkflowFoundation.eu/  

Workflow activity properties not usable in a XOML workflow while they are in a code based workflow

Today I ran into a annoying difference between XOML and code based workflows. In a project I have created a custom activity with a public property. I add this activity to a state workflow and add an IfElseActivity below it. Now I want to use the previously added activity property in the declarative rule condition.In a code based state workflow I can type “this.myCustomActivity1.TestValue == True” into the rule condition editor. The editor indicates the expression is valid and compiling the project succeeds.However when I do the same in a XOML with code separation state workflow things work differently. I … Continue reading Workflow activity properties not usable in a XOML workflow while they are in a code based workflow

Another Visual Basic Power Pack

Another VB Power Pack is released. This time it’s the Microsoft Printer Compatibility Library 1.0 that joins the previously released Microsoft Interop Forms Toolkit and the Microsoft PrintForm Component 1.0.   See http://msdn2.microsoft.com/en-us/vbasic/bb219077.aspx for more details.   Enjoy!   Maurice de Beijer www.TheProblemSolver.nl wiki.WindowsWorkflowFoundation.eu/  

Some thought on saving state in a custom activity in a state workflow.

I have been a little frustrated in being unable to find a good solution for the following problem. If anyone has a good suggestion the feedback would be appreciated greatly.   Suppose I have a custom activity named CustomEventActivity that implements IEventActivity. The activity is used in a state workflow. This activity receives an event containing some data and saves this data so a second activity in the same EventDrivenActivity can check on the data. Something like: protected override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext) { WorkflowQueuingService wqs =  executionContext.GetService<WorkflowQueuingService>(); WorkflowQueue queue = wqs.GetWorkflowQueue(QueueName); MyProperty = queue.Dequeue() as string;   return ActivityExecutionStatus.Closed; } … Continue reading Some thought on saving state in a custom activity in a state workflow.

VSTO Screen cast

I decided to give screen casting a try. Being Dutch I decided to make the first attempt a Dutch language video so don’t bother if you don’t speak the language   Take a look at http://www.windowsworkflowfoundation.eu/taskpane3/taskpane3.html. The screen cast is about creating a TaskPane and ribbon using VSTO 2005 SE and Office 2007.   Any feedback both on the contents as well as the technical format such as the resolution used is welcome. BTW I used Camtasia to produce this.   Enjoy!   Maurice de Beijer www.TheProblemSolver.nl wiki.WindowsWorkflowFoundation.eu/  

Ecma International approves Office Open XML standard

Of course this was already in the works for quite some time but I still think its an important announcement. Using Office Open XML means a lot for software developers, not only does the XML mean we can now actually write programs that generate Office document a lot easier without using Office itself, always a big no no in a server environment. But it being a standard means we can write programs and expect the to work when the next version of Office is released. Of course the standard also means it is a lot easier to create al sorts of … Continue reading Ecma International approves Office Open XML standard

Windows Workflow Foundation session at the SDN meeting

Next week Monday I will be presenting a session on using Windows Workflow Foundation. So if you are in the Netherlands and interested in WF you really should come and attend. And if you are not interested in WF you should come and attend too because in all likelihood you are missing out on some important new development, after all there are very few serious applications that do not contains some for of workflow     And besides the WF session there is a host of other sessions about al sorts of new stuff, in fact there are 6 tracks … Continue reading Windows Workflow Foundation session at the SDN meeting

SQL Compact Edition and ASP.NET

By default SQL CE doesn’t run under IIS. The original plan was for the license to disallow this. There has been quite a bit of discussion about this restriction and it look like the powers that be listened. While still not fully supported there is at least a step in the right direction by enabling the product to run, previously it actively prevented you from doing so.   By doing an: AppDomain.CurrentDomain.SetData(“SQLServerEverywhereUnderWebHosting”, true) the product will work. As it still is a single user database there are some things to watch out for but if you are in a position … Continue reading SQL Compact Edition and ASP.NET

Workflow Foundation and VB.NET

The good news is, as Paul points out over here, that the SDK samples (download here) are both in C# and Visual Basic. The hands on labs where only in C# however Well that has been rectified by Ken Lin who translated them to VB. You can download them from here.   Enjoy!     Maurice de Beijer www.TheProblemSolver.nl wiki.WindowsWorkflowFoundation.eu/