I was experimenting with a WCF Worker Role for my Cloud sample and I encountered this error for my Workflow Service.
"The channel received an unexpected fault input message while closing. The fault reason given is: 'The message with To 'net.tcp://localhost:18090/ExpenseWorkflowService' cannot be processed at the receiver, due to an AddressFilter mismatch at the EndpointDispatcher. Check that the sender and receiver's EndpointAddresses agree.'"
I read that I will need to put an attribute like the following on my WCF Service
[ServiceBehavior(AddressFilterMode=AddressFilterMode.Any)]
Errr... the problem is, this is a WorkflowService and it only contains a .xaml file. So, how am I going to decorate a ServiceBehavior attribute on it?
After searching for a while, I can't seem to find anything on the Internet. There was this suggestion of creating a custom behavior to do it but I felt that it was a little overkill and there must be an easier way.
I ran a trace on my ExpenseService and found out that ServiceBehaviorAttribute was one of the Behaviors. So, I went to add the following for my ExpenseWorkflowService in the host code and it works!
// Set AddressFilterMode
ServiceBehaviorAttribute serviceBehavior = new ServiceBehaviorAttribute();
serviceBehavior.AddressFilterMode = AddressFilterMode.Any;
_wfSvcHost.Description.Behaviors.Add(serviceBehavior);
Wednesday, June 30, 2010
Sunday, June 27, 2010
Layered Architecture Sample for Azure
Last night, I have released an early preview of Layered Architecture Sample for Azure. I basically took LayerSample 4.0 and port it over to Windows Azure. The effort was much lesser than I expected and this time, workflow persistence works on SQL Azure!
I ported the ASP.NET web application to a Web Role and the Web Host into a WCF Web Role. Practically, if I am only running a web application, I would have combined all the layers into a single role to save cost but because I would like to demonstrate how on-premise desktop clients can make use of the cloud service, I had split the application into two roles.
Looking into cloud architectures is interesting. I would think that this sample is very much applicable only to applications that are designed with proper layering from the start or for developers who are embarking on a new cloud project (Greenfield). Many of our existing applications (Brownfield) which may not be properly layered, may not be able to survive a port like that with so little modifications.
I will be looking into WCF Roles and the Azure AppFabric Service Bus next to see if I can optimize the current architecture and also to demonstrate a more realistic hybrid (on-premise/cloud) scenario for today's existing applications.
At the mean time, I hope the sample is useful to those who are starting to develop applications on Windows Azure. You do not actually need to have a Windows Azure account to test the sample as it can run correctly on the Development Fabric.
Drop me a comment if you have any thoughts to share. :)
I ported the ASP.NET web application to a Web Role and the Web Host into a WCF Web Role. Practically, if I am only running a web application, I would have combined all the layers into a single role to save cost but because I would like to demonstrate how on-premise desktop clients can make use of the cloud service, I had split the application into two roles.
Looking into cloud architectures is interesting. I would think that this sample is very much applicable only to applications that are designed with proper layering from the start or for developers who are embarking on a new cloud project (Greenfield). Many of our existing applications (Brownfield) which may not be properly layered, may not be able to survive a port like that with so little modifications.
I will be looking into WCF Roles and the Azure AppFabric Service Bus next to see if I can optimize the current architecture and also to demonstrate a more realistic hybrid (on-premise/cloud) scenario for today's existing applications.
At the mean time, I hope the sample is useful to those who are starting to develop applications on Windows Azure. You do not actually need to have a Windows Azure account to test the sample as it can run correctly on the Development Fabric.
Drop me a comment if you have any thoughts to share. :)
Labels:
.NET,
Cloud Computing,
Layered Architecture,
Windows Azure
Minor Bug in LayerSample 4.0
If you have downloaded LayerSample 4.0 prior to June 25, 2010, you may discover that the application has a small bug which doesn't allow the Financial Controller to reject expenses. This is a code bug as I have forgotten to code the logic in the Disburse Activity. This bug does not impact the sample's purpose of illustrating layering. :)
The issue has been fixed and you can get the latest here.
The issue has been fixed and you can get the latest here.
Labels:
.NET,
Layered Architecture
Friday, June 25, 2010
SharePoint 2010 Workflow Woes
Was trying to run a Workflow on a SharePoint 2010 Document Library and was greeted with the following error message:
"The form cannot be rendered. This may be due to a misconfiguration of the Microsoft SharePoint Server State Service. For more information, contact your server administrator."
I can't find this so called 'State Service' anywhere but after searching the Internet for a while, I discovered that we can solve it by re-running the Configuration Wizard.
Central Administration -> Configuration Wizards -> Launch the Farm Configuration Wizard -> Start the Wizard.
Make sure the State Service is checked and click Next.
Somehow, my SharePoint didn't configure properly after the installation because it timed-out when running the Wizard. So running it again (and made sure it ran successfully) solved the problem.
"The form cannot be rendered. This may be due to a misconfiguration of the Microsoft SharePoint Server State Service. For more information, contact your server administrator."
I can't find this so called 'State Service' anywhere but after searching the Internet for a while, I discovered that we can solve it by re-running the Configuration Wizard.
Central Administration -> Configuration Wizards -> Launch the Farm Configuration Wizard -> Start the Wizard.
Make sure the State Service is checked and click Next.
Somehow, my SharePoint didn't configure properly after the installation because it timed-out when running the Wizard. So running it again (and made sure it ran successfully) solved the problem.
Labels:
SharePoint,
Work Life
Wednesday, June 23, 2010
Layered Architecture Sample 4.0
I have made available a stable beta release of the Layered Architecture Sample 4.0 for public preview. After many nights of upgrading the sample (and no XBOX), I am glad that I can finally release it.
I had initially wanted to migrate the January 2009 release to Windows Azure but as it was near completion, I had encountered some problems with Workflow Persistence on SQL Azure. Therefore, I had to abandon that initiate and work on upgrading the sample to .NET 4.0 instead.
New in this release is a WPF client. Yup! I finally found the time to do it after procastinating for so many releases. I only developed the client for the Submitter and omitted the Approver because I wanted to get it out quick. I also removed some functionality such as Reseting the demo database and auto refresh in the WPF client.
The one that got a major overhaul was the Workflow Service. I had to unlearn all the WF3.5 that is in me and relearn WF4.0. It was the most challenging task in the entire exercise. I have yet to discover how to synchronize the persistence store (now called instance store) with the ExpenseSample database. I hope there are some APIs that I can call.
The Business Entities also got revamped as I have always hated the fact that I need to reference System.Data.Entity in every project. Fortunately now, ADO.NET Entity Framework 4 allows us to do POCO, so all Business Entities are now POCOs and the Data Context have been moved to the Data Layer (where it should have been in the first place!).
The Web client UI has also been updated to use the out-of-the-box ASP.NET Web Application project template provided by Visual Studio. Saves me trouble from defining my own theme. I also AJAX-ed them so that they can auto refresh. Now they feel closer to their WinForm counterparts.
Lastly, I played around with the Architecture Explorer and drawn a Layer Diagram for the sample. Because of all the arrows flying around, I have decided to draw the Business Entities slightly different from the standard layer diagram. I hope nobody gets upset with it :p
Anyway, I hope you find the sample useful. I felt a little guilty for not updating it for 18 months. Do help me spread the word, blog, facebook and tell your friends about it. Also, pay attention to my blog for the release of a cloud version of the sample.
Here's a snapshot on what's on my mind for the next release (if I have the time to research and develop them):
I had initially wanted to migrate the January 2009 release to Windows Azure but as it was near completion, I had encountered some problems with Workflow Persistence on SQL Azure. Therefore, I had to abandon that initiate and work on upgrading the sample to .NET 4.0 instead.
New in this release is a WPF client. Yup! I finally found the time to do it after procastinating for so many releases. I only developed the client for the Submitter and omitted the Approver because I wanted to get it out quick. I also removed some functionality such as Reseting the demo database and auto refresh in the WPF client.
The one that got a major overhaul was the Workflow Service. I had to unlearn all the WF3.5 that is in me and relearn WF4.0. It was the most challenging task in the entire exercise. I have yet to discover how to synchronize the persistence store (now called instance store) with the ExpenseSample database. I hope there are some APIs that I can call.
The Business Entities also got revamped as I have always hated the fact that I need to reference System.Data.Entity in every project. Fortunately now, ADO.NET Entity Framework 4 allows us to do POCO, so all Business Entities are now POCOs and the Data Context have been moved to the Data Layer (where it should have been in the first place!).
The Web client UI has also been updated to use the out-of-the-box ASP.NET Web Application project template provided by Visual Studio. Saves me trouble from defining my own theme. I also AJAX-ed them so that they can auto refresh. Now they feel closer to their WinForm counterparts.
Lastly, I played around with the Architecture Explorer and drawn a Layer Diagram for the sample. Because of all the arrows flying around, I have decided to draw the Business Entities slightly different from the standard layer diagram. I hope nobody gets upset with it :p
Anyway, I hope you find the sample useful. I felt a little guilty for not updating it for 18 months. Do help me spread the word, blog, facebook and tell your friends about it. Also, pay attention to my blog for the release of a cloud version of the sample.
Here's a snapshot on what's on my mind for the next release (if I have the time to research and develop them):
- Duplex WCF calls to replace auto refresh
- Synchronizing the Expense Sample DB with the Instance Store
- A Silverlight client (requires lots of learning for me)
- An ASP.NET MVC client (requires lots of learning for me)
- May be some UML diagrams in the model ;)
- Bring back the message queue code
Download Layered Architecture Sample 4.0 here.
Labels:
.NET,
Developer Community,
Layered Architecture
Monday, June 21, 2010
My 1st Netvertible
Two weeks ago I bought a new toy, the ASUS Eee PC T101MT Netvertible. Was initially considering an iPad but found out that this baby can do more for almost half the price. I also considered the Lenovo S10-3T but it didn't impress me that much.
This is my first PC purchase in almost 6 years after my Compaq Presario X1000. Have been using my company's Lenovo T61p until I started to doll-up recently (due to some progress on weigh-loss). Since I am wearing high-heels nowadays, I find the T61p a lil too heavy for me.
I wanted something light when I visit a customer or return to my office for simple administrative tasks. Have been thinking of getting a netbook but was constantly discouraged by my friends (because they know I am a codemonkey and I need a high-end machine to do my work). Therefore, I actually have very low expectations before I picked up the unit.
The T101MT is not yet available in Malaysia. Thanks to a friend who just won't give up in helping me get it from Singapore despite it was out-of-stock. He finally managed to get someone to get it from the airport. Since it was from the airport, there were no upgrades or freebies :( but no biggie.
For the rest of the days, I was basically de-crap-ifying it since there were lots of software that came with it that slowed down the system.
This is my first PC purchase in almost 6 years after my Compaq Presario X1000. Have been using my company's Lenovo T61p until I started to doll-up recently (due to some progress on weigh-loss). Since I am wearing high-heels nowadays, I find the T61p a lil too heavy for me.
I wanted something light when I visit a customer or return to my office for simple administrative tasks. Have been thinking of getting a netbook but was constantly discouraged by my friends (because they know I am a codemonkey and I need a high-end machine to do my work). Therefore, I actually have very low expectations before I picked up the unit.
The T101MT is not yet available in Malaysia. Thanks to a friend who just won't give up in helping me get it from Singapore despite it was out-of-stock. He finally managed to get someone to get it from the airport. Since it was from the airport, there were no upgrades or freebies :( but no biggie.
Eee PC T101MT unboxed (Powerpuff plush not included)
I got the basic version that came with 1GB RAM, 160GB HDD and Windows 7 Home Edition. The Home Edition was really a joke since it has a multi-touch screen. But nevertheless, the first impression I got was pleasant. The build looks solid and the finishings were great.
For the rest of the days, I was basically de-crap-ifying it since there were lots of software that came with it that slowed down the system.
Subscribe to:
Posts (Atom)



