In my last post, I covered how WMI can help us monitor mirroring in SQL Server 2005. Before I post the code, let me explain a few more things.
Originally, the code was supposed to be really simple:
1 - Connect to both principal and mirror servers.
2 - Listen in for relevant events.
3 - Fire events when Automatic Failover and Manual Failover occurs.
While, conceptually this is all we need to do, the WMI events generated for mirroring events are not that simple.
In the following event sequences, there are two servers:
Server A – Originally configured as the mirror
Server B – Originally configured as the principal
These discussions assume the presence of a witn...
First, I talked about WMI and the way it can be used to discuss mirroring, then, I discussed the events that are generated through WMI.
In the end, it is all about the code. As always, the big disclaimer here is that this code is just a sample and it purposely leaves out error handling and a bunch of documentation every program must have. The other big disclaimer is that this is provided as is and there are no guarantees of usefulness. Part of my team is also testing this class as this is only a skeleton project produced as a proof of concept – so there will be bugs! ;)
The sample contains a VS 2008 solution with two projects:
MirrorMonitorWMI – Contains the MirrorEvent and Mirror...
Some time ago I found myself challenged with the task of creating a solution that provided customizable data entry forms design and execution functionality. Feature aggregation was of the highest priority; therefore, the design team decided that forms were to be specified using our own XML-based definition language. Based on future users’ preferences, Microsoft Excel was chosen as runtime platform; this decision pushed us directly into VSTO world.
The next two sections describe VSTO basic concepts. The description, while brief, is intended to expose only the necessary to understand the problem at hand.
What is VSTO?VSTO stands for Visual Studio Tools for the Microsoft Office System. As...
When you are working with WCF Services, sooner or later you will need to either send or receive a large message, like a picture or a pdf document or maybe an object with a complex structure.
If you add a new service to your solution in Visual Studio, by default it is created with a limited message size of 64KB or less. Few pictures or documents will pass through such a small buffer and, if what you are doing is a photo sharing site, it will have little use, if any at all. Fortunately it is very easy to make our services handle large messages properly.First on the Server’s web.config you must make sure to include the node dataContractSerializer inside the service behavior. You should add ...
While working on the implementation of a CMS-based web site, I had to deal with a problem that obstructed the expected navigation flow. To make sure the site was search-engine-friendly, aliased URLs capability was enabled in the content management application. The site also needed to be localized in at least 6 languages. The combination of these two features didn’t go quite as expected to say the least.
Here’s a detailed description of the problem:
For all content entries of the type Product, we use a product.aspx page that is in charge of rendering all of them by sending the product, and language, ids as query string parameters,it looked like this: product.aspx?id=[productid]&LangT...
This article is the first part of a series of three where we are going to demonstrate step by step how to synchronize a client database (SQL Server Express 2008) with a server database (SQL Server 2008) using Microsoft Synchronization Services through an N-Tier architecture supported by WCF.
Let’s suppose we have an application used by insurance agents to sell insurance policies on the field. The application can work offline and needs the ability to synchronize the data with the main server database. For the sake of simplicity, we will only be synchronizing one table (Policies).
The insurance agents should not be able to access all of the policies, only the policies sold by them, so we ...
This is the scenario… We already have our LINQ DataContext and we need to receive/send info through a WCF service, what can we do to accomplish this?Option A. - Convert our LINQ entities to data contracts, to do this we just need to modify the Serialization Mode property from None to Unidirectional, right click in any area in the dbml and select properties.
Doing this our LINQ objects are going to have the attributes [DataContract()] and [DataMember] as show in the figure 2. A few questions come to my mind (for sure there are a couple of more and for sure not all the options showed here are going to cover all the cases, hopefully a good part of)… What if we don’t need/want to send all th...